Hello!
I'm still blocked, cannot understand very well how it works.
As seen, I can get vaules with the previous code I've implemented. Using program and virtual modules I was able to create them and collect informations. Googling on this forum as well as on the sourceforge forum I've found how to query the modules:
http://<MY_IP>/api/HomeAutomation.HomeGenie/Config/Modules.List/
This produces a long list. Let me take this block:
{
"Name": "xefil - XefilHomeArduino",
"Description": "",
"DeviceType": "Program",
"Domain": "HomeAutomation.HomeGenie.Automation",
"Address": "1007",
"Properties": [
(..snip...)
{
"Name": "xefil.XefilHomeArduino.LeafNodeId01.Relay01",
"Description": "",
"Value": "0",
"UpdateTime": "2015-01-07 09:37:09Z",
"ValueIncrement": "0",
"LastValue": "0",
"LastUpdateTime": "2015-01-07 09:35:12Z"
},
(..snip...)
{
"Name": "xefil.XefilHomeArduino.LeafNodeId01.DHT11_H",
"Description": "",
"Value": "36",
"UpdateTime": "2015-01-07 09:37:09Z",
"ValueIncrement": "0",
"LastValue": "36",
"LastUpdateTime": "2015-01-07 09:35:12Z"
},
{
"Name": "xefil.XefilHomeArduino.LeafNodeId01.DHT11_T",
"Description": "",
"Value": "25",
"UpdateTime": "2015-01-07 09:37:09Z",
"ValueIncrement": "0",
"LastValue": "25",
"LastUpdateTime": "2015-01-07 09:35:12Z"
},
(..snip...)
To start understanding, how could I create a generic switch that simply write to the console the 'xefil.XefilHomeArduino.LeafNodeId01.DHT11_H' if the switch is ON and the 'xefil.XefilHomeArduino.LeafNodeId01.DHT11_T' if the switch is OFF?
I know, this doesn't make much sense, but it's only a start point to inderstand how to query already collected values. I'll use them later to query the relay status and do something with that later.
Where should I get the values? From here?
"Name": "xefil - XefilHomeArduino",
"Description": "",
"DeviceType": "Program",
"Domain": "HomeAutomation.HomeGenie.Automation",
"Address": "1007"
Or from here?
"Name": "Corridoio DHT11",
"Description": "",
"DeviceType": "Sensor",
"Domain": "HomeAutomation.XefilHomeArduino",
"Address": "1"
Also is better to get vaules from the program or from the sensor Widget? Or it's the same?
Thanks again, really!
Simon