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: 25
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: 518
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: 25
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: 518
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



 Current time is 08:39 pmPage:  First Page Previous Page  1  2   
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems