-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
lighting4 switch never actually sending commands #58
Comments
Some more debugging: when clicking "on", this is the internal event which seems ok:
Digging deeper, it seems that Lighting4 support is missing in https://github.com/Danielhiversen/pyRFXtrx/blob/master/RFXtrx/__init__.py#L187 which then exits silently. |
The following changes seem to be enough to get it working: if isinstance(pkt, lowlevel.Lighting4):
self.cmd = pkt.cmd
self.pulse = pkt.pulse To the elif self.packettype == 0x13: # Lighting4
pkt = lowlevel.Lighting4()
code = self.cmd & ~1
code |= 0x1 if turn_on else 0x0
pkt.set_transmit(self.subtype, 0, code, self.pulse)
transport.send(pkt.data) |
I believe the issue I just opened here might be related to this case? |
@sunflowerABB yes indeed, there are 2 reasons why so many switches show up when you use autodetect:
If you make the changes I presented in my previous comment, and use one of the auto detect codes when pressing the on button (that is not present when pressing off), everything should work. If there is no response from the author, I'll create a Home Assistant pull request with the changes myself. |
tldr; clicking a switch with id
09130001155155019c70
in home assistant doesn't result in commands being sent.I have a few Chacon RF outlets that seem to use the lighting4 protocol. If I enabled that protocol and set automatic add to true in Home Assistant, the switches show up in the panel, but they don't work.
I verified the received commands using RFXmngr:
The id of the switch in HA was 0913 0001 15 51 55 01 9c70
in RFXmngr, I got this matching output:
Packettype = Lighting4
subtype = PT2262
Code = 155155
Pulse: 412 usec
signal level = 8
If I enter the code in the lighting4 tab and toggle the last bit (155154/155155), I can toggle my light on and off.
I then enabled debugging in HA and noticed that no send events occur when I click the switch in HA.
To eliminate a general issue with my setup, I added a switch with an id I found in some example online (
0b1100ce3213c7f210010f70
). If I click that switch, a send command shows up in the logs.I'd be happy to help debugging this.
Some HA log output:
Note: sometimes an 09130002155557019c70 event shows up in the logs, both after on and off commands.
The text was updated successfully, but these errors were encountered: