anthonywebb / homebridge-cbus

CBus plugin for homebridge
MIT License
35 stars 20 forks source link

Motion accessory does not work on Trigger Control Application #120

Open BradJJ2000 opened 2 years ago

BradJJ2000 commented 2 years ago

I’ve used my PIR’s on the trigger control application forever as I have some PAC logic to control things. Maybe I’m breaking some CBUS rule or something.

Anyway, I setup a motion accessory in the plug-in Config with the correct ID and application 202 and the motion would not trigger in the Home app. I could see it triggering correctly on other CBUS gear. I switched my PIR over to the lighting application (and reconfigured the plug-in) and it leapt into life. Switched it back to 202 and it doesn’t work. Checked everything 4 times.

I’ll move my PIR’s over to lighting. Thought I’d report this as I’m guessing it’s supposed to work.

JasonY00 commented 2 years ago

Hi BradJJ2000,

The motion detector works by a simple binary ON/OFF scenario that takes the standard lighting application response from C-Bus of 0/255 for OFF/On and converts it to 0/1. It is not compatible with the trigger control application messages even if you change the application address as the message format is different in C-Bus.

I can only recommend that you create some logic or if possible set up your PIR to also send a trigger control message for your C-Bus and a lighting message for your Homebridge. Not sure if you can set this up in the PIR to send a message on both the primary and secondary applications at the same time. I have not done this, Otherwise, some logic in your PAC for some one-to-one mapping of a lighting GA to follow a Trigger GA will do the trick. Then define the PIR in homebridge back onto your lighting application and you will be good to go. It's a bit of a fiddle and a duplicate of GA's in two applications, but will achieve what you want.

Cheers

Jason

BradJJ2000 commented 2 years ago

Thanks Jason. my PIRs are old and don’t support a secondary application. I think I’ll just leave them on the lighting application. thanks again for your response.

JasonY00 commented 2 years ago

No problem. Remember, writing the logic in the PAC will also give you what you want. Just chose which application you want the PIR’s to be on and write the one-to-one mapping as above for the secondary application to follow the first. There will only be a small delay.