Clipsal C-Bus plugin (0.0.1)

Posted on
Thu Sep 05, 2013 2:59 pm
broadk offline
Posts: 41
Joined: Sep 05, 2013

Clipsal C-Bus plugin (0.0.1)

Everyone, following Mark's review of Indigo on www.automatedhome.co.uk I thought I would take a look myself. To do so I needed to integrate it with a Clipsal C-Bus system which is the primary system here at home.

At this point it is able to (at least on my network) dynamically generate Indigo devices based on your C-Bus configuration, provide support for relay and dimmer channels via the Indigo Mac UI and also monitors for changes on the C-Bus network which are then propagated back to Indigo. I have not yet tried Indigo Touch but I presume it should work.

The plugin requires a running instance of C-Gate somewhere on your network. There are a number of excellent guides on cbusforums.com to do this on devices other than Windows. Personally I have it running on a (debian) pi with ser2sock to avoid some of the pitfalls of java and serial ports. I would recommend you configure the C-Gate install to support remote connections (access.txt) and update both project.default and project.start values in C-GateConfig.txt to automatically connect C-Gate to your c-bus network.

The plugin code can be found at https://github.com/KieranBroadfoot/C-Bus.indigoPlugin. A zip can be downloaded from this site but you'll need to rename the resulting directory before you can copy into your Indigo install.

Some caveats:
- Only application 56 (lighting) is supported
- Config changes via Toolkit would not be noticed by this plugin
- Moving groups from dimmer to relay channels or vice-versa would would require some manual intervention
- I presume any group which is not attached to a physical C-Bus unit should be treated as a dimmer unit. This includes all-unit groups etc. I incorrectly use lighting groups for PIR activity from a Comfort alarm panel and for Sonos control from my DLTs hence the chosen default. Line 196 of plugin.py can be changed if you want all other groups to gain relay functionality instead.

Thanks to Matt and Jay for their help with my understanding of their API.

kieran.

Posted on
Thu Sep 05, 2013 3:05 pm
matt (support) offline
Site Admin
User avatar
Posts: 18915
Joined: Jan 27, 2003
Location: Texas

Re: Clipsal C-Bus plugin (0.0.1)

Hi Kieran,

Terrific -- thanks for sharing the plugin with everyone.

Image

Posted on
Fri Sep 06, 2013 1:09 am
otto-mate offline
User avatar
Posts: 30
Joined: Aug 10, 2013
Location: UK

Re: Clipsal C-Bus plugin (0.0.1)

Kieran - wow, fantastic!

Thanks

M.

Posted on
Mon Sep 16, 2013 12:15 pm
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Clipsal C-Bus plugin (0.0.1)

As an FYI I have updated this plugin at https://github.com/KieranBroadfoot/C-Bus.indigoPlugin to support the C-Bus security application. The end result is that if your C-Bus enabled alarm panel follows the specification correctly (the Cytech Comfort alarm does for example) you'll have a pretty rich read-only view of your alarm in Indigo.

If you configure your zones in C-Bus toolkit (as per the simple doc linked above) the plugin will generate a panel device and associated zones in Indigo. All state changes detailed in the Clipsal specification should be replicated into Indigo. Because I did not want to be presumptuous the plugin provides events for all device state changes to give you options when it comes to responding to activities.

All states and configuration requirements can be found detailed at the link above.

Caveats:
- This code is working for me but requires significantly more testing
- As with all aspects of security you'd want to think about when to expose security responses outside of your alarm panel

kieran

Posted on
Tue Jan 20, 2015 7:20 am
tomet offline
Posts: 2
Joined: Sep 30, 2014

Re: Clipsal C-Bus plugin (0.0.1)

Hi Kieran,

I am trying to match brightness between a few different C-Bus groups. For some reason your code sets the target Group's level to 0 first and then sets it back to the "matched" level from the source group. The output below is from my logs, showing what it states is sent to cgate.

C-Bus sent "Study Lights" set brightness to 0
C-Bus sent "Study Lights" set brightness to 132
C-Bus sent "Study Lights" set brightness to 132

Any suggestions on how to stop it from doing the first line, and just executing lines 2 and 3???

Cheers,

Tom

Posted on
Mon May 04, 2015 12:20 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Clipsal C-Bus plugin (0.0.1)

Tom,

Apologies for missing this message. I've been away for a while. Please do feel free to PM me regarding this. I've just tried to replicate this behaviour without success.

k.

