NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.
https://www.homebridge.ca
446 stars 77 forks source link

WARNING: ( homebridge-alexa) Dropped event message, message rate too high. #458

Closed Pblondin123 closed 2 years ago

Pblondin123 commented 2 years ago

Hi, thanks for the plugin, much used at our home. I recently added 4 motion sensors to HB (via envisalink) which are pretty active on events. This caused in my view the dropped event message, so i used the allow devices list feature from the Alexa plugin. Went from 80+ to 30+ devices discovered by the Alexa plugin, obviously without the motion sensors as i don't need to monitor them in Alexa. My problem is that i still get the message rate too high message even with 30+ devices. Is the objective of the allow list to filter on the traffic going out or am i misusing the feature perhaps ? Thanks!

NorthernMan54 commented 2 years ago

Give me a few days to look at the how the HomeKit event registration logic works with filtering. My gut says that the device filtering is only applied to the Alexa discovery response, and not on the HomeKit event registration. ( If a device is not registered for events, then events are not generated on change triggering the message)

NorthernMan54 commented 2 years ago

Are you using routines triggered by Homebridge events ? If not you can turn of routines in the config, and it will disable event registration.

Pblondin123 commented 2 years ago

Hi, pretty much all my Alexa routines are triggered by HB events, so i will leave config on correct? thnks

NorthernMan54 commented 2 years ago

Correct, just checking for a quick workaround

On Aug 19, 2021, at 1:37 PM, Pblondin123 @.***> wrote:

 Hi, pretty much all my Alexa routines are triggered by HB events, so i will leave config on correct? thnks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

NorthernMan54 commented 2 years ago

@pwilms Any thoughts on this ?

joaodforce commented 2 years ago

I seem to be having the same issue. I have 6 cameras with motion sensing and and 2 contact sensors, however I only exposed one of the contact sensors (which im using as a doorbell) and my garage door, but it seems the plugin is sending updates from everything.

I'm using v0.5.39 Tell me if additional debugging information is needed.

I only have one routine in my alexa, which is to play a doorbell sound on my echo dot whenever the doorbell contact sensor triggers

image
NorthernMan54 commented 2 years ago

Just a quick update, I working thru updating the device filtering logic to also filter event registration. Expect a pull request once I have completed the coding and testing.

Pblondin123 commented 2 years ago

Hi, i just installed homebridge-alexa v0.5.42, still getting the warning message. Not sure if this update was the one with the fix thnks

NorthernMan54 commented 2 years ago

No, 0.5.42 was a tuning of the cloud server connection. I’m still working on this.

NorthernMan54 commented 2 years ago

Everyone,

I have released a beta that implements device list filtering for event registration. If you can install the latest beta, and if you have implemented devicelist filters, it should now filter them from events.

Pblondin123 commented 2 years ago

Everyone,

I have released a beta that implements device list filtering for event registration. If you can install the latest beta, and if you have implemented devicelist filters, it should now filter them from events.

Hi! good news, sorry am not sure how to download the beta i'll wait for techy colleagues to test but will provide feedback for sure after it will be in prod

joaodforce commented 2 years ago

Great news, im installing the beta, will do some tests and get back to you. @Pblondin123 To install the beta, you go to homebridge ui plugins page, click the little wrench, and pick "install previous versions" and in the list the beta should appear

Pblondin123 commented 2 years ago

Great news, im installing the beta, will do some tests and get back to you. @Pblondin123 To install the beta, you go to homebridge ui plugins page, click the little wrench, and pick "install previous versions" and in the list the beta should appear

Thanks! v0.5.49 installed and running on my HB. 19/36 devices in the list. will monitor thanks

Pblondin123 commented 2 years ago

Great news, im installing the beta, will do some tests and get back to you. @Pblondin123 To install the beta, you go to homebridge ui plugins page, click the little wrench, and pick "install previous versions" and in the list the beta should appear

Thanks! v0.5.49 installed and running on my HB. 19/36 devices in the list. will monitor thanks

Hi again, just wanted to report that am still getting the Dropped event message, message rate too high message. I have 4 live motion detectors (2 more than the other 2), not sure if this is helping your troubleshoot thanks.

joaodforce commented 2 years ago

Same here.

image
NorthernMan54 commented 2 years ago

The beta should have enabled device filtering for event sources, this was not previously implemented in the plugin. I made a minor tweak to the DEBUG logging, to include more details about what device's are event enabled. You should be able to validate that the device filtering is working correctly by looking at the 'registerEvents' log message. This will appear shortly after startup.

NorthernMan54 commented 2 years ago

@joaodforce if you enable debug logging, it will log each event message so you can see some details around the devices sending messages. Mind you the details you see are pretty cryptic, as they are the internal message format but may give some clue into the trigger.

joaodforce commented 2 years ago

@NorthernMan54 I enabled debug mode as you suggested. and got some info, I attached the full startup logs in case you want to check it, but from What I saw in the alexaActions registerEvents log, the registered Events still holds more itens than what I'm exposing with DeviceList allow list.

This is my current config in case you need it.

{
            "name": "Alexa",
            "username": "joaodforce",
            "password": "secret",
            "pin": "565-xx-xxxx",
            "routines": true,
            "blind": false,
            "door": false,
            "debug": true,
            "deviceListHandling": "allow",
            "deviceList": [
                "Campainha",
                "Device13e337"
            ],
            "platform": "Alexa"
        }

HomeBridge Start Logs.txt

NorthernMan54 commented 2 years ago

Tks that helps, let me validate that config

NorthernMan54 commented 2 years ago

@joaodforce I made a minor change to the beta release. Please update to the latest beta and try again.

Pblondin123 commented 2 years ago

so far so good i believe (haven't seen the warning message in the log). After some testing it looks like my motions that were not going thru are now. Heads up though: the allow list does not take devices that have space in it, i.e. 'One Two Three' did not go thru. I changed my device name (now changing my shortcuts.

dustindclark commented 2 years ago

Was here to report the same issue, and glad to find out there's a fix! Testing the new version now and will report any issues.

dustindclark commented 2 years ago

seems to be working great. In fact, works better than before. I didn't realize that my other automation triggers were being blocked because of dropped messages, but everything works consistently now. Good work.