Most recent activity
-
Hi @MaBe
Thank you very much for your precise reply. I added log functionality to my application using recommended by you Storage module. Thanks to it when I'm connecting using telnet I'm able to:
- printLog() - display all logged information (even logged before nodemcu restart)
- clearLog() - clear all log entries
I'm attaching my application code. Now I'm able to check what is going on when the problem occurs. Thanks a lot for your help.
- printLog() - display all logged information (even logged before nodemcu restart)
-
Hi, I have a small app with rest api deployed on NodeMcu with Espruino. App works fine and is able to successfully reconnect NodeMcu to wifi router after turning router off and on. I tested it several times. I use console.log to log all important information. The problem is that after some time (for example one day) NodeMcu loses wifi connection and is not able to reconnect to wifi. I would like to find the root cause of this problem. When the problem occurs I'm not able to connect to NodeMcu using telnet. I need to disconnect usb power supply and connect my laptop to this board. Is it possible to read/display somehow logs written earlier using console.log? If not maybe I could use some physical file instead of console.log for logging information and display its content later? Is it possible to use "fs" module?
Thanks. I will add this memory info to my log and additionally timestamp at the beginning of each line.
Below sample curl calls (in my app I have D1 and D2 configured as relays and D5 as temperature sensor):
1) curl -X GET http://nodemcuip -H "Content-Type: application/json"
result:
{"error":"","result":{"D1":0,"D2":0,"D5":22.75}}
2) curl -X POST http://nodemcuip -H "Content-Type: application/json" -d '{"D1":"1", "D2": "0"}'
turns on D1 relay and turns off D2 relay.