Hi,
I have a Z-wave network with different sensors which I would like to send to Emoncms for analysis, but a newbie to Emoncms.
Z-wave controller is currently (under development) sending JSON messages as MQTT publications.I plan to have a "broker" to transform the formats if/when needed.
A device (with a unique id) have one or more variables that can be monitored e.g. "Watts", "KWH" or "CurrentTemperature" (depending on sensor :-) )
When starting/reconfigure controller the monitored sensors will present themselves as e.g.
{ "MonitoredSensors":[ { "DeviceId":"12", "Name":"The freezer", "Service":"urn:micasaverde-com:serviceId:EnergyMetering1", "Variable":"Watts" }, { "DeviceId":"14", "Name":"Server Equipment", "Service":"urn:micasaverde-com:serviceId:EnergyMetering1", "Variable":"Watts" }, { "DeviceId":"14", "Name":"Server Equipment", "Service":"urn:micasaverde-com:serviceId:EnergyMetering1", "Variable":"KWH" }, { "DeviceId":"20", "Name":"Outside temperature", "Service":"urn:upnp-org:serviceId:TemperatureSensor1", "Variable":"CurrentTemperature" } ], "Time":"2013-12-03T22:45:09.39", "Version":"0.0.1" }
When a monitored variable changes a JSON message will be sent, e.g.
{ "DeviceId":14, "Variable":"Watts" "NewValue":"136", "ServiceId":"urn:micasaverde-com:serviceId:EnergyMetering1", "Time":"2013-12-03T23:01:21.38", "Version":"0.0.1" }
So down to some questions...
-
I would like to "register" the monitored sensors/variables in Emoncms when that message is received, with the name/description etc, if it already exist it would be nice if the description gets updated in case of modifications. Combination of DeviceId and Variable is unique
- Is that possible?
- How can I do that?
-
Sending updated values of sensors
- How can I do that?
I really appreciate help :-)
Thanks in advance!
/ Joacim
Re: Integrating Z-wave sensors with emoncms
Hi,
After some testing I think I can answer myself but also some unexpected behavior noted.
For (1) it's not possible, the only thing possible to set is node which I can map to the deviceid which makes it easier to further configure it in emoncms.
For (2) it only the parameters described in Input API that is available (no extra, non-documented parameters) so I use:
http://192.168.1.90/emoncms/input/post.json?node=14&csv=100.1&apikey=bc9...
When using this URL, the name gets a incremental number starting at 1 and it's not possible to set the name in url (you can do it with JSON but then it's not possible to set node). If I in webUI change the name from "1" to "MyName" and then run the URL above again it creates a new input with name=1
Question: is it a way to set both node and name in URL?
Re: Integrating Z-wave sensors with emoncms
Nobody knows the answer on this question?
Re: Integrating Z-wave sensors with emoncms
Hello, you could do this
http://ip-address/emoncms/input/post.json?node=10&json={fridge:200,outside:15.6}
Re: Integrating Z-wave sensors with emoncms
Thanks, I will try that out.
But currently I struggle with emoncms consuming 17 GB disk of my total 20 GB Ubuntu server vmware (for some test and play). Need to resolve that first to be more serious about Emoncms.
EDIT: See the other post for disk issue
Re: Integrating Z-wave sensors with emoncms
has anyone figured out how to do this? I am also looking at the question of how to get zwave energy monitoring (plug and/or circuit monitoring) info from the zwave controller to emoncms. I use the Universal Devices ISY as my Zwave (and Insteon) controller.
Thanks