anthonywebb / homebridge-cbus

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

Having trouble adding sensors... #106

Closed ElphaX closed 3 years ago

ElphaX commented 3 years ago

For the longest time I haven't added all the sensors in my building. There's about 20 of them that I want to setup. They look like the 5753L (https://www.clipsal.com/products/detail?CatNo=5753L&tab-document-1=0&itemno=5753L)

I have toolkit to find addresses/groups but I don't think I'm looking in the right spot. I've got about 200 lights set up using their group id, and fans the same way. How can I connect up the sensors? Is anyone able to assist or point me in right direction?

Edit: At the moment, these sensors are set to trigger light groups on motion and enable/disable groups in toolkit

JasonY00 commented 3 years ago

Hi Edwin,

Am I right in saying that you want to “see” in the home app if one of these occupancy sensor has been triggered?

If this is the case, then you must remember how the sensor works. When it triggers it only turns a group address on or off that you have assigned in Toolkit.

All you need to do is use this group address and create a motion sensor in homebridge. Then you will see the motion trigger and the icon in the home app will indicate motion (occupancy). You can then create automations based on this sensor.

This is the definition you need in your config.json file:

{ "type": "motion", "id": GA, "name": "Bedroom" },

Where GA is the C-Bus lighting Group Address that is triggered by the CBus 5753L that you have already configured.

Cheers

Jason

ElphaX commented 3 years ago

Correct, to see when motion is triggered in those rooms.

I had a feeling this was the case. Is there a way to trigger more than 1 group in toolkit when motion is detected? I wonder..

ElphaX commented 3 years ago

Thanks Jason, I realised I had Any Motion unassigned for most of them so I used that with new groups. Thanks for the tip!

JasonY00 commented 3 years ago

Great news Edwin,

yes," anymove" is the best option, that way you get day/night notifications.

As far as turning multiple groups on, you have two options:

  1. If you have a logic engine on your network, you could either write it in logic that if the group address goes "on" then set the other group addresses to on (similar for off).

  2. If you don't want to do it in logic but have a cbus device that supports scenes (i.e. a touch screen, wiser, etc.), then create two scenes there. One scene lists the group addresses that you want to turn on and they are remotely triggered by the same anymove group address from your sensor. Do another scene for off, where all of the groups are turned off when the sensor anymove group address turns off. You can use the lighting group address for a scene trigger (that you already have defined) or you could define a secondary application in the sensor on another virtual key also with the anymove option and create a trigger application group address.

I used a similar technique to make some blinds connected to an old changeover relay behave like a shutter relay with one key on a light switch. It only did up/down (not stop) but otherwise looked and worked just like a shutter relay in homebridge.

I don't know if you can trigger scenes that are internally defined in the sensor from the secondary (trigger application). i.e. anymove->trigger ON (secondary application) -> internal lighting scene 1 and anymove->trigger OFF(secondary application) -> internal lighting scene 2. Ask this on the cbus forums. people like Ashley or NickD would know for certain.

Good luck.

Cheers

Jason