🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    T-Lite: how to keep it awake ?

    PRODUCTS
    1
    4
    120
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JeffInItalia
      last edited by

      Hello there,
      I am trying to use a m5stack T-Lite with Home Assistant to monitor my photovoltaïc system (Victron). The T-Lite is powered (usb c) permanently but keeps falling asleep despite attempts to keep it awake (see below). How can I make sure it won't go to sleep and become unavailable via wifi (http://192.168.1.xxx/json) ?

      • id: keep_t_lite_awake
        alias: "Keep T-Lite awake"
        mode: restart
        trigger:
        • platform: time_pattern
          seconds: "/20" # toutes les 20 s
          action:
        • service: rest_command.t_lite_keepalive

      b25d69f7-af21-49a7-88bb-e9df62907903-image.png
      9503717e-60ca-47be-8ed3-7c11ae4deedc-image.png

      J 1 Reply Last reply Reply Quote 0
      • J
        JeffInItalia @JeffInItalia
        last edited by

        Last attempt: I have just added WiFi.setSleep(false); in the setup() of main.cpp (M5StickC-Plus-TLite-FW.git). Let's see if it stays online (awake)

        ae66bee8-157c-4b4f-89a4-013c834e10d8-image.png

        J 1 Reply Last reply Reply Quote 0
        • J
          JeffInItalia @JeffInItalia
          last edited by

          Since I still have interruptions in the json push, it might not be because the Wifi goes to sleep, but because for some reason (busy socket, frames collision, queue overflows, memory leak / heap fragmentation,...), the json is no longer posted... I added a soft reset of the ESP in the main loop whenever a delay from the last successfull of the POST is exceeded...

          b4337a97-d85c-4dd4-b8b2-f6a906d7d26e-image.png

          a609727a-0cbc-4325-94d8-2cf40f3bcdbd-image.png

          1 Reply Last reply Reply Quote 0
          • J
            JeffInItalia
            last edited by

            The soft reset seems to do the job (12 hours of measurements uninterrupted)

            0f4b244c-ff68-470e-8f51-d139e7485082-image.png

            1 Reply Last reply Reply Quote 0
            • First post
              Last post