Closed Condiolov closed 4 years ago
Hello Thiago, saving variables is up to you. There are several methods to save data in order to retain the values on power off:
Stefano
Many thanks Stefano !! I started using the EEPROM very well today, and it works very well !! I thought it was possible to retrieve the last messages on the telegram. And this library is the only one that works on my esp8266 card !! I'm a layman, does this library ask if you have a message in the loop at all times, or wait for a message? another question is it possible to interact with this library with PHP to create a web interface?
Hello Thiago, nice to hear that you found a solution to your problem. Regarding how the library works, I suggest you to give a look to the reference pages of the library: https://github.com/shurillu/CTBot/blob/master/REFERENCE.md In detail, here: https://github.com/shurillu/CTBot/blob/master/REFERENCE.md#ctbotgetnewmessage you can find all the answers about retriving new messages. Briefly, to check (and edventually get) a new message, you have to call the method getNewMessage(). This method check if there is a new message and return it (if there are more than one, it get the first). Keep in mind that every time you read a new message, THE NEW message is marked as READ so you can`t get it anymore (thus the method name -> getNewMessage()) Regarding the PHP question, I'm not sure to understand what you want to do... sorry. Cheers Stefano
Thanks Stefano!!! I'm testing this library !!
Congratulations on the library !! really easy to use !! In the design of the led (on / off), would it be possible to store the last state in the event of power failure? I want to restart the ESP8266 every hour, and I need to know the last state of it or get the last message on the telegram. Any solution?