Comfort Home Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

Comfort 2 Alarm working with Home Assistant!
 Moderated by: slychiu Page:  First Page Previous Page  1  2   
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Friday Jun 22nd, 2018 11:53 am
   PM  Quote  Reply 
21st Post
steefdebruijn
Member
 

Joined: Sunday Jul 29th, 2012
Location: Netherlands
Posts: 27
Status: 
Offline

  back to top

Create a file cytech.items in folder items with (for example) following input:

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`:
key=value
1=OPEN
0=CLOSED
OPEN=1
CLOSED=0



 Posted: Friday Jun 22nd, 2018 03:40 pm
   PM  Quote  Reply 
22nd Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 519
Status: 
Offline

  back to top

steefdebruijn wrote: Create a file cytech.items in folder items with (for example) following input:

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`:
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 ?

Last edited on Friday Jun 22nd, 2018 03:58 pm by wexfordman



 Posted: Friday Jun 22nd, 2018 06:12 pm
   PM  Quote  Reply 
23rd Post
steefdebruijn
Member
 

Joined: Sunday Jul 29th, 2012
Location: Netherlands
Posts: 27
Status: 
Offline

  back to top

You need to install the map transformation from the paper UI. Addons -> Transformations -> MAP transformation



 Posted: Tuesday Jun 26th, 2018 03:19 pm
   PM  Quote  Reply 
24th Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 519
Status: 
Offline

  back to top

steefdebruijn wrote: 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



 Posted: Sunday Aug 5th, 2018 07:55 am
   PM  Quote  Reply 
25th Post
koochy_rat
Member
 

Joined: Saturday Apr 14th, 2018
Location:  
Posts: 7
Status: 
Offline

  back to top

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.


steefdebruijn wrote:
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.

Attachment: VirtualInput1.png (Downloaded 37 times)



 Posted: Sunday Aug 12th, 2018 02:42 am
   PM  Quote  Reply 
26th Post
mikeinnc
Member
 

Joined: Wednesday Mar 18th, 2015
Location: Perth, Australia
Posts: 62
Status: 
Offline

  back to top

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! :)

Last edited on Sunday Aug 12th, 2018 03:03 am by slychiu



 Posted: Wednesday Aug 29th, 2018 08:27 pm
   PM  Quote  Reply 
27th Post
steefdebruijn
Member
 

Joined: Sunday Jul 29th, 2012
Location: Netherlands
Posts: 27
Status: 
Offline

  back to top

koochy_rat wrote:
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. 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



 Posted: Saturday Sep 1st, 2018 02:59 am
   PM  Quote  Reply 
28th Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 4310
Status: 
Offline

  back to top

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



 Posted: Sunday Sep 16th, 2018 08:17 am
   PM  Quote  Reply 
29th Post
steefdebruijn
Member
 

Joined: Sunday Jul 29th, 2012
Location: Netherlands
Posts: 27
Status: 
Offline

  back to top

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



 Posted: Sunday Sep 16th, 2018 08:58 am
   PM  Quote  Reply 
30th Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 4310
Status: 
Offline

  back to top

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



 Current time is 01:22 amPage:  First Page Previous Page  1  2   
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems