I have 2 Emontx 3.4 and 3 EmonTH and a PI with RFM12 with a local version of EmonCMS. I would really like to have a lot of these values "exported" dynamically to openHAB on Raspbian which I have on the same network. I have read a lot on this forum, but I cant really find out what is the best AND latest solution. When looking at the proposed way in openHAB using a binding, it seems quite complicated and I don't have any programming skills. And I'm wondering if that is possible without interfering with my installed Emoncms.
So what would be the "easiest" way of doing this, MQTT, JSON??
Please anyone, would really appreciate some input, and very grateful. ;)
Re: Emoncms to openHAB
Try: https://github.com/openhab/openhab/wiki/Open-Energy-Monitor-Binding
Or: https://community.openhab.org/t/mqtt-show-data/2562/5
Re: Emoncms to openHAB
Also see our blog post http://openenergymonitor.blogspot.com/2015/12/openenergymonitor-emonpi-and-openhab.html
Re: Emoncms to openHAB
I am not using NODE-Red...
Is this the only way to publish some data from EMONHUB to MQTT?
I was using HTTP to send data to EMONHUB, but it was really hard to send this data to OPENHAB.
Than, I decided to send everything to MQTT Broker running in my EMONHUB.
Now I am able to read data in OPENHAB and EMONHUB, and the same time.
*** The only problem is... MQTT received data is going only to NODES, and I am not able to send this data to INPUT.
Re: Emoncms to openHAB
You can log the data from Nodes to Feeds: http://openenergymonitor.org/emon/modules/emonpi#locallog
What functionality do you require?
Re: Emoncms to openHAB
Thanx Glyn,
I need to choose between Nodes or Input?
Because, if this is correct...
Than I will stop to use local EmonHubEmoncmsHTTPInterfacer to transfer RFM data from Nodes to Input.
And than rebuild all my Feeds from Nodes.
However, how can I send Nodes data to Emoncms.org?
One more question...
Nodes has no "Process List" to know created Feeds?
Should not be like INPUT?
Specially if I need to choose between one or other, and MQTT can use only NODES.
It looks like...
Received data from HTTP I should use INPUT,
But received data from MQTT I should use NODES.
Is this correct?
But NODES interface is complete like INPUT interface?
Can I do everything from NODES like from INPUT?
Regards.
Re: Emoncms to openHAB
I was looking for a solution...
Is there not a way to just "mirror" all data received into NODES also into INPUT?
Then people could choose between receive data from HTTP (direct into INPUT) or from MQTT (into NODES and mirror it into INPUT). This should be not so hard to do inside database.
Re: Emoncms to openHAB
Hello allmac, if your using the emon-pi variant of emonhub you can send data using the EmonHubMqttInterfacer. Perhaps this interfacer could be used to send data directly to openhab? Although the data is in the form:
topic: emonhub/nodeid/rx/values
payload: csv data (ie: 100,200,300)
There has been a fair bit of discussion about how emonhub and emoncms MQTT support should work and it may well be that its current implementation is not ideal for what you want to do. You may need to find a work around.
Re: Emoncms to openHAB
Openhab is able to read MQTT data without problems. I receive already all my Emoncms data into Openhab interface using MQTT. But I send all my data to Emoncms server MQTT broker, than my Emonhub also receives data from MQTT, and I don't need to send data again to Openhab (process twice same information).
The problem is...
Emonhub receives data only into Nodes. And Nodes do not work correctly if I create FEEDs.
If you delete a Node, than you have "ghost feeds" lost in configuration. And you need to remove it manually.
And I have no interface to easly see the Node where each Feed where created, and I don't have Node data into database.
http://openenergymonitor.org/emon/comment/reply/11210
Then... what I want to do is send all my Nodes data to Input and work without problems.
I could have an option in Nodes like "input: true/false", where Node data could be copied to Input, or not. Or Input receives data from MQTT.
I could solve this, if I was able to find where Nodes data is received sent to interface, and where are configurations created. I am really looking for this, and try to enable this.
EmonHubEmoncmsHTTPInterfacer is also not able to get all my nodes, and send to Emoncms.org (for example).
Re: Emoncms to openHAB
Well... I did a quick modification into EmonHubMqttInterfacer.
Now it is able to get my MQTT Server data AND send it directly to INPUT.
Could I do a new interfacer to connect MQTT broker to INPUT/Feed.
Or maybe just add a setting like "INPUT: true/false" to enable or disable it in MQTT interfacer.