Does EmonHubMqttInterfacer listen for messages?

Does the emonhub / EmonHubMqttInterfacer listen for messages (which it then passes into emoncms) or is it purely a publish only model ?

Looking for best way to interface my bluetooth based solar feed into emoncms - ideally without the need to post via HTTP to both local and remote emonCMS.

Does the emon Socket interface work ?

It does listen for MQTT messages but it’s implementation is very limited and very specific to the emonPi and sending data out via rfm, so it isn’t really useful for any other purpose. The name of the MQTT interfacer is very misleading, it should be “EmonHubMqttEmonPiInterfacer” and inherit from a generic “EmonHubMqttInterfacer” since it is specifically for the emonPi/emonSD.

Yes it does, (sorry I haven’t been around to answer this post sooner) and it is the perfect way to develop a new interfacer without actually interfering with emonhub code. The intended dev path is to make a python script to interface with your source or do the job you are intending and post to emonhub via a socket interfacer, then stage 2 would be to reshape that working script to then be an interfacer if you wish emonhub to manage the settings and other stuff.

I see you got stuck straight in to the interfacer, which is fine, using the socket interfacer just splits it into chunks for easier progress.

1 Like