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

[BUG] MyStrom motion sensor stopped working after update to v2.0.5 #152

Closed
qx54 opened this issue Nov 30, 2020 · 44 comments
Closed

[BUG] MyStrom motion sensor stopped working after update to v2.0.5 #152

qx54 opened this issue Nov 30, 2020 · 44 comments
Assignees
Labels
bug Something isn't working

Comments

@qx54
Copy link

qx54 commented Nov 30, 2020

Describe the bug
I just updated to v2.0.5 and the MyStrom motion sensor stopped working. The log is getting flooded with entries:

[30/11/2020, 18:05:35] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 18:05:35] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:05:35] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 18:05:38] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:05:38] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:05:38] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:05:38] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:05:40] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 18:05:40] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:05:40] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 18:05:43] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:05:43] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:05:43] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:05:43] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)

To Reproduce
Steps to reproduce the behavior:

  1. In Homebridge update plugin to v2.0.5
  2. verify motion sensor is not working and find the [myStrom Motion Sensor] DEAD entry in the log

Expected behavior
Motion sensor should be working and not be marked as DEAD in the log.

@qx54 qx54 added the bug Something isn't working label Nov 30, 2020
@johannrichard
Copy link
Owner

I would assume you have set the motion sensor/plug-in to POLL mode? With my mock, "everything" works fine, so this is really weird.

I see a connection to #151 here. 🙈

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Update:

After unplugging and re-plugging the motion sensor worked again. But only for a couple of seconds or minutes before the DEAD state re-appeared in the log. Now I notice the state is alternating between DEAD and ALIVE.

When I access the API manually, I noticed it often takes a very long time for the page to load. Thus I guess the DEAD is because the timeout value gets exceeded. Not sure why the motion sensor suddenly doesn't work correctly anymore. Two things I can think of:

  1. The constant polling is somehow slowing down the device.
  2. There's network problems

Because the motion sensor shows a very high temperature of 25.6° whereas it used to be around 22°, I tend towards 1.

@johannrichard
Copy link
Owner

It's most definitely the polling then. Although it's supposed to only poll every five seconds or less often. Does the temperature improve if you switch to PUSH?

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

No POLL mode, I had it set to PUSH mode. Let me switch to POLL mode and see how that goes.
Although waiting up to 5 seconds for the light to turn on sounds horrible.

@johannrichard
Copy link
Owner

No poll mode. Let me switch to it and see how that goes.

Ah. With v2.0.0 I unified the event loop. Which means that certain devices get polled more often (5s) - and obviously don't like it. 😟:confused:

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Yes, it looks like it gets polled more often. Issue remains with POLL mode.

[30/11/2020, 18:38:27] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:27] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:38:27] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:38:29] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:38:31] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:38:32] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:32] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:38:32] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:38:34] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:38:37] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:37] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:38:37] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:38:37] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:38:41] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:38:41] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> recovered from unreachable state (192.168.1.137)
[30/11/2020, 18:38:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:44] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 18:38:47] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:38:47] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:49] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 18:38:50] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:38:52] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 18:38:57] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:57] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:38:57] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:38:57] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:38:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:39:02] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:39:02] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> recovered from unreachable state (192.168.1.137)
[30/11/2020, 18:39:02] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:04] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 18:39:07] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:07] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:39:07] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:39:07] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:39:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:39:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> recovered from unreachable state (192.168.1.137)
[30/11/2020, 18:39:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:39:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 18:39:17] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:17] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:39:17] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:39:17] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:19] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:39:22] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:22] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:39:22] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:39:22] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:39:26] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:39:26] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> recovered from unreachable state (192.168.1.137)
[30/11/2020, 18:39:27] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:29] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 18:39:30] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:39:32] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:32] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:39:32] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:39:34] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:39:37] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:37] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:39:37] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:39:37] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:39:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:39:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:39:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:44] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:39:45] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:39:45] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> recovered from unreachable state (192.168.1.137)
[30/11/2020, 18:39:47] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:49] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 18:39:52] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:52] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:39:52] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:39:52] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:39:57] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:57] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:39:57] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:39:57] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 18:40:01] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 18:40:02] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 18:40:02] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 18:40:02] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 18:40:04] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

FYI: I downgraded to 2.0.0-nightly.0 and will let you know how the temperature goes.

Any way I can see the polling logs?

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Now with the 2.0.0-nightly.0 the motion sensor also doesn't work.

Temperature of the sensor went down to 24.3° (from 25.1°), which is still higher than it used to be.
Edit: Temperature now even went down to 23.4°.

API now works without any problems, no long page loading times.

In the log I see only the buttons mentioned:

[30/11/2020, 19:17:20] [dingz and myStrom SmartHome platform] HTTP Response Error ->http://192.168.1.239/api/v1/action/generic
[30/11/2020, 19:17:20] [dingz and myStrom SmartHome platform] connect EHOSTUNREACH 192.168.1.239:80
[30/11/2020, 19:17:20] [dingz and myStrom SmartHome platform] HTTP Response Error ->http://192.168.1.98/api/v1/action/generic
[30/11/2020, 19:17:20] [dingz and myStrom SmartHome platform] connect EHOSTUNREACH 192.168.1.98:80

@johannrichard
Copy link
Owner

johannrichard commented Nov 30, 2020

Any way I can see the polling logs?

If you turn on the DEBUG log in the UI you will see lots of GET/POST entries.

For the records: I've had implemented a mutex in the old version to avoid overloading the devices with new requests when requests timed out. However, this brought problems of its own as the the pipeline just filled up and eventually no values were updated anymore (remember #123?).

So I removed that bit of code because of this in v2.0.0 (in my testing on a variety of devices I did not observe any issues so I kept the plug-in the way it is in v2.0.0). Only to find out today through #145 that in fact, it was not my devices that caused this, but a nasty bug in the module: DirtyHairy/async-mutex#27. 🤪🤣😳

@johannrichard
Copy link
Owner

johannrichard commented Nov 30, 2020

