TeslaLogger icon indicating copy to clipboard operation
TeslaLogger copied to clipboard

MQTT Subtopics not updated.

Open adnet-solutions opened this issue 2 years ago • 11 comments

i setuped MQTT as subtopics. But the subtopics like TLGeofence / IsHome / ... are not updated sometimes. Funny fact is that the whole JSON is updated, only the subtopics are not updated. I use the actual Version 1.54.26.0

adnet-solutions avatar Aug 25 '23 08:08 adnet-solutions

@bassmaster187 : any update on that? its looks like that the MQQT Subtopics are nnot updated at all. Intressting is maybe following message in Log: 05.09.2023 09:24:31 : #2[StreamAPIThread_2:22051]: Stream: Timeout 05.09.2023 09:24:54 : 05.09.2023 09:24:54 : System.ArgumentNullException: String reference not set to an instance of a String. 05.09.2023 09:24:54 : Parameter name: s 05.09.2023 09:24:54 : at System.Text.Encoding.GetBytes (System.String s) [0x00015] in :0 05.09.2023 09:24:54 : at MQTTClient.Program.Main (System.String[] args) [0x003cb] in <1cebee9cf7744884980615679fc3cda7>:0 05.09.2023 09:25:25 : 05.09.2023 09:25:25 : System.ArgumentNullException: String reference not set to an instance of a String. 05.09.2023 09:25:25 : Parameter name: s 05.09.2023 09:25:25 : at System.Text.Encoding.GetBytes (System.String s) [0x00015] in :0 05.09.2023 09:25:25 : at MQTTClient.Program.Main (System.String[] args) [0x003cb] in <1cebee9cf7744884980615679fc3cda7>:0 05.09.2023 10:00:07 : TeslaLogger process statistics

adnet-solutions avatar Sep 05 '23 09:09 adnet-solutions

It looks like the ArgumentNullException was fixed with MQTTClient 2.2.0.1 with #1016 but the last commit on actual TeslaLogger/bin/MQTTClient.exe was 721d3b3 from May 5h 2022. So updating the actual exe should fix this issue

motzky avatar Sep 18 '23 13:09 motzky

could you please check if it works now with a manual update

bassmaster187 avatar Nov 13 '23 11:11 bassmaster187

@bassmaster187 : I‘m just a user and not so familiar with github and manual updates. How can i update my actual version with the fixed one to test it? Just download and exchange the MWTTClient.exe on the raspberry?

adnet-solutions avatar Nov 13 '23 14:11 adnet-solutions

admin panel / update

image

bassmaster187 avatar Nov 13 '23 14:11 bassmaster187

looks good to me. On my installation no more MQTT related exceptions in log 👍

motzky avatar Nov 13 '23 14:11 motzky

i have updated now. not sure how often or on which events the subtopivcs should be updated. But i switched on the "Sentry Mode" and i got a update using MQTT in IOBRoker from "false" to "true" which looks ok. but after that i swiched of the "Sentry Mode" again using the Tesla App but i did not get any updatre in IOBroker means over MQTT from Teslalogger. There the "Sentry Mode" is still "true" for 5 arround minutes. Just now diuring writing that update here the value changed in MQTT to "false" i was expecting that if car change a value the Teslalogger direct get a update. or how that is working? how often the updates are send if the car stand and is awake and a car value changed?

adnet-solutions avatar Nov 13 '23 14:11 adnet-solutions

As per my understanding the MQTT-Client polls every few seconds the currentJson-Endpoint (not sure about the exact intervall but should be around 5-10 seconds - it's a few days since i read the code ;)).

Your experience could be related with my issue, that I have since today: The JSON just get partial (or no) updates, so the driving state for example is "false" all the time but online-state changes correctly.

The real crazy thing is: All states are correct in Teslaloggers Admin panel, and also if the current_json gets polled directly in a (the same) browser but is completly rubbish when an external application polls the json. As the MQTT-Client is a separate application - this could be reletated.

I will have a closer look on this later on.

Undefined-None avatar Nov 13 '23 19:11 Undefined-None

what i could find out: The internal :5000/currentjson will create a different response than calling /current_json.php i have no idea whats going on. :(.

I have two cars, for one of them the :5000/currentjson creates the identical json as /current_json.php. For the other car i get different results. In my example the geofence for "at home" is wrong in :5000/currentjson but correct in /current_json.php. As far as my research goes, the current_json.php just calls the internal endpoint.

Undefined-None avatar Nov 13 '23 20:11 Undefined-None

There the "Sentry Mode" is still "true" for 5 arround minutes. Just now diuring writing that update here the value changed in MQTT to "false"

please check in this moment if admin panel shows plausible values. MQTT checks "currentJSON" each second, and if there any changes all values will be updated.

Adminius avatar Nov 14 '23 12:11 Adminius

please use new MQTT Client

Adminius avatar Feb 26 '24 08:02 Adminius