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

Nexa Doorbell push button - not triggering an event #48

Open
olterman opened this issue Jun 3, 2024 · 11 comments
Open

Nexa Doorbell push button - not triggering an event #48

olterman opened this issue Jun 3, 2024 · 11 comments
Labels
bug-nexa Something wrong with device or firmware device-nexa investigation Needs investigation

Comments

@olterman
Copy link

olterman commented Jun 3, 2024

So the device now shows up as an entity in HA but the sensor is always on (this is a Nexa issue aand not an issue with this HA implementation ) however it should still trigger a state change event each time its pushed updating the last time triggered.

In the logs I get:

2024-06-03 21:21:40.785 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] [LLyDHieHFLqEERa3] Updating 'notificationPushButton' from value -> True  

this is in the section:

"lastEvents": {
  "notificationPushButton": {
    "value": true,
    "prevValue": true,
    "time": "2024-06-03T14:35:26.816Z",
    "name": "notificationPushButton"
  }
}

somehow we need to be able to check the time so that we can see that it's been changed .... maybe this just reflects my poor command of how to use HA ... but since the value is always true and the prev value is always true all that is changing is time

I dunno if this can be fixed on "our" side of things but if it can I think it'll be about a 100 years before nexa fixes so the button switches to off when its not pushed.

@andersevenrud

This comment was marked as resolved.

@andersevenrud
Copy link
Owner

andersevenrud commented Jun 3, 2024

Just to explain my change in that PR and why.


This integration holds a map of all the capabilities that the Nexa Bridge reports, which is referenced in the "events" given by any device.

I've just gone with whatever is documented officially and then add anything they forgot whenever I get an issue here on Github. Just like the one you found and was added in that PR :)

This should in turn make the entities inside HA work as expected because now the integration is aware of all of the capabilities and translates the events into something HA understands.

somehow we need to be able to check the time so that we can see that it's been changed

FYI: There are two update mechanisms in this integration:

  1. The poll, which happens every minute (or whatever is configured) over bridge HTTP API
    • This is what discovers all of your devices
    • This is also a fallback in case 2 is not working
  2. Reading push messages over the bridge Websocket
    • This is what gives the instant HA entity updates when a device state changes

Both of these compares the timestamps in the event to ensure the latest one is used.

@olterman
Copy link
Author

olterman commented Jun 3, 2024

OK so ... Now if I reload the integration the state switches to unknown, when i push the button it turns to on and stays on until the next reload. if i push the button more times, technically it should register a new state (even though the new state is also on) however no event is triggered after the first.

in the log I see this line:

2024-06-03 22:38:59.768 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] [LLyDHieHFLqEERa3] Ignoring 'notificationPushButton' from node 

I dont know if that has any significance

@olterman
Copy link
Author

olterman commented Jun 3, 2024

Oh and just to add, in the nexa bridge app I get a notification that the button is pushed and last event time updated.

@andersevenrud
Copy link
Owner

Okay, so if I understand things correctly:

  • You are running the latest update
  • The entity is stuck in an "On" state
  • However the Nexa App reflects the actual value

Is it always stuck in on on state in the "lastEvents" if you don't touch it from HA ?


It could be useful to enable this debug line to see if there are any push messages related to the device:

#_LOGGER.debug("Coordinator update message: %s", data)


in the log I see this line: 2024-06-03 22:38:59.768 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] [LLyDHieHFLqEERa3] Ignoring 'notificationPushButton' from node

I dont know if that has any significance

This would mean that an update did not yield any new value (timestamp is the same as last time).

@andersevenrud

This comment was marked as resolved.

@andersevenrud andersevenrud added bug Something isn't working 1.7.3 Bridge 2 (Old firmware) investigation Needs investigation and removed 1.7.3 Bridge 2 (Old firmware) labels Jun 3, 2024
@andersevenrud
Copy link
Owner

I dunno if this can be fixed on "our" side of things but if it can I think it'll be about a 100 years before nexa fixes so the button switches to off when its not pushed.

If the Nexa app is reporting things correctly then there should be a way to solve it inside this integration. Looking at your log in #6 this seems like it's maybe not a z-wave device ?

@olterman
Copy link
Author

olterman commented Jun 3, 2024

so, Yes I updated to 2.4 so no more legacy, secondly yes I deleted the integration and started from scratch after upgrade.. three after uncommenting the logging line I keep getting this

2024-06-04 00:00:52.642 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] [SZCDnYfym32tIA6t] Updating 'notificationPushButton' from value -> True
2024-06-04 00:00:54.536 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] [SZCDnYfym32tIA6t] Updating 'notificationPushButton' from value -> True
2024-06-04 00:01:04.014 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] [SZCDnYfym32tIA6t] Updating 'notificationPushButton' from value -> True
2024-06-04 00:01:07.882 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] [SZCDnYfym32tIA6t] Updating 'notificationPushButton' from value -> True
2024-06-04 00:01:09.886 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] [SZCDnYfym32tIA6t] Updating 'notificationPushButton' from value -> True

@olterman
Copy link
Author

olterman commented Jun 3, 2024

going to bed now will pick this up on thurssday after I celebrate my daughters graduation from highschool :)

@andersevenrud
Copy link
Owner

andersevenrud commented Jun 3, 2024

after uncommenting the logging line I keep getting this

If you expected to see "False" here at any point then this surely is some kind of firmware bug. There are some undocumented API endpoints that I've discovered that might help in this situation.

But what would be of enormous value would be some kind of recording with browser devtools of what's going on inside the Nexa App (more spesifically the Web UI they provide directly on the bridge) to see how they do the value updates.

going to bed now will pick this up on thurssday after I celebrate my daughters graduation from highschool :)

Time to hit the sack here as well. Looking forward to hear back from you. I'll do some digging on my end.

And the best of wishes to you and yours!

@andersevenrud
Copy link
Owner

NOTE TO SELF: There might be a push message with an unknown pattern, which would be ignored in the debug log. Provide an example on how to get a dump of any message.

@andersevenrud andersevenrud added bug-nexa Something wrong with device or firmware and removed bug Something isn't working labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-nexa Something wrong with device or firmware device-nexa investigation Needs investigation
Projects
None yet
Development

No branches or pull requests

2 participants