-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Serial data feature suggestion #2182
Comments
try google? "mqtt serial bridge esp8266" |
i have, and built a working protype, however it would be nice for all my iot devices to run the same core software |
do a pull request ? Nice idea though, i can see usage cases for having the serial exposed through mqtt. |
Considering but see opportunities in regards to using the hardware serial for debugging... I might choose to only support software serial but this needs testing. |
+1 for a serial connection in tasmota! My use-case: gesture-detection with a dedicate Arduino + several sensors (e.g. IR-/Ultrasonic-sensors) with time critical functions and a serial connection to a tasmota-esp8266 for a bi-dicrectional exchange of MQTT commands. Perhaps you can define a set of 5 - 10 MQTT-commands in the web interface which are transferred to the Arduino and pass every command from the Arduino to the MQTT-Broker. Example: Write to Arduino ("IR_SENSOR" is defined in Web interafce): Read from Arduino: Software Serial would be fine for me and the text stream of the OP could be integrated via an optional default MQTT-command for received serial text. |
5.12.0g * Add support for MQTT to hardware serial bridge using commands Baudrate and SerialSend. Currently supports 8N1 and text only (#2182)
Give it a go! Use command Expect responses on mqtt Change baudrate with command Note: only supported on hardware serial. And it won't work (and has been disabled) on Sonoff Bridge, Dual (R1), CH4 and SC as they use the serial interface themselves. |
I needed a similar solution for some time to communicate with a projector so I gave it a try and created a software serial implementation (#2190). I hope it is relevant here. |
wow, compiled using platform io into a ESP-01 , device config set to generic, ,with a DS18B20 on GPIO2 still reads temperature and does the Serial port stuff , note the device i am connected to echos a GOOD Message, /local/Clock/cmnd/Baudrate : 57600 fantastic .. |
I've added support for the transmission of whitespace characters in #2190 when they are escaped in the MQTT message. Also implemented a "delimiter character" functionality, so a single message (if defined) can be transmitted in a single MQTT message. |
This looks great but I'm struggling to get things to work. Anything obvious wrong? Wemos D1 running TX/RX and 3.3v are connected to a TTL-RS232 adaptor (like this) which is connected to my RS232 device. I want to send command to the device (MQTT > Serial) and I also want the messages from RS232 to be delivered over MQTT (regardless of commands). If I plug the RS232 device into a Raspberry pi with USB-RS232 adaptor I can confirm the device is sending output/takes commands. I'm not seeing anything related to serial on the Tasmota console. Do I have to do anything specific to set things up? |
5.12.0g * Add support for MQTT to hardware serial bridge using commands Baudrate and SerialSend. Currently supports 8N1 and text only (arendst#2182)
5.12.0h * Add support for Software Serial bridge using commands SerialDelimiter, SBaudrate and SSerialSend. Supports 8N1 and text only (arendst#2190) * Add support for Hardware Serial bridge using commands SerialDelimiter, Baudrate and SerialSend. Supports 8N1 and text only (arendst#2182)
I have a use case where I would like to replace and old serial data radio with and esp8266 device using mqtt
It is not contious data stream, just a simple 8-16 chars every 60 seconds of so. So mqtt would be spot on
So my thinking is add support for serial comms in the generic device. Or any device where serial port is easily available
So any text reecived form rx port (with cr on end or Confiurable timeout)
Is forwarded over mqtt
And vice versa.
Baud rate would need to be configurable.
And probably disable boot messages
The text was updated successfully, but these errors were encountered: