🤖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 ?

    Scheduled Pinned Locked Moved PRODUCTS
    4 Posts 1 Posters 1.4k Views
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post