Hi I'm new to the forum but I have been using emon for a while - I have also been looking (and purchased) some more LiightWaveRF devices. Beyond the works done with MQTT to switch lightwave devices on and off has anyone looked at / interested in pulling data from devices (radiator valves / thermostats) into Emon?
I have done some research looking at requesting / listening for data (easiest is UDP) - responses are JSON and I figured (because I'm not a software developer!) it should be reasonably easy to pick the data from the lightwave link (via UDP) and strip the JSON for teh values needed and then post to emon as a feed???
My ultimate aim is to get to the real time OpenBEM running using these feeds + using the intelligence from the feeds to proactively control the heating.
I can post my current findings / info .. i'm hitting a wall due to my lack of programming skills :-)
Re: LightWaveRF as a data source to EmonCMS
There is a Lightwaverf node in node-red https://www.npmjs.com/package/lightwaverf so you can probably create a flow into emoncms via MQTT. Note some other posts if you want to use JSON. I'm doing just this with an Edimax smartplug.
Sorry this is just a nodejs module.
Re: LightWaveRF as a data source to EmonCMS
thanks for the link I will check that out, I made some progress last night with some very basic python. I can make a request of the lightwavelink (LWL) for a specific device and wait for the response and pull out the value.
{u'prod': u'tmr1ch', u'ver': 33, u'output': 100, u'prof': 5, u'cTarg': 22.0, u'nTarg': 18.5, u'state': u'run', u'cTemp': 19.3, u'mac': u'20:37:1D', u'batt': 3.22, u'time': 1452849394, u'router': u'20371D', u'serial': u'F46C02', u'trans': 806, u'type': u'temp', u'nSlot': u'10:00'}
I want to pull out the keys cTarg cTemp batt time
then reform them to a http://172.16.44.149/input/post.json?time=1452849394&node=1&json={cTarg:22, cTemp:19.3, batt:3.22}@apikey=xxxxxxx
is this easy to do?? I have been googling around and I can't find a straight forward help on
how to extract just a few keys needed, then contrstuct the url...
this is the basic script to listen:
and this is the script to make the requests: