Closed ffes closed 5 years ago
I have a visibility sensor with data from Weather Underground and the MQTT message is as follows:
{ "Battery" : 255, "RSSI" : 12, "description" : "", "dtype" : "General", "id" : "0", "idx" : 53, "meterType" : "Energy", "name" : "Visibility", "nvalue" : 0, "stype" : "Visibility", "svalue1" : "10.0", "unit" : 1 }
svalue1 is visibility of 10.0 KMs in this case.
I see the XML also has data for solar radiation (zonintensiteitWM2). That is also available in Domoticz.
{ "Battery" : 255, "RSSI" : 12, "description" : "", "dtype" : "General", "id" : "0", "idx" : 76, "meterType" : "Energy", "name" : "FC - Zonnestraling", "nvalue" : 0, "stype" : "Solar Radiation", "svalue1" : "386.7", "unit" : 1 }
svalue1 is solar radiation of 386.7 Watt/m2.
So I think you could use sValue. Printing the data from LUA (otherdevices_svalues['Name'] and otherdevices['Name']) both gives the values as shown above as svalue1.
See pull request #8.
long solved
As requested in https://www.domoticz.com/forum/viewtopic.php?f=65&t=16006&start=80#p120450
Add an additional device for visibility. The required data is available in the XML.
I just need to figure out what the right
nValue
andsValue
must be. Didn't find it in any of the docs so far.