powerwall2: Found a new endpoint, but it returns a binary file
https://teg/api/devices/vitals
Good old strings returns some interesting tidbits:
THC_STATE_AUTONOMOUSCONTROL
THC_AmbientTemp!
I’d love to get temperature info from my gateway/inverter/battery since I was having problems with my brand-new Tesla 7.6kW inverter because it was installed with low coolant, and until it got topped off last week, was throwing “Inverter Over Temperature” alerts (which after a recent update, were only visible after logging on as Installers instead of Customers. Super-shady.)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 32 (17 by maintainers)
With a little work, I was able to parse out most of the vitals file. Here is the text result. The first column is the number of bytes into the file where the parser found the start of an object. This will probably vary since differences in the text string lengths affects the file size.
A new delimiter was found: if a 0 (ascii zero) appears after the object then the value is TRUE or FALSE, and is represented by a binary 1 or 0 in the next byte. I show TRUE or FALSE when this occurs.
Glad to see that the protocol buffer example helped. 😃 There were some errors in what I put together, so I forked your branch to update it. Hopefully this update will help flush out any issues your might be seeing and/or include fields I didn’t have before that might be silently ignored.
DOH, I just saw you already published a bash script that’s far more elegant than mine. I will create a PR for the vitals endpoint I discovered. :-}