Posted: Friday Jun 22nd, 2018 11:53 am |
|
21st Post |
steefdebruijn
Member
Joined: | Sunday Jul 29th, 2012 |
Location: | Netherlands |
Posts: | 28 |
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 |
|
22nd Post |
wexfordman
UCM Pi Users
Joined: | Monday Jan 1st, 2007 |
Location: | Cork, Ireland |
Posts: | 546 |
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 |
|
23rd Post |
steefdebruijn
Member
Joined: | Sunday Jul 29th, 2012 |
Location: | Netherlands |
Posts: | 28 |
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 |
|
24th Post |
wexfordman
UCM Pi Users
Joined: | Monday Jan 1st, 2007 |
Location: | Cork, Ireland |
Posts: | 546 |
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 |
|
25th Post |
koochy_rat
Member
Joined: | Saturday Apr 14th, 2018 |
Location: | |
Posts: | 9 |
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 185 times)
|
Posted: Sunday Aug 12th, 2018 02:42 am |
|
26th Post |
mikeinnc
Member
Joined: | Wednesday Mar 18th, 2015 |
Location: | Perth, Australia |
Posts: | 69 |
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 |
|
27th Post |
steefdebruijn
Member
Joined: | Sunday Jul 29th, 2012 |
Location: | Netherlands |
Posts: | 28 |
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 |
|
28th Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5500 |
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 |
|
29th Post |
steefdebruijn
Member
Joined: | Sunday Jul 29th, 2012 |
Location: | Netherlands |
Posts: | 28 |
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 |
|
30th Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5500 |
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
|
Posted: Thursday Jul 4th, 2019 02:51 pm |
|
31st Post |
theshepherdmatt
Member
Joined: | Monday Jun 17th, 2019 |
Location: | |
Posts: | 30 |
Status: |
Offline
|
back to top
|
Hi mate,
Bit of an old thread, but is it possible to send commands to comfort from openhab? i know that the items file is reading states, but can it set the alarm via published mqtt?
cheersmatt
|
Posted: Friday Jul 5th, 2019 02:42 am |
|
32nd Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5500 |
Status: |
Offline
|
back to top
|
You would need UCM/Pi to use MQTT
|
Posted: Friday Jul 5th, 2019 08:13 am |
|
33rd Post |
theshepherdmatt
Member
Joined: | Monday Jun 17th, 2019 |
Location: | |
Posts: | 30 |
Status: |
Offline
|
back to top
|
Hi Slychui,
I already have koochyrat's python code running on my pi that is receiving mqtt messages from Comfort but I'd like to send commands to comfort from my Pi but I don't know how comfort executes these commands, I think it's under responses but i've hit a wall.
Cheers
|
Posted: Saturday Jul 6th, 2019 02:49 am |
|
34th Post |
Posted: Monday Jul 8th, 2019 04:22 am |
|
35th Post |
koochy_rat
Member
Joined: | Saturday Apr 14th, 2018 |
Location: | |
Posts: | 9 |
Status: |
Offline
|
back to top
|
theshepherdmatt wrote:
Hi Slychui,
I already have koochyrat's python code running on my pi that is receiving mqtt messages from Comfort but I'd like to send commands to comfort from my Pi but I don't know how comfort executes these commands, I think it's under responses but i've hit a wall.
Cheers
Yes, using responses is the most flexible way. You can use Comfigurator to program what each response does. Then via MQTT, just set a dummy value to the response to trigger it.
|
Posted: Monday Jul 8th, 2019 07:28 pm |
|
36th Post |
theshepherdmatt
Member
Joined: | Monday Jun 17th, 2019 |
Location: | |
Posts: | 30 |
Status: |
Offline
|
back to top
|
Hi Hoochy_rat,
Many thanks for the code, I've finally got my head around the Openhab side of MQTT and can now send commands to (via Alexa) Comfort.
Cheers fella
|
Posted: Thursday Jun 11th, 2020 07:02 pm |
|
37th Post |
nbexiga
Member
Joined: | Sunday Oct 17th, 2010 |
Location: | Portugal |
Posts: | 59 |
Status: |
Offline
|
back to top
|
HI
i just configure Home Assistant and i can communicate with the comfort.
now i need help with the devices and the configurations that i have currently for my devices.in the main windows , with this yaml file, i only can see ARM AWAY and ARM HOME
I need to configure the way as i have in my cytech configuration , the buttons for AWAY MODE , NIGHT MODE , AND DAY MODE.
Waht changes do i have to make in the yaml file from https://github.com/koochyrat/comfort2
Currently my configuration.yaml file is :
#comfortalarm_control_panel: - platform: mqtt name: Comfort Alarm state_topic: "comfort2/alarm" command_topic: "comfort2/alarm/set" availability_topic: "comfort2/alarm/online" code_arm_required: true code_disarm_required: true payload_available: "1" payload_not_available: "0"
AnyOne that can help?
Thanks
|
Posted: Friday Jun 12th, 2020 07:17 am |
|
38th Post |
koochy_rat
Member
Joined: | Saturday Apr 14th, 2018 |
Location: | |
Posts: | 9 |
Status: |
Offline
|
back to top
|
This is the mapping from Home assistant:
if msgstr == "ARM_HOME":
self.comfortsock.sendall(("\x03m!03"+self.comfort_pincode+"\r").encode()) #arm to 03 day mode
elif msgstr == "ARM_NIGHT":
self.comfortsock.sendall(("\x03m!02"+self.comfort_pincode+"\r").encode()) #arm to 02 night mode
elif msgstr == "ARM_AWAY":
self.comfortsock.sendall(("\x03m!01"+self.comfort_pincode+"\r").encode()) #arm to 01 away mode
ARM_HOME is for day mode. However Home assistant's UI does not have night mode, you have to find a way of adding that or use a different plugin.
|
Posted: Friday Feb 5th, 2021 10:54 pm |
|
39th Post |
wexfordman
UCM Pi Users
Joined: | Monday Jan 1st, 2007 |
Location: | Cork, Ireland |
Posts: | 546 |
Status: |
Offline
|
back to top
|
Hi koochi, So I decided to abandon my openhab installation and try and move over to HASS, and see if I could implement your solution. Of course, Ive stumbled at the first hurdle again. I have installed HASS on a RPI3B, it is HASSOS/HASSIO, so i cannot SSH into it and run the commands to install mqtt client etc.
Any reccomendations I could look at to work around this ?
|
Posted: Monday Feb 8th, 2021 07:38 am |
|
40th Post |
Ian
Member
Joined: | Saturday Aug 19th, 2006 |
Location: | United Kingdom |
Posts: | 249 |
Status: |
Offline
|
back to top
|
I came across your script on Github, I didn't realise it was already a discussion on here!
I have it running and use it to interface to HomeSeer software - it works well.
Thank you.
|
Current time is 11:00 am | Page: 1 2 3 4 |
|