Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT integration #28

Open
devdems opened this issue Mar 24, 2020 · 2 comments
Open

MQTT integration #28

devdems opened this issue Mar 24, 2020 · 2 comments
Labels

Comments

@devdems
Copy link

devdems commented Mar 24, 2020

Hi,

i have mqtt server and set the mqtt in emocms properties to point to it.

When i publish a message with mqttlense app to the topic i.e. "emon/2/test" value "100" i would expect that this creates an input in emoncms but nothing happens.

If i subscribe to this topic i can see that the message is published correctly.

Props in emoncsm docker:

MQTT_ENABLED | true
MQTT_HOST | xx.xx.xx.xx
MQTT_USER | mqtt
MQTT_PASSWORD | xxxx
MQTT_BASETOPIC | emon

@jamesfidell
Copy link

Way late to the party on this one, but as I've just been dealing with the same problem I can at least explain why I think it's happening so others might find it more quickly.

The current Docker image for emoncms (as of 22/12/2021) just runs Apache. It doesn't handle the additional processes required to read data from MQTT and push it into emoncms.

It's unclear to me whether scripts/phpmqtt_input.php should be used to do this job, or if scripts/services/emoncms_mqtt/emoncms_mqtt.php is more correct (they're almost, but not quite, identical). I assumed the first and added supervisord to the emoncms Docker image to start both that and Apache.

Unfortunately that's not quite sufficient as the script currently fails unless Redis is available. If you're already using it then you might be all good anyhow, but I'd suggest that Redis shouldn't really be a requirement unless you need emoncms to publish data back to MQTT (which is not something I need it to do).

@nodje
Copy link

nodje commented Apr 29, 2022

MQTT broker has to be run separately, enabling MQTT in this image means enabling mQTT protocol support and indicating where to find the broker instance with MQTT_HOST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants