I have a circuit with the configuration as in the title ( to which DS sensors, BME280, SD recording, RFM12 )
The last step is to send via JSON to Domoticz. Unfortunately the sending fails and does it randomly, sometimes after sending data from several sensors, sometimes it will go through the whole "cycle"
The interval between sending is between 20 and 30 seconds, while the interval between sending data for a specific sensor is 11 minutes.
The whole code is attached, I paste only the part responsible for Domoticz + the Select Case fragment. For the reception of the UART, I used Serial0charmatch according to Niveasoft's idea.
.
And now connecting to the UART from the Tx side of the ESP8266 I have:
.
It looks like the Atmega stops responding to the "OK" response - to the AT+PING="192.168.0.92" command. The ESP8266 is unlikely to be at fault - it sends back "OK" and the Atmega should start sending at that point. I reset it while it was running, this didn't change anything, only a reset of the whole chip helps - for a while.
In addition, as a "bonus" ( but this requires a look at the code ) up to the moment when sending to Domoticz still works, communication with Master 2 does not work, at the moment when sensor data is no longer sent to Domoticz, receiving data from Master 2 starts to work as it should. And, of course, apart from this problem, the whole thing works - whether data is sent or not - reading sensors, sending to clients and writing to SD - it all works.
What could be the reason for this behaviour of the Atmega UART ?
The last step is to send via JSON to Domoticz. Unfortunately the sending fails and does it randomly, sometimes after sending data from several sensors, sometimes it will go through the whole "cycle"
The interval between sending is between 20 and 30 seconds, while the interval between sending data for a specific sensor is 11 minutes.
The whole code is attached, I paste only the part responsible for Domoticz + the Select Case fragment. For the reception of the UART, I used Serial0charmatch according to Niveasoft's idea.
Code: VB.net
And now connecting to the UART from the Tx side of the ESP8266 I have:
Code: Bash
It looks like the Atmega stops responding to the "OK" response - to the AT+PING="192.168.0.92" command. The ESP8266 is unlikely to be at fault - it sends back "OK" and the Atmega should start sending at that point. I reset it while it was running, this didn't change anything, only a reset of the whole chip helps - for a while.
In addition, as a "bonus" ( but this requires a look at the code ) up to the moment when sending to Domoticz still works, communication with Master 2 does not work, at the moment when sensor data is no longer sent to Domoticz, receiving data from Master 2 starts to work as it should. And, of course, apart from this problem, the whole thing works - whether data is sent or not - reading sensors, sending to clients and writing to SD - it all works.
What could be the reason for this behaviour of the Atmega UART ?