How to set up and integrate MQTT to Serial bridge

I would like ideas on how to approach a project:

Create a MQTT -> UART Serial Bridge based on ESP8266.
Read data via serial and store in mqtt topics. (It may be necessary to send serial command to then receive data).
Send serial commands via MQTT payload and have the ESP8266 send commands through UART.

Serial connection parameters are: baud rate 1200, 8 data bits, 2 stop bits, no parity, no flow control.

So, should I go with Tasmotoa - can I compile with those serial connection parameters? Should I go with ESPHome? Any other ideas of what I could / should flash to easily integrate with HomeAssistant?

Any ideas / examples would be most welcome.

Thanks

esphome is my favourite. There is a write up on here for a esp8266+uart based relay board. I am not sure if it can do all of what you want though.

Why do you need to publish the data to mqtt topics? This is the home assistant forum, is it not enough to get the data into home assistant?

Thanks. I will probably use ESPHome to get this done. I assumed that MQTT was the way to store data read form the serial. Can I just put the data into attributes and states of a corresponding entity without using MQTT at all?

I have been searching for the write-up you mentioned, to no avail. I know about the UART platform, am fairly confident that I can set that up to send serial data, but not sure about serial sensors to read data from the serial interface…

Anyone who may have done this, please advise!

This is the project I was thinking of 4 channel Relay ESP8266 Wifi board WORKING with esphome

On reflection it is sending from the uart, not gathering any data or feedback.

Thanks. I am waiting for some printed PCBs and chips to assemble and test. Things usually become clearer at that stage. I will, of course post any details once and if I get it working.

Hi,
I am attempting to do something along the lines of what you are trying to do - i.e. send and receive serial data through an ESP8266 - a WemosD1 - to an Arduino board. Although I have managed (as a newbie) to configure and control a TH01, an 8 relay board (8266 based), an 8266 with pushbuttons attached through the Overview page and through Node Red, I find that the information regarding serial control is scant and confusing, with no working examples of the config yaml and/or code to show the strings sent or received, controls to initiate the send or receive, nor anything to show how to do conditionals on the return/received data. Any suggestions would be gratefully received.

Really? There are 3 mentions of uart here DIY Examples — ESPHome

Hi, I have been using HA, and not (as yet) ESPhome.

Only 24 sample configs to look through - here I go - thanks!!!

R.