Hi, I'm controlling a ESP8266 4 channel relay remotely via MQTT like this: DC 12V ESP8266 WIFI 4-Channel Relay Module Remote Control Switch Wireless Transmitter For Smart Home
All fine when sending ON and OFF commands to the relay.
I'd like to publish to an MQTT topic when having the acknowledge of each relay but I'm not finding it.
I've tried to listen to the TCP port of the relay but nothing appears... I've tried also to use a tcp request node but no answer when switching on and off the relay...
Any idea how to send ack messages to an mqtt topic or how get the current status of the relay?
Did you program the ESP8266? Arduino/Tasmota/Micro Python?
It looks like a working off the shelf product, but there is no mention of MQTT on that page.
What MQTT broker are you using?
What topic and payload do you send to control it?
I setup the WIFI SSID and password via an smartphone app called EspTouch_Demo... Then, I have a flow that send buffer data to the board IP via TCP to switch on/off each relay. This is working fine but I do not have any acknowledge to verify the relay status...
It would be great to have a acknowledge data coming from the relay board so then I can continue the nodered flow to publish the result to a MQTT broker I have available on internet...
I think you are probably stuck with consulting whatever documentation the device comes with, unless you are prepared to reflash the ESP firmware with something you control.
In the feedback section of the web page is an example of arduino code that does provide status over http. You could experiment with that code and a substitute ESP.
To get accurate feedback about each relay you would need to sense the signal that is driving the relay otherwise you don't really know whether the relay has energised or not. I think some people use two pins - one to send a signal to operate the relay and one to sense the state of the pin. I don't think you can change the mode of a pin from output to input on the fly with the ESP01S (which appears to be the chip used). Also this chip only has four I/O pins (one for each relay I suspect). Some of the pins do other things at boot-up which you need to be aware of. Sorry if this sounds negative. I could be proved wrong.
thanks jbudd. I'll investigate it
thanks for the info dynamicdave
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.