Posted on
Fri Jun 19, 2015 10:37 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Clipsal C-Bus plugin (0.0.1)

Just a brief message to mention that I have updated the plugin (v0.0.4) to support:

- a DLT labelling action
- addition of a "group manually changed" event.

This second event can be used in your triggers to monitor for human initiated changes to C-Bus from a switch (e.g. DLT). This makes things slightly easier if you are looking to link C-Bus groups with external systems (e.g. Sonos).

thanks
k.

Posted on
Sun Jun 21, 2015 5:05 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Clipsal C-Bus plugin (0.0.5)

I have revised this plugin to 0.0.5 to support correct behaviours for ramping C-Bus groups. I had misunderstood C-Gate messages relating to ramping on DLTs which was impacting Tom (above) and my own ability to link Sonos to C-Bus groups.

Talking of which, here is a simple plugin which dynamically links Sonos to C-Bus with minimal configuration: https://github.com/KieranBroadfoot/SonosLink.indigoPlugin

k.

Posted on
Sat Feb 06, 2016 1:10 am
peteinau offline
Posts: 65
Joined: Jan 10, 2015

Re: Clipsal C-Bus plugin (0.0.1)

Hi there, firstly thanks for all your work, I have been using it for some time now without a drama at all and it's been doing a fantastic job.

I've just started using DLT Switches, would it be possible to set the DLT label using a variable? Without any logic systems attached to my system, I'm planning on using the DLT label to show the temperature from a variable in Indigo.

Many thanks in advance!
Pete

Posted on
Wed Apr 06, 2016 2:14 pm
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Clipsal C-Bus plugin (0.0.1)

Pete,

Apologies, I don't look at the forums as often as I should. I've just pushed changes to the git repository which will allow you to do variable interpolation in your DLT labels. Simple instructions are included in the README. Let me know if it works as you'd expected..

Kind regards
k.

Posted on
Sat Apr 23, 2016 7:01 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Clipsal C-Bus plugin

Updated to version 0.0.7 to support two new actions which allow you to sync your C-Bus network clock and date from Indigo. I use these actions nightly to ensure my DLTs show the right time.

Thanks, k.

Posted on
Sat Apr 23, 2016 5:46 pm
peteinau offline
Posts: 65
Joined: Jan 10, 2015

Re: Clipsal C-Bus plugin (0.0.1)

Thanks on both accounts! Have got a couple of my friends using this plugin now and we all love it! Thanks for your work!

Posted on
Sat Apr 30, 2016 11:28 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Clipsal C-Bus plugin (0.0.1)

One further update to 0.0.8 in order to add support for two new actions:

- Lighting ramp over X seconds
- Terminate ramp

It should be noted that during a ramp over X seconds Indigo will show the *final* brightness value and hence will be mismatched with the state of the channel until the ramp finishes or it is terminated. Termination will always bring Indigo and the C-Bus network back in sync. This is due to the fact that a ramping will happen asynchronously within the C-Bus network and there is no easy way to keep the two systems in sync. I could have attempted to replicate the timer within Indigo but felt this was a lot of work for little value.

Based on the C-Gate manual this finally adds the majority of features that I believe most users would need. If there is anything else would like to see then please let me know.

thanks
k.

Posted on
Sun Jul 10, 2016 9:17 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Clipsal C-Bus plugin (0.0.1)

Updated to version 0.0.9 to include a user requested feature (Thanks Pete) to include an additional event "Any Group Manually Changed" allowing you to trigger whenever a C-Bus switch/input is manually accessed. This could be used in security scenarios to track human activity within the home.

For those who aren't aware you can also configure the inverse, e.g. disable the functions of any/all C-Bus switch(es) whilst the home is empty using a disable group. Full details can be found via the following Schneider FAQ.

Posted on
Sun Nov 13, 2016 5:46 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Clipsal C-Bus plugin (v1.0)

After 3 years I am finally bumping the version to v1.0 (stable) for Indigo 7. This updated version contains significant reliability improvements over previous versions and is strongly recommended. It now handles power failures gracefully and timing issues if the C-Bus network is not fully available on start. It incorporates some of the new features of Indigo 7 enabling your own code to monitor for state changes within your C-Bus network. I've also fixed an important fix for Security Panel users to correctly trigger when an alarm is set.

The updated version can be downloaded from the releases tab at the following link: https://github.com/KieranBroadfoot/C-Bus.indigoPlugin

Thanks
k.

Who is online

Users browsing this forum: No registered users and 1 guest

cron