Page 1 of 1

Requesting value from Domoticz

Posted: Sunday 04 December 2016 9:00
by benya
I understand Domoticz doesn't yet support MySensors smart sleep mode.
As a workaround MySensors node could periodically request certain value from Domoticz.
I cannot find any docs on how to define dummy device or user value in Domoticz those value could be retrieved by MySensor v.2 node.
My setup: GW and Domoticz run on the same RPi. Node runs on a battery-powered Arduino.

Node could request value from controller by calling
void request(uint8_t childSensorId, uint8_t variableType, uint8_t destination);
where destination=0 (to address GW),
but what should be used for childSensorId?
Where in Domoticz I can see proper values for childSensorId?

Could someone guide me through?

Thanks a lot!

Re: Requesting value from Domoticz

Posted: Sunday 04 December 2016 9:58
by gizmocuz
You can see the values in the node table if you click on setup on your mysensors hardware
you can request values from domoticz (V_VAR), but you have to set them first, and you can also request values from other sensors (like 433Mhz temp sensors)

Code: Select all

unsigned long POLL_FREQUENCY_TEMP = 30000;           // Minimum time between send (in milliseconds). We don't want to spam the gateway.
MyMessage pollRequestMsg(CHILD_ID,V_CUSTOM);
#define ID_TEMP_HUM_SENSOR_OUTSIDE 1771  

  unsigned long currentTime = millis();
  if ((!tempReceived)||((currentTime - lastTempPolled > POLL_FREQUENCY_TEMP)))
  {
    lastTempPolled = currentTime;
    //Request the temperature sensor
    send(pollRequestMsg.set(ID_TEMP_HUM_SENSOR_OUTSIDE));
    wait(500);
  }

Re: Requesting value from Domoticz

Posted: Sunday 04 December 2016 10:24
by benya
May I request value from Domoticz dummy sensor or user variable?
What childSensorId should be used in this case?

Re: Requesting value from Domoticz

Posted: Sunday 04 December 2016 10:46
by gizmocuz
Dummy sensor data is ok, i dont think support for variables is made yet... checking.. nope

Re: Requesting value from Domoticz

Posted: Sunday 04 December 2016 11:55
by benya
How could I find out childSensorId for the dummy sensor?