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

Consider logging validation failures in Things.setThingProperty #3175

Open
jamesmf opened this issue Nov 7, 2024 · 2 comments
Open

Consider logging validation failures in Things.setThingProperty #3175

jamesmf opened this issue Nov 7, 2024 · 2 comments

Comments

@jamesmf
Copy link

jamesmf commented Nov 7, 2024

I found when setting the value of a zigbee light through the UI, it often took two or more attempts to succeed.

I checked the network tab and it looked like the PUT requests were firing with valid-looking payloads ({"level":75.8} failed while {"level":42.5} worked fine a moment later). So I checked the logs and it seems to be failing here.

I'm wondering if it's sensible to log the specific validation errors to help troubleshoot when these issues come up.

I tried a resend with {"level":75.8} and it failed again, but then an edit-and-resend of {"level":75.9} succeeded. Weirdly many (but not all!) values ending in .8 failed.

Thanks for continued work on a great project!

@benfrancis
Copy link
Member

Hi @jamesmf, thanks for reporting. What a strange bug!

I'm not able to reproduce this on the master branch with a Virtual Dimmable Light web thing, which suggests it could either already be fixed on the master branch (where the set property payloads look a bit different), or be specific to the Zigbee add-on or even the specific model of device. If the latter was the case though it would be odd for the error to happen at the gateway model layer rather than in the Zigbee add-on process, so it's also possible the problem is intermittent.

So that I can try to reproduce this it would be helpful if you could provide more details:

  • The version of WebThings Gateway you're using and how you installed it
  • The Zigbee device you're using
  • The exact error you're seeing

Thank you.

@jamesmf
Copy link
Author

jamesmf commented Nov 7, 2024

I'm seeing 400 error reponses with Invalid property value. They show up in the logs of the gateway and they are the response to the PUT in my browser. The logs don't have any other detail, just timestamps and 400 - Invalid property value

I am using v1.1.0 with automatic updates enabled, last update Jan 05 2023.

I'm running on a pi 3 and I'm honestly a bit fuzzy on what version I would have flashed, I followed a guide a very very long time ago before the documentation on using docker was great. I should probably refresh the whole setup at some point but I don't yet have full confidence I know how to mount the zigbee device properly. If I were using docker I am guessing I could much more confidently just edit the file to add the log myself 🤔

I bought the usb zigbee dongle a long time ago, but if you have thoughts on the best way to get whatever detail would be helpful, I'll get those too, sorry!

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

2 participants