thank for your help. But my understanding of the whole story is somewhat different. Perhaps one of the implementors of the gateway can chime in
Under another topic in this board I found the following comment:
So this says that there is a REQ funtion, although restricted to a few types, which is fine with me.Re: Supported sensors
by AWI » Thursday 26 March 2015 14:15
To answer you question: look at the beta code below (http://sourceforge.net/p/domoticz/code/ ... rsBase.cpp)
These are currently supported types for the "SET" function (Domoticz reads these sensors one way or another).
The "REQ" function is (and will be.. http://www.domoticz.com/forum/viewtopic ... =80#p37901 ) only supported for the V_LIGHT, V_DIMMER and V_VAR types.
From the quote above I deduct that you can send REQUEST messages to the controller (Domoticz). Domoticz only deals with a subset of types of variables - fine, no problem for me.Flyingdodo wrote:Hi Josh,
I think you can send REQ to other Mysensors devices, not directly to domoticz. I think it is possible to do a request to the gateway and the gateway makes a request to domoticz, but you need to implement this yourself.
If you look in the Mysensors API youll find this at the requesting data tab:
Requests a variable value from gateway or some other sensor in the radio network. Make sure to add callback-method in begin-method to handle request responses. If you send this request to some other sensor-node you must handle the reply message yourself in the destination node.childSensorId - The unique child id for the different sensors connected to this Arduino. 0-254.Code: Select all
void request(uint8_t childSensorId, uint8_t variableType, uint8_t destination);
variableType - The variableType to fetch.
destination - The nodeId of other node to request data from in radio network. Default is gateway.
So you need to handle the request yourself.
I hope this helps you.
Robbert
Your excerpt from the MySensors API says under destination: Default is gateway. My understanding is that the gateway passes it on to the controller, same as for example with SET messages. I am logging the serial interface to Domoticz and I can clearly see that a REQ is sent to the controller: 21;3;2;0;2 (21 is my node id, 3 is child id, 2 is REQ, 0 for no ack requested and 2 is variable type V_LIGHT)
Somewhere else on this board there is an example how to request variables from Domoticz, but since V_LIGHT is supported, there is obviously something that I am doing wrong.
So, Robbert, no offence and again thank you for your help. Perhaps somebody can direct me to my misunderstanding.
Cheers
Josh