B4R Question Remote Log ESP8266

José J. Aguilar

Expert
Licensed User
Hi everyone:

I have an ESP8266 connected to a remote garage opener (I'd like to share the code when I improve it). I get a FCM push notification in my mobile when someone rings, then I send a mqtt mesagge from a B4A app to the ESP8266, it closes a relay then the remote garage opener opens the door.

From time to time (even once a day) the relays stop working when I use my app.
I thougth maybe wifi can't reach the ESP8266, but the messages still sending when you ring the bell.
So I thought maybe the mosquitto server was not responding, but I connect to it, send the message from my mobile and I get the message.

So the question is, is there a way of remotely watch the ESP8266 log's?
I think I've seen someone share in "Share your creations" a way of sendind the logs to a B4J server, but I can't find it rigth now and I'm not sure if it could help with an ESP8266.

Thank you all

EDIT TO ADD: this is the project I saw, but it seems not work with B4R
 
Last edited:

derez

Expert
Licensed User
I suspect that your ESP stops working for some reason. You can add a blinking led so you'll be able to tell by looking if it works or not. You can also make the ESP send a message to ypur pc and see the time that it takes until it is stuck , if that is the case.
Or - connect a laptop and see the logs...
There is also a esp.Restart command that will restart it, you can do it by a timer.
 
Last edited:
Upvote 0

José J. Aguilar

Expert
Licensed User
Hi Derez:

Thanks for your answer

I suspect that your ESP stops working for some reason
I've thougth about it too, but it must be working because if you press the doorbell, the ESP sends the FCM message, so it must be working and connected to internet.
You can also make the ESP send a message to ypur pc and see the time that it takes until it is stuck , if that is the case.
Hum, maybe I cand send a mqtt message back when the ESP receives the message from my app, I think I will try this.
In my B4A app I log the userwho open the door, door and date time . I have thougth using jRDC2 with B4R to log in my database when the ESP8266 opens a door, but this solution is eas
There is also a esp.Restart command that will restart it, you can do it by a timer.
This could be a solution too, restarting the ESP from time to time. Or even I can try to send a mqtt message to restart the ESP, to see if the problem is messages are not arriving
Or - connect a laptop and see the logs
This is difficult, the ESP is mounted into a box, pretty high up.
 
Last edited:
Upvote 0
Top