New wifi relay unit arrived but cannot control with emoncms

So the wifi relay works all ok on xxx.16.0.136 and my emoncms pi is on xxx.16.0.135 running emoncms.

I have the latest SD build with all updates and standard passwords, but cannot seem to control relay with publish to mqtt based on an input and I don’t see it or the temp sensor in emoncms.

Despite searching all the forums I still cannot get it working and some simple help sheets would be great.

Error log
2016-10-12 20:21:44.456|WARN|phpmqtt_input.php|Starting MQTT Input script
2016-10-12 20:21:45.681|WARN|phpmqtt_input.php|Subscribing to: emon/#
2016-10-12 20:21:45.682|WARN|phpmqtt_input.php|Not connected, retrying connection
2016-10-12 20:21:45.682|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2016-10-12 20:21:45.682|WARN|phpmqtt_input.php|Subscribed to topic: emon/#
2016-10-12 20:22:09.571|WARN|phpmqtt_input.php|Starting MQTT Input script
2016-10-12 20:22:10.645|WARN|phpmqtt_input.php|Subscribing to: emon/#
2016-10-12 20:22:10.645|WARN|phpmqtt_input.php|Not connected, retrying connection
2016-10-12 20:22:10.645|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2016-10-12 20:22:10.646|WARN|phpmqtt_input.php|Subscribed to topic: emon/#

I have used “mosquitto_pub -d -t heating/control/1” as the test against publish to mqtt and no joy.

All help welcomed.

i have the same problem, would like to have a button on the dashboard that i can use to override/control the relay with

i know this is 3 years ago but some simple example would be nice,

Hello @boelle I cant give a lot of support on setup at the moment but you might be interested in trying the demandshaper module for emoncms Emoncms Demand Shaper module which works in conjunction with the EmonESP firmware that can be uploaded to a WIFI relay unit GitHub - openenergymonitor/EmonESP: ESP8266 WIFI serial to emoncms link

It might not be precisely what you are after as its not integrated into emoncms dashboards and its more for scheduling devices based on day ahead forecasts for low cost electricity, low carbon power but it does allow for tuning on/off and settings timers from within emoncms - and is under active development.

The installation guide can be found here: GitHub - emoncms/demandshaper: Appliance, Smartplug, OpenEVSE demand scheduler: Find the best time to run household loads.

I think I saw that you are using a shared server for emoncms, I think this will make setting up things like the demandshaper module much more complicated if not impossible. These need both redis and mosquitto for MQTT and a standard emonSD type configuration.

Have you considered running your emoncms installation using a standard emonSD image on a raspberrypi? Probably cheaper than a shared server over time?

the shares/hosted setup was just to see what i could do with it, and i’m start to agree with you that an pi with the SD image is more the way to go

the only thing that is whispering in the back of my head is that if the power drops the file system can be corrupted very easy and sd cards will wear out

but since pi’s can boot directly off a hdd i might go that route, can i just clone the sd card image to the harddrive? or would i be better of installing things from scratch? if the latter is the case are there a script of some sort that i can use as a guide? ie what i’m asking here is how you build the sd card image

We are working on a new transparent image build process based on a script to automate the process, its now in alpha release see the forum post here: EmonSD build script progress update and beta release

You could use that (but bear in mind its an alpha release) or the standard emonSD Oct30 release, Im not sure about the steps to boot off a hdd unfortunately.

its a good starting point, and it might well be that you iron out the last bugs before i get to use it

the steps to boot of a hdd is well documented so no worries there

1 Like