alexryd / homebridge-shelly

Homebridge plugin for Shelly devices
MIT License
299 stars 44 forks source link

[Support] Shelly RGBW reagiert auf HomeKit Ein/Aus Befehle nicht #174

Open ak1313max opened 4 years ago

ak1313max commented 4 years ago

Describe your problem Shelly RGBW lässt sich nicht über HomeKit entweder ein oder ausschalten, allerdings lässt es sich auf aus oder eindimmen. Wenn ich Hoobs/Homebridge neustarte, dann kann ich den shelly über HomeKit so 5 mal an/ausschalten bis es wieder nicht geht. Ich habe einen Speedport Smart 3 der mit 2 Speed Home Wifi im Meshnetzwerk hängt. Der Shelly ist mit dem zweiten Speed Home Wifi verbunden, dieser ist mit dem ersten Speed Home wifi verbunden und dann mit dem Router. Wenn ich den Shelly direkt über den Router einbinde, geht alles. Da bekomm ich auch die Rückmeldung in HomeKit, ob der Shelly wirklich ausgegangen ist oder angeblieben ist.

Describe what you have tried so far Meshnetzwerk komplett resettet, Router Neugestartet, Shelly RGBW komplett resettet und neueingerichtet nur noch über die WebGui. Shelly Cloud ist deaktiviert und über die WebGui oder App geht’s. Hoobs/Homebridge komplett neugestartet die auf einem Pi läuft, aber da geht’s dann halt nach einem Neustart bzw. auch schon wenn ich nur Homebridge neustarte das der shelly Mal für paar mal reagiert.

Environment:

@bobbyslope

BobbySlope commented 4 years ago

translation for @alexryd

Describe your problem Shelly RGBW cannot be turned on or off via HomeKit, but it can be dimmed to off or on. When I restart Hoobs/Homebridge, I can turn the shelly on/off 5 times via HomeKit until it doesn't work again. I have a Speedport Smart 3 that is connected to the mesh network with 2 Speed Home Wifi. The shelly is connected to the second speed home wifi, this one is connected to the first speed home wifi and then to the router. If I connect the Shelly directly through the router, everything works. I also get the feedback in HomeKit, if the Shelly is really switched off or if it stayed on.

Describe what you have tried so far Meshnetwork completely reset, Router restarted, Shelly RGBW completely reset and rebuilt only via WebGui. Shelly Cloud is deactivated and can be accessed via the WebGui or App. Hoobs/Homebridge completely restarted running on a pi, but there it goes after a reboot or even if I only restart Homebridge that the shelly times responds for a few times.

Environment:

Shelly device: Shelly RGBW plugin version: 0.14.0 Device running homebridge: Raspberry Pi 2 Model B 2014 is connected via LanCable to a switch which leads to the router. -Speedport Smart 3 (Latest firmware) -2 Speed Home Wifi (Latest Firmware)

alexryd commented 4 years ago

Thanks for the translation @BobbySlope !

@ak1313max This sound like a clear issue with UDP multicast. Has it been like this from the start or did it suddenly stop working? What firmware version is your RGBW2 running?

ak1313max commented 4 years ago

Thank you for your answer. I will try my answer with my „Good“ english now.

This Problem has excisted for a Long time, but felt is going better with Shelly Firmware 1.8..

The Firmware ist 1.8.

I have no idea where i can adjust multicast in Speedport Smart 3. I have already set the expert mode in the Router.

I Hope, my answer is a Little Bit understandable.

@BobbySlope

Edit: I have no idea and i don‘t understand Why it Shortly work and a few times later i have the Same Problems.

alexryd commented 4 years ago

I don't understand either why it stops working after a short while, but it seems like you are not the only one with this problem. See this wiki page for a description of CoAP and multicast. Can you run some of the commands listed in the Troubleshooting section to see if this is an issue with homebridge, or if tcpdump or netcat also stops receiving updates after a while?

