I’ve been an OpenHAB user for a while (5/6 years?), and have had a Tesla M3 for about 4 years now, and am finally getting around to leveraging the Tesla binding do some automation. Thanks to all the amazing people who have contributed to both OpenHAB and these bindings. It really is an amazing framework! Even after all these years in OpenHAB, I’m still impressed with the things I’m regularly discovering (or finally understanding).
Specifically, I’m scripting a rule to open my community gate (DoorBird) and my garage door when I come home, and close the garage door when I leave.
I’ve got the binding working, but the event stream only seems to update every minute, as long as the vehicle is moving. I can’t get it to stream any more frequently (docs/code suggest that it should be every 10-15 seconds). Unfortunately, every 60 seconds is the difference between the gate opening too early, and closing again before I actually get there (if the my trigger distance is too far) (I think its programmed to only stay open for 30 seconds), or that it doesn’t trigger soon enough, as I’m sitting at the gate waiting 20-30 seconds for the binding to update that I’m approaching home.
In my logs, I can see where it subscribes to the events, I see the “Hello” response. But, I also see from the logs the message “the car hasn’t moved in 5 minutes…” typically followed within a couple seconds by a “Movement detected.”
It seems as though there is a state conflict regarding whether the vehicle is moving or not. I’ve tried different combinations of the Drive State, Console/Occupancy Detection (under the Advanced parameters), but it doesn’t seem to matter. Updates are always every 60 seconds.
I had collected some driving logs, but most of them got overridden as the Trace level overran my log4j roller rules faster than I anticipated. I need to collect fresh ones (next time my son is over so one of us can manage the PC/connection while the other drives), but thought I’d start the topic anyway, in the hope that there is something obvious that I might have missed.
I did confirm that I am running 3.4.4 of the Tesla binding. I don’t believe I have seen a newer version, but its possible I might have missed it. I try to keep my OpenHAB up to date with the latest release (stable).