Comfort Automation/ Security System Forums
Comfort UPNP <-> SmartThings <-> Amazon Echo - Printable Version

+- Comfort Automation/ Security System Forums (https://www.comfortforums.com)
+-- Forum: Third Party (interfacing to Comfort) (https://www.comfortforums.com/forum-5.html)
+--- Forum: alphaWerk UHAI RPi (Community Edition) (https://www.comfortforums.com/forum-136.html)
+--- Thread: Comfort UPNP <-> SmartThings <-> Amazon Echo (/thread-4534.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


- mattbrain - 10-13-2016

Hi All
I have been busily beavering away on a pet project and have developed a UPNP interface for Comfort. The Interface is written in node.js and can run as a service on a RPi or similar. 
This allows Samsung SmartThings (and presumably other similar systems) to discover and instantiate Comfort devices (primarily Zones, Outputs and if desired basic alarm control).
Using SmartThings as a central hub, I am then able to connect Amazon Echo, IFTTT and other services to it as well as control other devices under SmartThings control (Phillips Hue etc)
Whilst it works well for me, it is still very much a work in progress and I would like to know:
1. Is there enough community interest in this to justify cleaning up my code and making it more generic (by reading configuration from Comfigurator)
2. What other features would people like / find useful aside from Zone, Outputs and Basic Alarm
3. Are there any willing volunteers who would like to give it a go?
Thanks,
Matt


- wexfordman - 10-14-2016

Hi Matt, is it possible that your interface can control devices inactivate macros and responses connected to comfort?

I\'m interested in getting something like echo or Google\'s new home to talk tomcomfort but completely illiterate in how to do it.


- mattbrain - 10-14-2016

Absolutely, the UPNP interface is a two way street, the UPNP device can report status via direct polling or unsolicited events as a result of a subscription and devices can be controlled using the UPNP control function.

The UPNP standard defines the interface protocols and some simple standard devices but allows the implementer to build a solution based on the standard but utilising propriety features on a device. This is the approach I have opted for as there really isn\'t a suitable  device defined in the standard.

Samsung SmartThings can utilise both standard and propriety UPNP devices and provides a programming language which allows custom UPNP devices to be instantiated and then exposed to other services such as Amazon Echo and IFTTT via the SmartThings framework.
In order to use the Amazon Echo (or other \'simpler\' home automation devices) without the benefit of SmartThings, the Comfort UPNP interface would need to be customised to emulate a device which is natively supported by the Echo - and this is something I am thinking of adding as a configuration option - it would mean reduced functionality, for example we could emulate a WeMo switch to expose a Comfort output but we wouldn\'t be able to expose the Flash or FlashOnce function available on the Comfort outputs (as WeMo switches only support on and off).


In my implementation I have decided to use the SmartThings hub as the centre of the HA universe. I have left the Comfort system running essential alarm related tasks and these are enriched by functions and interfaces on SmartThings. The SmartThings hub receives events and sends commands to the following devices:

Cytech Comfort 
Honeywell Evohome 
IFTTT 
Amazon Echo 
Sonos


IFTTT also brokers requests to and from other services such as

BMW Connected Drive 
Life360 
etc

So, you might ask, what is all the point of this? Well, an example of the things I can now do are:

If the garage door is closed (Comfort Zone) and 
The car is started (BMW Connected Drive IFTTT) and 
The car is at home (BMW Connected Drive IFTTT) and 
There has recently been movement in the garage (Comfort Zone) then 
Open the garage door (Comfort Output) then 
If the car is driving (BMW Connected Drive IFTTT) then 
Close the garage door (Comfort Output) then 
If the house is empty (SmartThings presence detection) then set the alarm.


I can also do simpler stuff like:

If SCSRIO button 1 pressed (Comfort Output) then Boost kitchen temperature by 2 degrees for 2 hours (Honeywell Evohome). 

Amazon Echo integration also allows me do things like:

\"Alexa, turn off the patio lights\"
 \"Alexa, turn on the Alarm\" (although you may wish to obfuscate the \'Alarm\' keyword)

The UPNP interface already allows for devices to be controlled, in terms of activating responses, the Comfort protocol has the R! function which could be exposed via UPNP or you could tie a response to a virtual input and use that as a trigger.

TL;DR
Yup, using UPNP the Comfort system can be integrated into the new wave of home automation devices (with of course Apple being awkward but not out of the question) 



- slychiu - 10-14-2016

Thats great. But isnt UPNP for hardware plugged into a Computer?



- mattbrain - 10-14-2016

Not at all, although I can see how it could be confused with it. UPnP, specification can be found here: http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf is a mechanism to allow networked devices such as routers, modems, media centre, home automation devices to advertise services, be discovered and controlled by end points. This is the same mechanism which is used for Smart TV\'s to find media content on the local network and games consoles to \'punch\' open paths in routers for peer to peer games. Its a pretty neat spec with the intention of allowing networked stuff you buy to just work when you get it home. You would be surprised by just how much stuff is already busy advertising services on your home network.

The implementation I have is an interface between the Comfort proprietary serial protocol and the UPNP standard, exposing Comfort zones, outputs, basic alarm and other functions and services which can be queried, controlled and subscribed to by third party devices without needing to develop specific interfaces for them such as SmartThings, Amazon Echo, etc etc.
 


- benchan001 - 10-16-2016

Hi Matt,

This is interesting as I have spoken w/ Mr Chiu about using a Raspberry Pi 3 as my Alexa AVS. The conversation began as using Z-Wave; however, he did point me out to your UPNP and Smarthings that may help simplify matters.

I\'m interested in testing your Comfort UPNP w my incoming Raspberry Pi 3s. My goal is voice integration with Alexa AVS (RP3) via my Comfort System.

All the Best,

Ben


- benchan001 - 10-16-2016

Hi Matt,

This is interesting as I have spoken w/ Mr Chiu about using a Raspberry Pi 3 as my Alexa AVS. The conversation began as using Z-Wave; however, he did point me out to your UPNP and Smarthings that may help simplify matters.

I\'m interested in testing your Comfort UPNP w my incoming Raspberry Pi 3s. My goal is voice integration with Alexa AVS (RP3) via my Comfort System.

All the Best,

Ben


- mattbrain - 10-16-2016

Hi Ben

That should be do-able, so long as the Alexia AVS offers the same functionality as the Echo (which is what I am using).

Do you know if it supports UPNP as the Echo does - maybe try \'discover my devices\' and see what it does.

I am happy to bundle up what I have into something which can be installed, it is still early days, and whilst it has been running faultlessly for a couple of weeks I need to stress it\'s still in development and may barf.

Finally, it is currently written to support the Ethernet interface on a UCM, i\'m sure i could also add a serial interface support but it isn\'t highest priority at the moment - can you confirm you have one?

Thanks,

Matt


- benchan001 - 10-16-2016

Hi Matt,

I presently have the older UCM/Serial. I\'ll need to request an upgrade to the Ethernet UCM.

I\'ll plan to have 2 RPi3 and use Home Assistant as the hub and Alexa AVS. 1 connected to Comfort, 1 RPI3 in the bedroom.

I\'ll plan to loan 1 RPi3 to Mr. Chiu and the Cytech team for further testing. It\'s been 5 years since I\'ve configured my Comfort/CBUS system, and it\'s just about the right time for enhancements via Alexa.

Looking forward to testing your UPNP Smile

Thanks,

Ben


- benchan001 - 10-16-2016

Hi Matt,

I presently have the older UCM/Serial. I\'ll need to request an upgrade to the Ethernet UCM.

I\'ll plan to have 2 RPi3 and use Home Assistant as the hub and Alexa AVS. 1 connected to Comfort, 1 RPI3 in the bedroom.

I\'ll plan to loan 1 RPi3 to Mr. Chiu and the Cytech team for further testing. It\'s been 5 years since I\'ve configured my Comfort/CBUS system, and it\'s just about the right time for enhancements via Alexa.

Looking forward to testing your UPNP Smile

Thanks,

Ben