By the way, your English is fine, much better than my German (which I've studied for a couple of years, but that was a long time ago now und ich habe alles vergessen).

ak1313max commented 4 years ago

„ To HomeKit, the device will thus remain off, and subsequent requests to toggle the switch or light will always try to turn it on.“

My HomeKit show the Shelly RGBW is on if i Turn „on“, is it the Problem if i dont receive the Status from Shelly? The HomeKit always tried to Shelly turn on? I Must Test with my Shelly 1, if connected with the same Speed Home wifi how Shelly rgbw.

Homebridge find always all Shellys, this is working 👍

Tcpdump and netcat run in the Terminal in Hoobs?

Thank you, but some words i need google 😅 I forget any words in english :D

Edit: If i connected Shelly 1 with the second Speed Home wifi (as well as Shelly rgbw) is the Same Problem, i can turn on Shelly 1 But i can‘t Turn off.

Edit 2: I tried troubleshooting. In Terminal in hoobs with shellies listen i can See all my four shellies in the network. Shelly 1 (this is connected with second Speed Home wifi now) i can see the Status if on or off! (Proberty:relay0 value:true). If turn off Shelly 1 and a new command shellies listen: property: relay0 value:false.

If i write tcpdump the terminal Said command Not found.

If i Write netcat i get numbers, words like: stop,roller etc and letters... can this help you?

Shelly RGBW: with shellies listen: property: power0 value: 0; if on: property: power0 value: 5.07

Edit 3 :D : if i write shellies listen in the Hoobs Terminal, i get Show of all shellies, but propertyies changed i get only from my 2 Shellies 2.5 which changed the devicetemperature.

ak1313max commented 4 years ago

I tried to take note the network activity with Wireshark and i realized the Shelly RGWB sends more memberships reports than the other shellies that work. (Protocol: IGMPv2 Membership Report group 224.0.1.187; sometimes also 224.0.0.251)

The other shellies seldom send a membership report and if they send reports, is the address 224.0.0.251

If I connected Shelly 1 with the same speed home wifi as the shelly rgbw, i get also a lot of memberships reports with address 224.0.1.187! Before the shelly was directly connected with the router, it sents the reports with address 224.0.0.251. If I show on my hoops traffic, i see the destination is 224.0.0.251.

Can that be my problem?

Edit: If I connect the shelly 1 with the first speed home wifi (its the next to the router) the reports become less and the destination is again 224.0.0.251.

alexryd commented 4 years ago

Interesting. 224.0.0.251 is the mDNS address, so that's probably fine. But membership reports to 224.0.1.187 shouldn't have to be sent so often. Maybe that Speed Home WiFi is sending out a lot of membership queries that the Shelly is responding to. I don't know why that means you have to restart homebridge though.

If you run tcpdump or netcat on your Hoobs device, can you confirm that is stops receiving CoAP messages?

ak1313max commented 4 years ago

bs@hoobs:/home/hoobs/.hoobs/etc $ sudo tcpdump -s0 dst 224.0.1.187 and port 5683 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 12:42:45.536287 IP 192.168.2.129.5683 > 224.0.1.187.5683: UDP, length 106 12:42:45.691860 IP 192.168.2.128.5683 > 224.0.1.187.5683: UDP, length 216 12:42:46.536080 IP 192.168.2.130.5683 > 224.0.1.187.5683: UDP, length 249 12:42:53.263675 IP 192.168.2.127.5683 > 224.0.1.187.5683: UDP, length 249 12:43:00.540506 IP 192.168.2.129.5683 > 224.0.1.187.5683: UDP, length 106 12:43:00.654782 IP 192.168.2.128.5683 > 224.0.1.187.5683: UDP, length 216 12:43:01.525130 IP 192.168.2.130.5683 > 224.0.1.187.5683: UDP, length 249 12:43:08.303079 IP 192.168.2.127.5683 > 224.0.1.187.5683: UDP, length 249

A little Abstract from tcpdump from hoops terminal...

how should CoAP look like in tcpdump?

Why show me Wireshark 224.0.0.251 if i looking for my homebridge?

Some times later, homebridge sent hardly often a message to the shelly rgbw.

alexryd commented 4 years ago

That's what CoAP messages should look like. Are they still received after homebridge stops working?

ak1313max commented 4 years ago

No, I Received the same lines in the Terminal...