I've pushed a nightly to homebridge-dingz@2.0.6-nightly.1 -- you should find a new setting in the UI for an interval which is by default at 10s (you have to save the config and restart Homebridge, otherwise the minimum value of 5s will be kept). If you find some time to check how your log looks with a different interval, that'd be appreciated (See #151 for some more details).

@johannrichard
Copy link
Owner

If you find some time to check how your log looks with a different interval, that'd be appreciated

... and of course the 🤒 of your motion sensor ... 🙈

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Thanks, installed.

Sensor was first alive, but turned dead within a minute or so. Even the API is timing out when accessing it manually.

FYI: I have PUSH mode enabled, maybe it's related?

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

I noticed multiple log entries per interval:

[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 21:15:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 21:15:18] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.1.137:80 (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.1.137:80 (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.1.137:80 (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.1.137:80 (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.1.137:80 (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.1.137:80 (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.1.137:80 (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.1.137:80 (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 21:15:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP EHOSTUNREACH connect EHOSTUNREACH 192.168.1.137:80  --> 192.168.1.137

Maybe the new code is creating multiple requests per interval, essentially DOS-ing (denial of service) the motion sensor?

@johannrichard
Copy link
Owner

😓 I'm actually right now working on a fix for that. Both the base class and the PIR class were listening to the PlatformEvent.REQUEST_STATE_UPDATE event ... 🙈 🙉 🙊

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

MyStrom PIR: Stress test not passed 🤣

@johannrichard
Copy link
Owner

MyStrom PIR: Stress test not passed 🤣

🤣🤣🤣 I should have accepted that offer of yours for a real PIR sensor ... (joke apart, apologies for the trouble caused and thanks for helping with getting to the core of this. homebridge-dingz@2.0.6-nightly.2is ready to be tested on real PIR hardware).

@johannrichard
Copy link
Owner

😓 I'm actually right now working on a fix for that. Both the base class and the PIR class were listening to the PlatformEvent.REQUEST_STATE_UPDATE event ... 🙈 🙉 🙊

The interesting (I dare not say fun) fact about this is: it's not the length of the polling interval, it's just two subsequent (almost parallel) requests to the PIR, every 10 seconds, that bring them to their knees. Speak of how hard hardware (and software) are ...

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

No worries, I'm only getting picked on by my girlfriend because my smart home stuff never works resp. is not so smart 😢

Hm, so with homebridge-dingz@2.0.6-nightly.2 my PIR is still dead and I still can't connect to the API manually (timing out). Not sure if the device is broken. Gonna remove it from Homebridge and check via manual API requests if it comes back at all.

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Ok now it's getting strange. I still see the PIR mentioned in the logs, although I have removed it from the config and disabled auto-discovery.

[30/11/2020, 21:39:43] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP EHOSTUNREACH connect EHOSTUNREACH 192.168.178.137:80  --> 192.168.178.137
[30/11/2020, 21:39:44] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.178.137)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.178.137)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.178.137)
[30/11/2020, 21:39:59] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP EHOSTUNREACH connect EHOSTUNREACH 192.168.178.137:80  --> 192.168.178.137
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.178.137)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: connect EHOSTUNREACH 192.168.178.137:80 (GET http://192.168.178.137/api/v1/sensors)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.178.137)
[30/11/2020, 21:40:14] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP EHOSTUNREACH connect EHOSTUNREACH 192.168.178.137:80  --> 192.168.178.137

As you can see in the logs, the 15 seconds interval gets respected, but still multiple entries per interval.
Also it makes no sense for the PIR to appear at all. Maybe auto-discovery setting doesn't get respected?

My config:

{
	"name": "dingz and myStrom SmartHome platform",
	"pollerInterval": 15,
	"motionPoller": false,
	"autoDiscover": false,
	"devices": [
		{
			"type": "myStromButton",
			"name": "myStrom Button Office",
			"address": "192.168.1.98"
		},
		{
			"type": "myStromButton",
			"name": "myStrom Button Living",
			"address": "192.168.1.239"
		}
	],
	"platform": "Dingz"
}

Restarted Homebridge two times just to make sure.

@johannrichard
Copy link
Owner

No worries, I'm only getting picked on by my girlfriend because my smart home stuff never works resp. is not so smart 😢

Ah, the famous WAF/GAF... know that one too ... 🤣😢

Not sure if the device is broken. Gonna remove it from Homebridge and check via manual API requests if it comes back at all.
I hope it recovers 😓🤒. (I've seen my dingz during testing their limits sometimes take a few minutes until recovery. I would assume they have some kind of a watchdog which will bring them back to live ...)

@johannrichard
Copy link
Owner

As you can see in the logs, the 15 seconds interval gets respected, but still multiple entries per interval.
Also it makes no sense for the PIR to appear at all. Maybe auto-discovery setting doesn't get respected?

Did you remove the accessory from the accessory cache in Homebridge (In Homebridge Config UI X settings, "Remove Single Cached Accessory") and then restart Homebridge? If you just remove it from the config and turn it off, it will still be remembered by HomeBridge which will try to reach it. The logs you see look exactly like that (and since you unplugged it, the host can not be reached at all).

HB_Accessories_Cache

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Ah, the famous WAF/GAF... know that one too ... 🤣😢

I know WAF, but what's GAF? 😄

Cache it was. Thanks for the hint, wasn't aware of that setting.

The good news is: The PIR came back once it was removed from Homebridge.
The bad news: homebridge-dingz@2.0.6-nightly.2 isn't working 😞

UPDATE: I rejoiced too soon. The PIR is now not reachable via API. So it seems the PIR really is somehow broken. Unless there are still requests happening in the background which I can't see, causing a DOS.

@johannrichard
Copy link
Owner

GAF: Girlfriend Acceptance Factor. 😄

One question: In which sense do you think/see the homebridge-dingz@2.0.6-nightly.2 isn't working? Can you elaborate? If you have the DEBUG log enabled, you should see all requests made by the plugin.

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Not sure how to turn on DEBUG. In the UI on the top right menu when choosing 'Homebridge Settings' there's a text field DEBUG under Environment Variables. Do you mean this? I entered TRUE in the text field, but not sure if I'm seeing more now.

FYI: I stopped the Homebridge service for a while and the PIR came back without DOS. Then I re-enabled the Homebridge service (with the PIR still removed from the conf) and the PIR is still responding and has a normal temperature.

@johannrichard
Copy link
Owner

Not sure how to turn on DEBUG. In the UI on the top right menu when choosing 'Homebridge Settings' there's a text field DEBUG under Environment Variables. Do you mean this? I entered TRUE in the text field, but not sure if I'm seeing more now.

Just above should be the Homebridge Debug Mode switch. Turn that on, restart Homebridge and your log should show all the GET/POST requests.

Homebridge Debug Mode -D

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Ok I'm officially blind.

Here's the logs:

[30/11/2020, 22:30:39] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:30:39] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:30:39] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:30:39] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:30:39] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:30:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:30:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:30:40] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:30:54] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:30:54] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:30:54] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:30:54] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:30:54] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:30:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:30:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:30:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:31:09] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:31:09] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:31:09] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:31:09] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:31:09] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:31:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:31:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:31:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:31:14] [dingz and myStrom SmartHome platform] HTTP Response Error ->http://192.168.1.98/api/v1/action/generic
[30/11/2020, 22:31:14] [dingz and myStrom SmartHome platform] connect EHOSTUNREACH 192.168.1.98:80
[30/11/2020, 22:31:15] [dingz and myStrom SmartHome platform] HTTP Response Error ->http://192.168.1.239/api/v1/action/generic
[30/11/2020, 22:31:15] [dingz and myStrom SmartHome platform] connect EHOSTUNREACH 192.168.1.239:80
[30/11/2020, 22:31:24] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:31:24] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:31:24] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:31:24] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:31:24] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:31:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:31:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:31:25] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:31:39] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:31:39] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:31:39] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:31:39] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:31:39] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:31:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:31:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:31:40] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:31:54] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:31:54] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:31:54] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:31:54] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:31:54] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:31:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:31:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:31:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:32:09] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:32:09] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:32:09] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:32:09] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:32:09] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:32:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:32:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:32:10] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:32:24] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:32:24] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:32:24] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:32:24] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:32:24] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:32:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:32:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:32:27] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:32:27] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 22:32:27] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 22:32:39] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:32:39] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:32:39] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:32:39] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:32:39] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:32:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 22:32:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:32:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Error: timeout of 3000ms exceeded (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:32:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> entered unreachable state (192.168.1.137)
[30/11/2020, 22:32:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] HTTP ECONNABORTED Connection aborted --> 192.168.1.137
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] DEAD (192.168.1.137)
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:32:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Device --> recovered from unreachable state (192.168.1.137)
[30/11/2020, 22:33:09] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:33:09] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:33:09] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:33:09] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:33:09] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:33:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:33:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:33:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:33:24] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:33:24] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:33:24] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:33:24] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:33:24] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:33:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:33:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:33:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:33:39] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:33:39] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:33:39] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:33:39] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:33:39] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:33:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:33:39] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:33:42] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:33:54] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:33:54] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:33:54] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:33:54] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:33:54] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:33:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:33:54] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:33:55] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:34:09] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:34:09] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:34:09] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:34:09] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:34:09] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:34:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:34:09] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:34:11] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:34:24] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.98)
[30/11/2020, 22:34:24] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:34:24] [dingz and myStrom SmartHome platform] [Button] ALIVE (192.168.1.239)
[30/11/2020, 22:34:24] [dingz and myStrom SmartHome platform] [Button] getDeviceStateUpdate() not implemented for MyStromButtonAccessory
[30/11/2020, 22:34:24] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:34:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:34:24] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:34:25] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)

