-
Notifications
You must be signed in to change notification settings - Fork 27
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
MQTT - Flat array with plain values expanded incorrectly #1424
Comments
The following change in mqttgateway.pl leads to the desired output.
which produces the following output:
|
This is the same issue as #1383 Array parsing is difficult because of the missing key in an array, and different expectations how the result should be forwarded. The current implementation has the functionality to get/find a concrete element in an array by setting the elements to TRUE. In an array [„orange“, „apple“, „strawberry“] it allows to find the element „orange“ on the Miniserver. Currently no idea how to handle this in a generic way. |
I see. Maybe providing both solutions in parallel is an approach that would make all of us happy. Each array could be expanded into an index based representation and into one that is value-presence based. I.e. in my case
|
Yes, good idea. |
A json array with plain numbers is expanded incorrectly.
16:13:17.402 MQTT IN: go-eCharger/221889/nrg: [229.71,2.17,2.17,3.72,0,0,0,0,0,0,0,0,0,0,0,0]
16:13:17.403 Expanding json message
16:13:17.403 Plain json array was converted to hash
16:13:17.404 go-eCharger/221889/nrg/3.72 = 1
16:13:17.405 go-eCharger/221889/nrg/0 = 1
16:13:17.405 go-eCharger/221889/nrg/2.17 = 1
16:13:17.405 go-eCharger/221889/nrg/229.71 = 1
The text was updated successfully, but these errors were encountered: