SK
Signal K2mo ago
Tony

Tony - Does anyone have a sketch on deep sleep ...

Does anyone have a sketch on deep sleep and wifi connection logic to reduce the time it takes to connect to wifi and establish a wss client connection? I want to build a power efficient device that can wake on a set interval (configurable on the sensesp configuration page). This means I need to quickly connect to wifi and establish a wss connection. I know there are some techniques to wake and connect to wifi that can take only milliseconds. Ideally the wake time is less than a second, including the round trip to Signalk.
11 Replies
Jan Dytrych
Jan Dytrych2mo ago
Is this kind of sensor that will be battery powered and will send some values into SignalK every x hours?
Tony
TonyOP2mo ago
It will be wired to 12v but I am also going to work on a battery powered and solar version. The interval will depend on the sensor, but more than every few hours. Anywhere from every few seconds to once per minute.
Jan Dytrych
Jan Dytrych2mo ago
I would recommend using just bare Arduino with ESP32 and using HTTP with predefined JWT token from SignalK or sending deltas via UDP, SensESP isn't really ready for this.
Tony
TonyOP2mo ago
Why isn’t sensesp ready for it? If the device has already been granted access to connect via wss then what is the limitation?
Jan Dytrych
Jan Dytrych2mo ago
The limitation is that I'll have to manage WS connection to server and waste a lot of effort to make it working reliably. The SensESP isn't designed with low power or deep sleep in mind. Also I tried to work with it for my T-Watch 2020 project, here is https://github.com/JohnySeven/SensESPWatch and I've end up just writing it from scratch, because I had trouble with timing my "high power" mode vs "low power mode".
Tony
TonyOP2mo ago
Your watch project is five years old. At the time sensesp was not even v1. Have you done any development on the platform since then? I am curious how it’s not designed with deep sleep in mind. What is the limitation?
Jan Dytrych
Jan Dytrych2mo ago
Yeah, I've contributed to v2 webUI and made few projects based on v2, v3 breaks a lot of things so I didn't try it for that matter, but I don't think there was some kind "lifetime" mechanism that could support for deepsleep and correct closing of websocket and it would take more time that writing simple sensor that would push data into Signal K via HTTP or UDP. So you'll see and let me know how it goes 🙂
Ed
Ed2mo ago
Would love to see WOL (wake on lan), triggered from node-red. Some SensESP modules only needed when cruising or on demand.
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Tony
TonyOP5w ago
Sure I can build something with it and see how it goes. Is there anything specific you would like me to evaluate?
Unknown User
Unknown User5w ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?