Skip to content
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

HTTP+JSON PowerMeter: Strings not accepted #1104

Closed
schlimmchen opened this issue Jul 13, 2024 Discussed in #1049 · 2 comments · Fixed by #1105
Closed

HTTP+JSON PowerMeter: Strings not accepted #1104

schlimmchen opened this issue Jul 13, 2024 Discussed in #1049 · 2 comments · Fixed by #1105

Comments

@schlimmchen
Copy link
Member

Discussed in #1049

Originally posted by oszi-xx June 15, 2024
I'm using a SHRDZM (ESP8266) to read my power meter data. Up to now it was working. After update to latest version
I got error if I'm using same settings (newer than 2024.01.04 )
[HttpPowerMeter] not a float: '69'
How can I solve the problem .

@schlimmchen
Copy link
Member Author

The issue at hand is that the JSON looks like this:

{
"timestamp":"2024-06-16T07:52:40",
"32.7.0":"238.10",
"52.7.0":"238.70",
"72.7.0":"238.40",
"31.7.0":"0.00",
"51.7.0":"0.00",
"71.7.0":"1.36",
"1.7.0":"223",
"2.7.0":"0",
"1.8.0":"2877154",
"2.8.0":"41250",
"3.8.0":"51536",
"4.8.0":"499860",
"16.7.0":"223",
"uptime":"0000:20:07:15"
}

The values, which are indeed numeric, are encoded as strings. The source of this JSON is stupid and does not use JSON as expected, but we should be tolerant and handle this gracefully.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant