Comments (6)
So in your logs I see
21:29:06 ... {"percent": 54}
21:29:07 ... Command result: {'response': {'result': True, 'reason': ''}}
21:29:10 ... Response JSON ...charge_limit_soc': 54
Which means you made the change at second 6, it took effect and wrote a state change at second 7, and then a refresh ran with the new value returned at second 10. I am unsure how this would do a snap back.
However, the change from int to float is interesting and something I can address, so I have put in a fix for that and well see if it helps with the snapbackk.
from hass-teslemetry.
Key line is at second 20 in that log, where "ChargeLimitSOC" comes back as "50", even after the car received the commands (and Tesla app updated to show) the Charge Limit being set to 54:
2024-05-10 21:29:20.628 DEBUG (MainThread) [teslemetry_stream] event {"data": {"ACChargingPower": "0.000", "ChargeAmps": "16", "ChargeLimitSoc": "50", "Odometer": "12602.168"}, "createdAt": "2024-05-11T03:29:20.174216209Z", "vin": "myvin", "timestamp": 1715398160174}
I've disabled automations, node red flows, everything that might be writing a different value for Charge Limit without my knowledge. But I can absolutely reproduce this 100% of the time. Just noticed that the length of time the old value is snapped back is sometimes up to 3 minutes, not just the one minute in my original bug report. Makes me wonder if there is some kind of lag / delay on your (US-West?) server side that is slowing down or caching old teslemetry_stream data?
I pulled a fresher log again this morning (UTC -0600 here), but its the same lines and behavior as the log I already posted. I also took screenshots to document as well. Let me know what of that you want.
from hass-teslemetry.
Another clue:
I watched the web GUI "Telemetry Configuration for..." and the SSE events shown on there also affected/delayed. I did a Call:service number:set on number.mycar_charge_limit to 51 within 5 seconds after 9:41:31AM update tick, but the results don't make it to SSE until the 9:43:31 tick. The 9:42:31 tick had the old value:
9:41:31 AM data { "ChargeAmps": "16", "ChargeLimitSoc": "53", "Odometer": "12602.168", "ACChargingPower": "0.000" }
9:42:31 AM data { "ChargeAmps": "16", "ChargeLimitSoc": "53", "Odometer": "12602.168", "ACChargingPower": "0.000" }
9:43:31 AM data { "ChargeAmps": "16", "ChargeLimitSoc": "51", "Odometer": "12602.168", "ACChargingPower": "0.000" }
from hass-teslemetry.
If streaming is also involved... it gets even more messier. I would have to rework the timestamp system to ignore streaming updates that occur within ~5 seconds of a command, or just accept snap backs can happen due to unlucky timing.
from hass-teslemetry.
I just thought to check what happens if I adjust the charge limit via the Tesla app instead. Sure enough, SSE ticks held old data for that case as well.
from hass-teslemetry.
The plot sickens ...
I am now seeing stale data in the teslemetry fleet api JSON response elsewhere. Tesla app is reporting battery SOC of 94% as I get ready to leave on a drive, but the api JSON has 'battery_level': 95
instead. Ugh.
Looks like the app goes by the "SOC" field value, not the "battery_level" field value, and the rounding method is different to boot. Will keep watching this during the drive to see if I can tease out any other pattern...
from hass-teslemetry.
Related Issues (20)
- Model details for Powerwall HOT 3
- Energy remaining sensor - no statistics found HOT 2
- Device registry firmware version doesn't seem to update HOT 1
- Call:service switch:turn_on against switch.mycar_charge while it is already on gives error HOT 1
- Using service to set number.mycar_charge_limit to its current value gives error, blocks automation HOT 7
- FR: don't force number entities UI presentation to be "box" HOT 1
- Teslemetry command failed, An error occurred while processing the request. HOT 5
- FR/question: Sensor for current driver profile in use? HOT 2
- Service call to navigation_request endpoint gives various errors HOT 3
- Valet Mode switch isn't working HOT 5
- Vent Windows cover isn't working HOT 4
- New (calculated) Sensor: BrickVoltageDelta HOT 1
- Powerwall off_grid_vehicle_charging_reserve_percent not updated in sensor HOT 5
- Storm Mode switch not functional
- Error when sending a command and the car is moving. HOT 3
- Firmware not updated in the integration page HOT 1
- Teslemetry errors in log. Shortly after the errors, Home Assistant crashes HOT 9
- Error starting up with Powerwall only HOT 2
- Setting number.tessy_charge_current complains about number.tessy_charge_limit is outside valid HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hass-teslemetry.