Comfort Automation/ Security System Forums

Full Version: Comfort 2 Alarm working with Home Assistant!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
Create a file cytech.items in folder items with (for example) following input:

Code:
Contact MyDoor  <frontdoor>   {mqtt=\"<[mqtt:comfort2/input1:state:MAP(openclosed.map)]\"}
Contact MyWindow <window>   {mqtt=\"<[mqtt:comfort2/input2:state:MAP(openclosed.map)]\"}
Contact MyMoveSensor <selfmotion> {mqtt=\"<[mqtt:comfort2/input3:state:MAP(openclosed.map)]\"}
Contact MyCytechController <network>     {mqtt=\"<[mqtt:comfort2/alarm/online:state:MAP(openclosed.map)]\"}
String MyAlarmState <alarm>     {mqtt=\"<[mqtt:comfort2/alarm:state:default]\"}

In the above situation I have
  • * Frontdoor at input 1
    * A window at input 2
    * Motion sensor at input 3
    * Broker has name mqtt

File `open closed.map` in folder `transform`:
Code:
key=value
1=OPEN
0=CLOSED
OPEN=1
CLOSED=0
[user=4708]steefdebruijn[/user] wrote:
Quote:Create a file cytech.items in folder items with (for example) following input:

Code:
Contact MyDoor  <frontdoor>   {mqtt=\"<[mqtt:comfort2/input1:state:MAP(openclosed.map)]\"}
Contact MyWindow <window>   {mqtt=\"<[mqtt:comfort2/input2:state:MAP(openclosed.map)]\"}
Contact MyMoveSensor <selfmotion> {mqtt=\"<[mqtt:comfort2/input3:state:MAP(openclosed.map)]\"}
Contact MyCytechController <network>     {mqtt=\"<[mqtt:comfort2/alarm/online:state:MAP(openclosed.map)]\"}
String MyAlarmState <alarm>     {mqtt=\"<[mqtt:comfort2/alarm:state:default]\"}

In the above situation I have
  • * Frontdoor at input 1
    * A window at input 2
    * Motion sensor at input 3
    * Broker has name mqtt

File `open closed.map` in folder `transform`:
Code:
key=value
1=OPEN
0=CLOSED
OPEN=1
CLOSED=0


Thanks Steef, I think I am almost there :-)
So in my openhab logfile, motion is being detected, but there seems to be an issue with the transformation ?  Below is the error message. Now I suspect it may be to do with my broker name, which even though I set it up, I cant remember what the broker name is/was ?  How do I get this info ?
2018-06-22 16:37:50.610 [WARN] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type MAP
2018-06-22 16:37:50.616 [WARN] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn\'t post update for \'MyMoveSensor\'
[code]Sorted :-)
Had to add the mqtt transformation service, and my mqtt broker name is broker ?
You need to install the map transformation from the paper UI. Addons -> Transformations -> MAP transformation
[user=4708]steefdebruijn[/user] wrote:
Quote:You need to install the map transformation from the paper UI. Addons -> Transformations -> MAP transformation

All working now thanks, although I havnt managed to get it running 24/7 it drops out every now and again and I need to CLI in to get the comfort. Py running
Ok, finally I have gotten around to setting up and trying out the virtual inputs. Firstly, you need to setup a Response to reference the Virtual Input (17 and above only). This is a dummy response merely to let Comfort know the specified input is virtual. Then in Inputs, you should see the Virtual Input column as \'yes\'. Then that should be it, you can then set the input through MQTT.


[user=4708]steefdebruijn[/user] wrote:
Quote:BTW anyone noticed that setting an OUTPUT through MQTT offsets by one (setting comfort2/output10/set to 1 sets output 11 not output 10)? Seems not to happen at other inputs.

Other thing: has anyone succesfully used virtual inputs (so set an input through MQTT to comfort and was able to see this reflected in comfigurator status?

I use this script adapted to USB input instead of ETH with openhab on the other side of MQTT.
After using this very useful program for quite a while now, to interface HA and Comfort, it struck me that with a few modifications, it could also be used to interface my home\'s CBus lighting system as well.
Comfort allows CBus channels to be mapped to counters (useful for dimmable channels) or flags (useful for relay ie ON/OFF channels), and I had previously done that, mapping my CBus controller channels as required. This has previously allowed me to integrate security with lighting via Comfort responses.
Koochy_Rat\'s program already interfaces flags to HA, but hadn\'t included counters. As my CBus system has more dimmable than relay channels, this was an omission I felt needed fixing. There are other methods that can be used to interface CBus to HA - many people report using Clipsl\'s own CGate application, but I didn\'t want to introduce yet another interface running on a RPi, if I could avoid it.

So, looking at how KR had programmed the various Comfort components - and despite a very limited knowledge of Python programming! - I was able to add Comfort counters into the \'mix\' and can now control CBus lights from HA via MQTT and the Comfort CBus module. And it works very well! There were a few issues with making sure I selected the correct HA configuration for the dimmable channels, but with that in place, the interface works exactly as expected.

OK, I don\'t have a terribly sophisticated set-up - I don\'t use Scenes, for example, and have no Scene Controllers - but for a \'simplistic\' (although insanely expensive!!) single (CBus) network lighting control system, it works perfectly.

KR has a copy of my modifications, and has promised that he will incorporate them into the mainstream code, so hopefully, although probably a limited number, others will find this useful. Thanks again, KR! Smile
[user=11547]koochy_rat[/user] wrote:
Quote:Firstly, you need to setup a Response to reference the Virtual Input (17 and above only). This is a dummy response merely to let Comfort know the specified input is virtual. Then in Inputs, you should see the Virtual Input column as \'yes\'.

I finally got to check this and I discovered I had already tried that. On my comfigurator this does not happen. Response Virtual17 with code Zone17 Off (or On), list of Zones/Inputs keeps Zone17 as virtual=no.

I use Configurator 3.12.5.0 on Windows10. Same behavior with clean file as with my systems file (.cclx)

Steps to reproduce:

  1. 1. Start comfigurator
    2. New file (template Comfort II ULTRA)
    3. Go to Events/Responses
    4. Add response (Name fe Virtual17)
    5. Response code: Virtual Input On/Off, Zone17 Off
    6. Look in Alarms/Zones for virtual input flag on Zone17.

Nope here :-(

Do I miss one little detail?

tia,
Steef
Check that the Comfort Firmware is upgraded, as well as the latest comfigurator is used
The virtual Input action should be working

Hi,

Checking in to confirm that upgrading firmware from 7.140 to 7.142 did it. I now have a virtual input on zone 17 with the scenario two posts back.

Thanks!

Steef
Thanks for the confirmation.
Virtual Inputs is a very useful feature
Many submodules, eg  IRIO, MSM, Modbus, KNX, Cbus have mapping to Virtual Inputs. This allows other devices to act as Inputs to the security system which can trigger alarms
Pages: 1 2 3 4 5 6 7 8 9