I am a beginner in Home Assistant and Esphome. I have set up an alarm using SIM800 module connected to ESP module through UART. Everything works fine, but I have a major problem. I searched a lot on the internet and could not find an answer to my question, so I had to post a ticket. Please guide me in simple and elementary language. When the SIM800 module hangs or for any reason its connection with the ESP module is momentarily cut off, no SMS will be exchanged until I reset the whole system. How can I write a program in ESP so that the ESP module realizes that the SIM800 module has stopped working and resets itself (the ESP module) and the SIM800 module at the same time?
Thank you in advance for your help
Do you have any idea what causes this? Does the esphome node stays connecte to HA and only the SIM800L module hangs?
First you need to find out why your module crashes. What are the specifications of power supply you are using? It is said that this module can consume up to [email protected]
Depnding how often your problem occurs - daily? weekly? - you might be able to just work’a’round the issue by forcing the esphome node to restart regularly.
esphome:
# ...
on_boot:
priority: -100
# ...
then:
- delay: 24h # interval for restart
- button.press: restart_node
button:
- platform: restart
id: restart_node
Hi
Thank you for your quick reply.
Yes, I can turn on siren (which connects to ESP module ) using HA and sim800l module also is working and when I call it, it ringing. just Tx/Rx communication disconnect and when I reset the ESP module alone, not enough and i should reset both ESP and Sim800l simultaneously to solve the problem.
I am sure about the power and I did a lot of search in this field and by placing several capacitors and strong regulator I was able to solve the power problem.
The place that this alarm system installed, the GSM signal is poor and I think sometimes the module do not receive signal (even for a short time) the Tx/Rx disconnect.
Thanks for your code, this is good idea but I need reset Sim800L module simultaneous. If I plug one of ESP GPIOs to reset pin of Sim800L (its active low), would you please help me and write the code for reseting both ESP and Sim800L modules.
Finally, is it possible to send a special AT command to sim800 module periodically, if there was now answer, then reset both modules?
You could try something like this:
esphome:
# ...
on_shutdown:
# ...
then:
- button.press: reset_sim800
button:
- platform: output
output: sim800_reset_pin
id: reset_sim800
output:
- platform: gpio
pin: 25 # sim800l reset pin
id: sim800_reset_pin
When the esphome node shuts down or restarts it should also reset the sim800l
Thanks alot
It worked fine.
But as you know this solution is a temporary, and the basic method is to be sure of its operation and communication by sending an AT command to the SIM800L module periudically, if there is no response, then reset the controller and SIM800L.
I apreciate if you or anybody else help to do this.
Thank you again for your reply.