-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Tesla] Add event stream & handling post new authentication process #13116
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting a
08:59:53.057 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.tesla.internal.handler.TeslaVehicleHandler@58e4ad2d': null
java.lang.NullPointerException: null
at org.openhab.binding.tesla.internal.handler.TeslaVehicleHandler.initialize(TeslaVehicleHandler.java:156) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [org.openhab.core-3.4.0-SNAPSHOT.jar:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [org.openhab.core-3.4.0-SNAPSHOT.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
which seems to be due to the fact that you missed to add the new parameter to the config descriptions in the OH-INF/thing
thing desciption files.
...nding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaEventEndpoint.java
Outdated
Show resolved
Hide resolved
...ding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java
Outdated
Show resolved
Hide resolved
...ding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java
Outdated
Show resolved
Hide resolved
...ding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java
Outdated
Show resolved
Hide resolved
...ding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java
Outdated
Show resolved
Hide resolved
...ding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java
Outdated
Show resolved
Hide resolved
...ding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java
Outdated
Show resolved
Hide resolved
...g.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/protocol/Event.java
Outdated
Show resolved
Hide resolved
e7e9bd0
to
1546111
Compare
…y Tesla Signed-Off-By: Karel Goderis <karel.goderis@me.com>
@kaikreuzer Done. |
Thanks @kgoderis! I just tested it and have some issues, where I'd need your input:
I am not perfectly sure, if it is related to this PR or if it happens without it already, but I wonder if you can reproduce this?
But after this, the only event I ever see is
Changes of the vehicle state only come in through the regular polling, but I do not see any immediate events being sent for them. |
This I have not observed, but I only tested the PR in Eclipse. I will check it
Well, what I know is that if the vehicle is not moving, or does not have a reason to report data, the stream basically times out after 10 seconds or so. At least on my old Model S (yes, still driving that one after 7 years LOL) I do get the hello message, and exactly one regular event. Maybe things are different for the newer cars or other models. What I observe seems to be in line with timdorr/tesla-api#97 but I have not had the time yet to test things fully when actually driving with my laptop on my lap. |
I actually saw this when testing in Eclipse.
Ok, I can try to test as well, once I am back home from vacation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now had a chance to test it when my wife drove with the car - at least when I started openHAB while the car was in motion, I received events every second (mainly location updates). Once the car parked, the websocket was immediately closed again. Not sure if everything works to also recover the stream once the car moves again, I didn't see this.
But all in all, it didn't seem to cause any issues, so let's finally merge this PR!
…y Tesla (openhab#13116) Signed-Off-By: Karel Goderis <karel.goderis@me.com>
…y Tesla (openhab#13116) Signed-Off-By: Karel Goderis <karel.goderis@me.com>
…y Tesla (openhab#13116) Signed-Off-By: Karel Goderis <karel.goderis@me.com>
…y Tesla (openhab#13116) Signed-Off-By: Karel Goderis <karel.goderis@me.com> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Does this still work as expected? In the logs, I never see the
|
…y Tesla (openhab#13116) Signed-Off-By: Karel Goderis <karel.goderis@me.com>
…y Tesla (openhab#13116) Signed-Off-By: Karel Goderis <karel.goderis@me.com>
…y Tesla (openhab#13116) Signed-Off-By: Karel Goderis <karel.goderis@me.com>
[Tesla] Add event stream & handling post new authentication process by Tesla
Signed-Off-By: Karel Goderis karel.goderis@me.com