-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to check if vehicle is sleeping or awake #38
Comments
You can send the "vehicle" (retrieve general vehicle information) command and check for msg.payload.state == online. It will send == asleep when its sleeping. |
Many thanks, I will try it, when I'm back home next week and give feedback. |
It may be msg.payload[0].state for the first vehicle if you have more than one car in your account I recommend a flow like last bit: If the car is not reachable, state is last known state. If you park in an underground parking lot with no wifi and no mobile coverage, it's shown as online (because that was the last state before going underground). If you (e.g.) issue a getVehicleData, the node will fail with error 408 and no output. Use a catch node to catch this event if needed. |
Ok, danke. |
Ja, aber bei (vehicles) wird selbst ja nicht sehr viel zurückgeliefert. Nur welche Fahrzeuge du hast und ob diese wach sind. Wenn Du den Batteriestand et al dauerhaft brauchst, musst du ihn dir merken. Weil danach fragen (vehicleData oder chargeState) weckt das Auto auf (weil er ja fragen muss, wie der Akku jetzt steht). Was ich mache ist relativ simpel: an Output 1 an Output 2 dann die beiden flows zusammenführen und du hast in msg die aktuellen Daten und in msg.Online zusätzlich den Status ob wach oder nicht. Königsklasse für den Fall, dass das Auto im Funkloch steht (weil in diesem Fall das Auto zwar als Online rückgemeldet wird (weil das Auto ja beim Einfahren in die Garage noch online war und sich dann nicht mehr melden konnte), aber das get Vehicledata wird fehlschlagen (error 408) und gar keinen Out liefern, daher zusätzlich eine |
cool @Michael-K-at-GitHub :). Habe ich so umgesetzt. Zu erwähnen wäre noch, dass die Abfragefrequenz > 20 min sein muß, um dem Fahrzeug ein einschlafen zu ermöglichen. Scheinbar eben auch bei der status-Abfrage. Siehe auch die gute Beschreibung, die ich hier gefunden habe. |
Ich lasse obige Sequenz permanent alle 60 Sekunden laufen. Trotzdem schläft er zuverlässig nach 12 Minuten ein. Offensichtlich verlängert ein get VehicleData nicht den Timeout des Autos. Nachdem ich ja dann auch alle 60 Sekunden nachsehe ob er schläft oder nicht, sehe ich, dass er zuverlässig durchschläft. (jetzt gerade habe ich das Auto zum letzen mal vor 20 Stunden verwendet, und er schläft seit dem). |
Ok, muß ich mal ausprobieren. Man soll ja auch nicht zu oft abfragen. Alle Minute, wäre natürlich gut |
Es gibt jedenfalls eine Limitierung, aber 1/Minute funktioniert bei mir seit Monaten zuverlässig. |
How can I check if the vehicle is sleeping or awake? Perhaps it the temp == null?? But this seems me a workaround.
Could you please implement a command for this? I think it is always implemented in your code but not wired ouside!?
Thanks
LInks:
https://support.teslafi.com/en/knowledge-bases/2/articles/640-enabling-sleep-settings-to-limit-vampire-loss
https://www.domoticz.com/forum/viewtopic.php?p=240152#p240152
The text was updated successfully, but these errors were encountered: