Community
OpenEnergyMonitor

Community

Feed from MQTT


(kb6673) #1

I’m reasonably new to emonCMS and I am struggling to understand if it possible to subscribe to a custom MQTT topic and log it as a feed.

Example: I am logging temperature to the pre-installed MQTT on the emonPi, the feed is outdoors/windspeed (as an example).

Is it possible to have emonCMS subscribe to this feed and log it for me? (Just like the built in emon feeds)

Thanks


(Trystan Lea) #2

Hello @kb6673, the EmonPi listens on the default base topic: emon/#

Examples

create an input from emonTx node called power with value 10:
[basetopic]/emontx/power 10

create an input from node 10 called power with value 10 :
[basetopic]/10/power 10

create input from emontx with key 0 of value 10
[basetopic]/emontx 10

create input from emontx with key 0 of value 10, key 1 of value 11 and key 2 of value 11
[basetopic]/emontx 10,11,12

[basetopic] and user ID of target Emoncms account can be set in settings.php here:
https://github.com/emoncms/emoncms/blob/master/default.emonpi.settings.php#L29


(kb6673) #3

Thank you. I sent the base topic to emon/outdoors/windspeed and emonCMS picked them up right away.