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

Faulty payload of Widget 3 as scene #8

Open
R1N4x opened this issue Jan 3, 2022 · 5 comments
Open

Faulty payload of Widget 3 as scene #8

R1N4x opened this issue Jan 3, 2022 · 5 comments

Comments

@R1N4x
Copy link
Contributor

R1N4x commented Jan 3, 2022

So I found a weird bug while testing widgets, especially scenes.

If I set the index 3 widget as a scene the MQTT output has an additional brace at the end breaking the parsing.

Console output:

23:28:57.903 NSP: Received Raw = bytes('55AA860A007B226964223A2233227D7DAF00')
23:28:57.915 bytes('7B226964223A2233227D7D')
23:28:57.931 MQT: tele/NSPanel/RESULT = {"NSPanel":{"id":"3"}}}

My quick and dirty workaround so far: R1N4x:widget-3-fix

@blakadder
Copy link
Owner

That's a second report of malformed JSON. Need to investigate whether its a bug in the NSPanel firmware or the drives is reading something incorrectly

@martingrayson
Copy link

I can also confirm widget 3 gives me some funky result when using a scene. I've been scratching my head for a few days, its good to see someone else has spotted the malformed payload!

@yvesdm3000
Copy link

I think the parsing code in nspanel.be is wrong, the piece where it finds the end is done by searching for the '}' character, but if there is some additional data that also happens to be 0x125 (== curly close brace) then it points to the wrong data at the end of the payload.

@yvesdm3000
Copy link

See #27

@slime1982
Copy link

Was this ever fixed? I've just run into this exact problem with the extra } on 3. It's preventing my rule (triggered by NSPanel#id) from running when selecting 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants