Open Cazzar opened 2 years ago
From some further digging, and debugging, I found that the issue is due to the alert for example:
{
"name": "PINV_a004_uv_amplitude",
"value": 11,
"units": "Vrms"
}
As it seems that value
can contain int
values, updating https://github.com/foogod/go-powerwall/blob/76b5c92c9b515125d0870d3df42a3707838e5483/types.go#L64 to
Value interface{} `json:"value"`
will make it parse correctly in my case, though the other issues have not been investigated.
Though given that this change on it's own will then drop the units
value, another option might be best looked into.
Any chance of getting the current issues/PRs reviewed and merged?
I‘ve done a fork- feel free to open PRs there.
Oof, that's a shame but thanks for stepping up.
While using powerwall_exporter I noticed that from my powerwall I am seeing the decoded_alert is showing a string of json data instead of directly nesting JSON data:
example JSON (some details redacted for privacy:
error message from
powerwall_exporter