esp-link and MQTT, callback to Atmega
Posted: Wed Oct 05, 2022 12:37 pm
Dear forum, I would like to ask for help with the following problem:
I have a project for controlling the individual heating circuits of an underfloor heating system using an Atmega328 that has been working well for several years. He is supported by an ESP8266 with esp-link v3.0.14 connected via UART, which I use to transmit the current data and the parameterization of the control. I programmed the project in BASCOM. Unfortunately, I have no idea about C...
Now I would like to transmit the outside temperature from another 328/ESP module to the underfloor heating module via MQTT. Unfortunatly I can't read the EL-CLIENT package and I can't find a description of the necessary byte sequences to the esp link to initiate the MQTT connection. As an MQTT broker, Mosquitto runs on a RaspberryPi. I can start the connection, subscribe to a topic and also publish it, but when sending, the payload is displayed too long on another MQTT client (too many bytes) and when receiving, the ESP log shows the payload, but it obviously fits not the function with the callback address. Nothing arrives at the UART to the Atmega. I suspect that the connection to the broker is not set up correctly or that the callback address was not created correctly. Is there a tutorial anywhere on hex byte order for MQTT communication between Atmega and esp-link? Or can someone provide me a hex dump of communication between Arduino and ESP for MQTT related communication between Atmega/Arduino and esp-link?
Many thanks for the support!
I have a project for controlling the individual heating circuits of an underfloor heating system using an Atmega328 that has been working well for several years. He is supported by an ESP8266 with esp-link v3.0.14 connected via UART, which I use to transmit the current data and the parameterization of the control. I programmed the project in BASCOM. Unfortunately, I have no idea about C...
Now I would like to transmit the outside temperature from another 328/ESP module to the underfloor heating module via MQTT. Unfortunatly I can't read the EL-CLIENT package and I can't find a description of the necessary byte sequences to the esp link to initiate the MQTT connection. As an MQTT broker, Mosquitto runs on a RaspberryPi. I can start the connection, subscribe to a topic and also publish it, but when sending, the payload is displayed too long on another MQTT client (too many bytes) and when receiving, the ESP log shows the payload, but it obviously fits not the function with the callback address. Nothing arrives at the UART to the Atmega. I suspect that the connection to the broker is not set up correctly or that the callback address was not created correctly. Is there a tutorial anywhere on hex byte order for MQTT communication between Atmega and esp-link? Or can someone provide me a hex dump of communication between Arduino and ESP for MQTT related communication between Atmega/Arduino and esp-link?
Many thanks for the support!