Please note how the device went dead for two intervals.

More importantly, my Homekit rules are not reacting to motion. The motion is visible in the API when requesting manually, but no mention of it in the log.

Maybe the PUSH is not working? I'll switch to POLL mode and see how that goes.

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Here's the log with polling enabled (removed the log entries containing BUTTON):

[30/11/2020, 22:42:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:42:20] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:42:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:42:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:42:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 22:42:24] [dingz and myStrom SmartHome platform] HTTP Response Error ->http://192.168.1.98/api/v1/action/generic
[30/11/2020, 22:42:24] [dingz and myStrom SmartHome platform] connect EHOSTUNREACH 192.168.1.98:80
[30/11/2020, 22:42:27] [dingz and myStrom SmartHome platform] HTTP Response Error ->http://192.168.1.239/api/v1/action/generic
[30/11/2020, 22:42:27] [dingz and myStrom SmartHome platform] connect EHOSTUNREACH 192.168.1.239:80
[30/11/2020, 22:42:35] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:42:35] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:42:35] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:42:35] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:42:35] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 22:42:35] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion Update from POLLER
[30/11/2020, 22:42:50] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:42:50] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:42:50] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:42:50] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:42:50] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 22:43:05] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:43:05] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:43:05] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:43:05] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:43:05] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled
[30/11/2020, 22:43:05] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion Update from POLLER
[30/11/2020, 22:43:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[30/11/2020, 22:43:20] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[30/11/2020, 22:43:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[30/11/2020, 22:43:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)
[30/11/2020, 22:43:20] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] Motion POLLING of myStrom Motion Sensor enabled

Now I can see Motion Update from POLLER, but unfortunately it didn't trigger my Homekit rule.
When I check the motion sensor in the Home app, I can see Motion Detected change values though. So it kinda seems to work, but not trigger my rules although I haven't touched them in the last 7 days.

@johannrichard
Copy link
Owner

johannrichard commented Nov 30, 2020

I'll have to call it a night soon but one thing you can look out for: the PUSH requires that a callback is set on the motion sensor. Of course, if the API fails half of the time, it could be that this isn't working because the callback URL can't be set.

If you lookout for "Callback URL" or "callback" in the log (which you can download, btw), you should see it if Debug output is enabled. For example:

[11/30/2020, 11:44:06 PM] [Dingz SmartHome Device] Setting the callback URL ->  post://10.99.88.42:18081/button
[11/30/2020, 11:44:06 PM] [Dingz SmartHome Device] http://10.99.88.228/api/v1/action/ Endpoint ->  generic

If you open http://192.168.1.137/api/v1/action/pir/generic (provided it works) you should see the current value. It should look like something like this (192.168.1.111 being your Homebridge server's IP):

{
  "url": "post://192.168.1.111:18081/button",
  "feedback": true
}

@qx54
Copy link
Author

qx54 commented Nov 30, 2020

Turns out the Homekit rules where not there anymore. The must have been deleted when I updated to v2.0.5 today, because they where still working last night. Is that possible?

Added a new rule and in POLL mode it's working.

http://192.168.1.137/api/v1/action/pir/generic returned:

{
	"url":	"{\"headers\":{\"Token\":\"\"},\"data\":\"post://homebridge:18081/button\"}"
}

I now added the Homebridge IP to the callback setting because I think the hostnames don't work in my network.

{
	"url":	"{\"headers\":{\"Token\":\"\"},\"data\":\"post://192.168.1.46:18081/button\"}"
}

Unfortunately the PUSH mode is still not working. No signs of a motion detected in the log and also my new Homekit rule doesn't get triggered. Also the value of Motion Detected in the Home app doesn't change. Maybe there's an issue with the formatting of the API response (see above)?

Anyway, thanks a lot and have a good night!

@johannrichard
Copy link
Owner

Glad to hear you found the culprit. I don't know yet under which circumstances a device is forgotten in HomeKit but once it is (e.g. because it was removed from the cache), HomeKit will forget the rule most probably.

For the push: this is weird, it's working well for me for the dingz. I just ordered my own PIR sensor, it's bugging me too much and we're both loosing too much time to fix this with my half-baked mock device (esp. as the half-baked programmer I am 🤣) vs. your real device.

🛌 well too.

@johannrichard
Copy link
Owner

http://192.168.1.137/api/v1/action/pir/generic returned:


{

	"url":	"{\"headers\":{\"Token\":\"\"},\"data\":\"post://homebridge:18081/button\"}"

}
[...]
Maybe there's an issue with the formatting of the API response (see above)?

I had missed that completely ('t was too late that night). Got my PIR in the meantime and obviously had no PUSH either. It's fixed in the latest nightly, my motion sensor is now triggering motion reliably (and quickly!).

@qx54
Copy link
Author

qx54 commented Dec 2, 2020

Thanks for the update (and purchasing a PIR 😄). I updated to 2.0.7-nightly.3 and now the PIR shows always motion triggered, although the API reports false:

{
	"motion":	false,
	"light":	2,
	"temperature":	23.697680473327637
}

Log:

[02/12/2020, 23:14:46] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] ALIVE (192.168.1.137)
[02/12/2020, 23:14:46] [dingz and myStrom SmartHome platform] Event -> PlatformEvent.REQUEST_STATE_UPDATE
[02/12/2020, 23:14:46] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] GET http://192.168.1.137/api/v1/sensors
[02/12/2020, 23:14:46] [dingz and myStrom SmartHome platform] [myStrom Motion Sensor] 200 OK (GET http://192.168.1.137/api/v1/sensors)

UPDATE: And now when I triggered the PIR (and the LED on the PIR turned on) the state of the PIR in Homebridge changed to not triggered. So it's essentially inversed.

@qx54
Copy link
Author

qx54 commented Dec 2, 2020

The PIR starts going DEAD again. And when manually making API requests the loading time is very long.
Reported temperature is 23.6°, so not too high compared to the peak temperatures I already measured.

@johannrichard Don't you run into these problems?

@johannrichard
Copy link
Owner

johannrichard commented Dec 3, 2020

@qx54 I wish I had the same problems. Unfortunately I don't.

The API reacts as expected.

What I observed: the status page (/index.html) always loads very slowly, even before adding it to homebridge. /help is a bit better and /api/v1/sensors has a normal response time. But it was like this even before I integrated the sensor in the Homebridge setup, particularly before I upgraded to the newest FW.

I have started w/ FW 3.82.47 or so and then upgraded to 3.82.53 with the firmware tool (the myStrom app didn't indicate any update at that point). My understanding is you're also running this latest version?

johannrichard added a commit that referenced this issue Dec 4, 2020
- both the PIAccessory and BaseAccessory were listening to `REQUEST_STATE_UPDATE``
- this lead to two *very* rapid subsequent calls which brings *real* PIR sensors to their knees
- (also) fixes #152
@johannrichard johannrichard reopened this Dec 4, 2020
@johannrichard
Copy link
Owner

johannrichard commented Dec 4, 2020

I've not had any serious glitches with any of the latest nightlies (or even after we fixed the double-polling), running them over longer periods of time, on three different platforms/servers simultaneously with my PIR.

How's your PIR behaving? Did you update it? Is it still dead / running hot / reacting slowly? What happens if you stop homebridge altogether, does the API recover?

I can also suggest we do a PIR swap, I send you mine and you send me yours. This way, I can test on hardware that's failing and you should (again) have a running setup. Let me know how that sounds to you.

@qx54
Copy link
Author

qx54 commented Dec 4, 2020

I had the PIR unplugged for the last few days and had plans to test it with the latest working version of the plugin which was 1.8.3 nightly. Also because the buttons can't be used with the current response time of approx. 7 seconds.

Do you suggest I give 2.0.7 or 2.0.8-nightly.1 a try?

@johannrichard
Copy link
Owner

I would recommend you go with 2.0.7 right now as it's the version I'm running right now in production.

PS: I didn't think much of that before but obviously there are a few simple http homebridge plugins that simulate motion sensors or buttons and can be controlled via http requests independent from this plugin. You would have to set the POST or GET URLs to the PIR & Buttons yourself but would have a 'second source of truth' with respect to timings, delays etc. Just search for http plugins.

It only occurred to me lately and I haven't done any tests yet but will do so.

@johannrichard
Copy link
Owner

Just search for http plugins.

For example homebridge-http-motion-sensor sounds quite promising.

@qx54
Copy link
Author

qx54 commented Dec 4, 2020

Installed 2.0.7 for a while and the PIR worked but the buttons still were very slow.

I think it's faster to go back to v1.8.3 and see how the buttons do. If they're still slow, than it's the firmware because that's the only thing that changed.

EDIT: Buttons are still slow in responding with v1.8.3 while the PIR works fast. I tend to believe it's the firmware. Because when I got the 2nd button recently, I updated the firmware and installed it but it was noticeable slower than my 1st button. I postponed the debugging and forgot about it. Later I updated the firmware of the 1st one and now both are super slow. So I'm very confident it's the firmware. Do you have a MyStrom button with firmware 2.74? How is that working for you?

@johannrichard
Copy link
Owner

All my buttons have firmware 2.74 already (🙈) and they have noticeable delays. With the dingz, though, it is possible to completely disable the myStrom cloud (and dingz cloud) connection. When I did that, all button actions became almost instantaneous. It is probably really something that the recent updates to the myStrom cloud (announced on Twitter recently) and/or firmware changes make that cloud requests are handled first/slow and then local requests are handled.

Obviously, if you have multiple local servers (e.g. for debugging) and one of these is slow/not responding, that might also impact the speed. Or if you use hostnames instead of IP addresses.

In the meantime, I have done some debugging and I have introduced a setting in the plugin v3.0.0 that allows you to override (and thus reset) the relevant actions on the next HB restart in buttons (shaky, as it only happens if the button is online at the time when the plugin restarts), PIR and dingz.

You might give it a try, I have been running it in my environment for some days in different configurations.

And just for fun (as I discovered it only recently), you might want to give HomeManager (3.0 Beta) a test run as well. See this article for details: it makes running/managing a Homebridge instance really easy and fun.

@qx54
Copy link
Author

qx54 commented Dec 9, 2020

Thanks for the details, it looks like it's definitely a myStrom issue. I have only one server and use IP's exactly for this reason. Also because one button was slow and the other fast before I updated the 2nd one as well it's quite obvious where the problem lies.

I'm not following you, what do you mean with that:

override (and thus reset) the relevant actions

Re HomeManager: Thanks for the hint 😄

@johannrichard
Copy link
Owner

I'm not following you, what do you mean with that:

override (and thus reset) the relevant actions

The action URL is normally added to whatever exists in the device's config: post:10.0.20.22:18081/button||get:10.0.40.22:18081/button etc.

If you have a test server that's only running from time to time its configuration will still be configure and hence the requests will take a long time. By setting the override option on your main server (but not on the test server) you can ensure that the URL's are reset every time your main HB server is restarted.

BTW: Can you let me know if the newest versions (either @beta or @next channel) work now for you too? On my side, I have consistent good and reliable results so far. Thanks.

@johannrichard
Copy link
Owner

It's been a while since I've published updated versions of the plugin. In my case, the PIR motion sensor worked "as expected" (but of course I might have missed some edge cases): I will therefore close the issue. Feel free to reopen a new one in case you use the plugin with the PIR sensor and experience problems.

@qx54
Copy link
Author

qx54 commented Mar 12, 2021

Hi @johannrichard, sorry I somehow missed your previous message resp. forgot to get back.

I gave up on the PIR back then, although I don't remember the exact reason anymore.

For the super slow buttons it turned out the firmware is coded in a way that upon a button press it first tries to connect to the cloud and only after that to the Homebridge. For some reason the cloud domain doesn't resolve in my home, thus the local action was only executed after a hard-coded time-out which is 8 seconds if I remember correctly.

I removed the buttons from the cloud and it's working more or less, although in approx. 10-20% the button won't work properly.

Long story short, I'm not happy with the MyStrom devices. The didn't pass the WAF nor my own acceptance factor ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants