ffes / domoticz-buienradar

Domoticz Buienradar.nl Weather Lookup Plugin
MIT License
14 stars 5 forks source link

Add Visibility device #2

Closed ffes closed 5 years ago

ffes commented 7 years ago

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 and sValue must be. Didn't find it in any of the docs so far.

gerard33 commented 7 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.

gerard33 commented 7 years ago

See pull request #8.

Tsjippy commented 5 years ago

long solved