Requesting value from Domoticz

Moderator: leecollings

Post Reply
benya
Posts: 3
Joined: Sunday 04 December 2016 8:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Requesting value from Domoticz

Post 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!
User avatar
gizmocuz
Posts: 2551
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Requesting value from Domoticz

Post 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);
  }
Quality outlives Quantity!
benya
Posts: 3
Joined: Sunday 04 December 2016 8:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Requesting value from Domoticz

Post by benya »

May I request value from Domoticz dummy sensor or user variable?
What childSensorId should be used in this case?
User avatar
gizmocuz
Posts: 2551
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Requesting value from Domoticz

Post by gizmocuz »

Dummy sensor data is ok, i dont think support for variables is made yet... checking.. nope
Quality outlives Quantity!
benya
Posts: 3
Joined: Sunday 04 December 2016 8:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Requesting value from Domoticz

Post by benya »

How could I find out childSensorId for the dummy sensor?
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest