Communication between Homematic and non-homematic devices
Moderator: Co-Administratoren
Communication between Homematic and non-homematic devices
I'm investigating some options to realize some communications between a CCU2 (3?) and non-Homematic devices.
Typically, I look for solutions for the following activiities:
1. Detect if a server is on.
Ping would be a good option, I guess. What would be the best approach for this?
Target: have a LED on the Homematic 16 LED unit light on when the server is up and running. I could use a power actuator, but that seems a bit overkill for this
2. Start some activity on the CCU from the PC.
Could I start a script or simulate some trigger so the CCU sees an 'input change' and could start some action? For example a script could be run on a server (or another device) that would tell the CCU that something has happened, and the CCU could take some action. An option would be setting the value of a variable on the CCU.
3. Read some port or variable.
Similar thing, but in the other direction. Can a program on my PC read the status of a port or the value of a (system) variable on the CCU?
Typically, I look for solutions for the following activiities:
1. Detect if a server is on.
Ping would be a good option, I guess. What would be the best approach for this?
Target: have a LED on the Homematic 16 LED unit light on when the server is up and running. I could use a power actuator, but that seems a bit overkill for this
2. Start some activity on the CCU from the PC.
Could I start a script or simulate some trigger so the CCU sees an 'input change' and could start some action? For example a script could be run on a server (or another device) that would tell the CCU that something has happened, and the CCU could take some action. An option would be setting the value of a variable on the CCU.
3. Read some port or variable.
Similar thing, but in the other direction. Can a program on my PC read the status of a port or the value of a (system) variable on the CCU?
- Psi
- Beiträge: 512
- Registriert: 09.08.2018, 19:58
- Wohnort: Nürnberg
- Hat sich bedankt: 27 Mal
- Danksagung erhalten: 90 Mal
Re: Communication between Homematic and non-homematic devices
Hi,
some keywords that could help:
* Cuxd to create virtual devices that can execute a script (runs on the ccu)
* XML-API to provide an interface to control the CCU from the "outside"
I personally use RedMatic for nearly all "business logic". There are nodes who can fetch from arbitrary HTTP endpoints and others who can provide one.
Also theres the possibility to create some kind of dashboards which could show you if your server is ON
some keywords that could help:
* Cuxd to create virtual devices that can execute a script (runs on the ccu)
* XML-API to provide an interface to control the CCU from the "outside"
I personally use RedMatic for nearly all "business logic". There are nodes who can fetch from arbitrary HTTP endpoints and others who can provide one.
Also theres the possibility to create some kind of dashboards which could show you if your server is ON
-
- Beiträge: 1152
- Registriert: 30.11.2013, 16:35
- Wohnort: Mordor
- Hat sich bedankt: 23 Mal
- Danksagung erhalten: 56 Mal
Re: Communication between Homematic and non-homematic devices
1. Detect if a server is on.
I would use variable for this and a program for the LED 16 that checks every e.g. 5min the status of the variable.
(see with google chrome for variable: https://technikkram.net/2016/07/homemat ... und-nutzen )
Here a little program that would also work for LED 16: https://files.elv.com/Assets/Produkte/1 ... ierung.pdf
You can use CuXD with the Ping possibility to see if server is avaible - if yes than variable set true
Here you can find a description: (use Google Chrome)
https://www.christian-luetgens.de/homem ... Geraet.htm
2. Start some activity on the CCU from the PC & 3. Read some port or variable.
Many programs are avaible for this check also here: Link
- HausMeister
- TrayMatic
- Homematic Manger Tool
...
The CCU uses an open interface HM XmlRPC Interface/API.
https://www.elv.de/Via-Netzwerk-auf-Hom ... tail_30789
(Use google Chrome).
If you will google for Homematic XmlRPC you should find much more - e.g.
https://github.com/hobbyquaker/homematic-xmlrpc
And I also recommend you the Addon Redmatic for CCU3 / RaspberryMatic with many many functions:
Link
But there are also other Communications Addons Avaible like MQTT or XML-API
https://github.com/hobbyquaker/XML-API
viewtopic.php?f=49&t=46890
---------------------------------------------------------------------------------------------------------
You can also control from the CCU your PC - this would also work:
viewtopic.php?f=49&t=47568 - There you find CCU Remote PC:
Here a short description:
http://dragonfly.at/CCU-RemotePC/Optionen.html
Dragonfly the developer of the tool is still active in the forum - question you can ask him on his page or here in the Forum:
viewtopic.php?t=4823
---------------------------------------------------------------------------------------------------------
Let us know if you have more questions or sth is not clear
I would use variable for this and a program for the LED 16 that checks every e.g. 5min the status of the variable.
(see with google chrome for variable: https://technikkram.net/2016/07/homemat ... und-nutzen )
Here a little program that would also work for LED 16: https://files.elv.com/Assets/Produkte/1 ... ierung.pdf
You can use CuXD with the Ping possibility to see if server is avaible - if yes than variable set true
Here you can find a description: (use Google Chrome)
https://www.christian-luetgens.de/homem ... Geraet.htm
2. Start some activity on the CCU from the PC & 3. Read some port or variable.
Many programs are avaible for this check also here: Link
- HausMeister
- TrayMatic
- Homematic Manger Tool
...
The CCU uses an open interface HM XmlRPC Interface/API.
https://www.elv.de/Via-Netzwerk-auf-Hom ... tail_30789
(Use google Chrome).
If you will google for Homematic XmlRPC you should find much more - e.g.
https://github.com/hobbyquaker/homematic-xmlrpc
And I also recommend you the Addon Redmatic for CCU3 / RaspberryMatic with many many functions:
Link
But there are also other Communications Addons Avaible like MQTT or XML-API
https://github.com/hobbyquaker/XML-API
viewtopic.php?f=49&t=46890
---------------------------------------------------------------------------------------------------------
You can also control from the CCU your PC - this would also work:
viewtopic.php?f=49&t=47568 - There you find CCU Remote PC:
Here a short description:
http://dragonfly.at/CCU-RemotePC/Optionen.html
Dragonfly the developer of the tool is still active in the forum - question you can ask him on his page or here in the Forum:
viewtopic.php?t=4823
---------------------------------------------------------------------------------------------------------
Let us know if you have more questions or sth is not clear
-
- Beiträge: 1152
- Registriert: 30.11.2013, 16:35
- Wohnort: Mordor
- Hat sich bedankt: 23 Mal
- Danksagung erhalten: 56 Mal
Re: Communication between Homematic and non-homematic devices
I also found this (use Google Chrome to translate the page)
viewtopic.php?f=31&t=8298
viewtopic.php?f=31&t=8298
-
- Beiträge: 1152
- Registriert: 30.11.2013, 16:35
- Wohnort: Mordor
- Hat sich bedankt: 23 Mal
- Danksagung erhalten: 56 Mal
Re: Communication between Homematic and non-homematic devices
Did our feedback help? Did you achieve your goals?
Re: Communication between Homematic and non-homematic devices
I achieved this using Home Assistant with his HomematicIP integration module.
I like a lot this solution as it is working with the basic HAP and not requiring CCU2/3 or RaspberryMatic
I like a lot this solution as it is working with the basic HAP and not requiring CCU2/3 or RaspberryMatic
-
- Beiträge: 1152
- Registriert: 30.11.2013, 16:35
- Wohnort: Mordor
- Hat sich bedankt: 23 Mal
- Danksagung erhalten: 56 Mal
Re: Communication between Homematic and non-homematic devices
Home Assistant and most other Home Automation Hubs are possible with CCU / RaspberryMatic.
I use for that ioBroker.
viewtopic.php?f=49&t=47068
I use for that ioBroker.
viewtopic.php?f=49&t=47068
Re: Communication between Homematic and non-homematic devices
yes I understood and that was my original ideas but for now I achieve what I wanted with just the HAP; it could be that in the future I will be switching to a CCU/Raspberrymatic solutiontomi_cc16 hat geschrieben: ↑08.01.2019, 18:18Home Assistant and most other Home Automation Hubs are possible with CCU / RaspberryMatic.
I use for that ioBroker.
viewtopic.php?f=49&t=47068
Re: Communication between Homematic and non-homematic devices
Some other stuff came in between... a major case of RLI I guess... First had to build a drop-leaf table and finish a home theater system I also need to find a good replacement for some old Ikea 12V Halogen transformers that are mounted 'in-sight'. But that doesn't stop me reading up and preparing for other things, especially now the floor heating system has proven how well it works over the last three-plus years (except for the incidental CAL error, grrrr).
There are a few things that I want to accomplish in the end, but I am still considering the options. I haven't decided the best approach yet, and it may require dumping my CCU2 and switching to a CCU3 or RaspberryMatic or use RedMatic or whatever. Here are the projects I'm working on / considering (note that I'm not in a hurry):
1. Detect Calibration errors and empty batteries. Unfortunately I was never able to get this to work properly. How a valve can be in a CAL alarm and still the CCU can't see such a simple error is beyond me. I've also found the CCU to behave strangely when checking for too many error conditions on multiple devices at the same time (above a certain number of checks it would simply no longer detect changes, very weird). I may never be able to fix this one though...
2. Something to send a WOL to my server (this I need to start some other stuff, as well as wake up a server for remote access). I've got an older Pi laying around somewhere, but as the CCU is always on that might be a better option. One way is to use CCUxDaemon I believe, but I'm not entirely sure about the security aspects. Need to dig a little deeper.
3. Automagically switch on a tablet and launch a specific program, depending on information retrieved from the Homematic system. I've done some early work on this one. Probably works best by having Homematic toggle the power to that tablet (from on to off and back on). Almost every tablet then goes through a power event routine, and switches on the screen and (optionally) runs some code. On Android I could then use Tasker or Automate to detect the power-on event. The next step would be to get some information from the CCU so the kind of event can be detected, then take subsequent action from within Automate. This way a tablet could show specific messages ('laundry ready'), act as a display interface, or even launch a CCTV app upon infrared movement detection.
4. A more luxurious and faster web interface (RedMatic looks promising, but I haven't decided yet, it's not a very high priority for now).
5. Find a way to communicate with a Heat Recuperation System (Zehnder WHR950). I'm considering options to have it detect usage of the bathroom for a longer period, then increase ventilation for half an hour or so. One way is to add a flow detector, a PIR unit is another way (assuming a person in the bathroom for more than 15 minutes warrants a ventilation cycle, or some similar logic). Completely useless, but fun
6. Find a way to communicate with a set of Milight LED lamps (attendance simulation).
7. Find a way to communicate with an Egardia alarm system (also for attendance simulation).
That should keep me busy for a while Again, I'm not in a hurry, working on a thousand fun projects simultaneously...
There are a few things that I want to accomplish in the end, but I am still considering the options. I haven't decided the best approach yet, and it may require dumping my CCU2 and switching to a CCU3 or RaspberryMatic or use RedMatic or whatever. Here are the projects I'm working on / considering (note that I'm not in a hurry):
1. Detect Calibration errors and empty batteries. Unfortunately I was never able to get this to work properly. How a valve can be in a CAL alarm and still the CCU can't see such a simple error is beyond me. I've also found the CCU to behave strangely when checking for too many error conditions on multiple devices at the same time (above a certain number of checks it would simply no longer detect changes, very weird). I may never be able to fix this one though...
2. Something to send a WOL to my server (this I need to start some other stuff, as well as wake up a server for remote access). I've got an older Pi laying around somewhere, but as the CCU is always on that might be a better option. One way is to use CCUxDaemon I believe, but I'm not entirely sure about the security aspects. Need to dig a little deeper.
3. Automagically switch on a tablet and launch a specific program, depending on information retrieved from the Homematic system. I've done some early work on this one. Probably works best by having Homematic toggle the power to that tablet (from on to off and back on). Almost every tablet then goes through a power event routine, and switches on the screen and (optionally) runs some code. On Android I could then use Tasker or Automate to detect the power-on event. The next step would be to get some information from the CCU so the kind of event can be detected, then take subsequent action from within Automate. This way a tablet could show specific messages ('laundry ready'), act as a display interface, or even launch a CCTV app upon infrared movement detection.
4. A more luxurious and faster web interface (RedMatic looks promising, but I haven't decided yet, it's not a very high priority for now).
5. Find a way to communicate with a Heat Recuperation System (Zehnder WHR950). I'm considering options to have it detect usage of the bathroom for a longer period, then increase ventilation for half an hour or so. One way is to add a flow detector, a PIR unit is another way (assuming a person in the bathroom for more than 15 minutes warrants a ventilation cycle, or some similar logic). Completely useless, but fun
6. Find a way to communicate with a set of Milight LED lamps (attendance simulation).
7. Find a way to communicate with an Egardia alarm system (also for attendance simulation).
That should keep me busy for a while Again, I'm not in a hurry, working on a thousand fun projects simultaneously...
-
- Beiträge: 1152
- Registriert: 30.11.2013, 16:35
- Wohnort: Mordor
- Hat sich bedankt: 23 Mal
- Danksagung erhalten: 56 Mal
Re: Communication between Homematic and non-homematic devices
1. Homematic Manager is a great tool to find the right values and use them/save them as variables
https://github.com/hobbyquaker/homemati ... /tag/2.3.0
Eg. HM-CC-RT-DN
For channel 4 - I can check/create variables for temperature, low battery, value state, ...
Those I can display or use later in programs.
What you cannot do is to find out if HM-CC-RT-DN is in Installation mode "INS" - even valve state is open in "100%" it shows "0%" like after a device firmware update. After the firmware update of HM-CC-RT-DN in INS status press the boost button to do the calibaration - only manually possible.
2. I did with CuxD - 2min work:
Wake-on-LAN (for PC, NAS, ...)
Install latest CUxD Addon
Create a new Program on the CCU / RaspberryMatic with Code:
string stderr;
string stdout;
string wake;
wake = "/usr/local/addons/cuxd/extra/ether-wake -Your MAC-Adress";
system.Exec(wake, &stdout, &stderr);
You can also use Etherwake:
https://www.christian-luetgens.de/homem ... erwake.htm
or Redmatic:
https://flows.nodered.org/node/node-red-node-wol
3. People use for Android tablet the Home24-Mediaplayer:
http://www.home-24.net/wiki/index.php?t ... svergleich
http://192.168.x.x:50000/screenon
http://192.168.x.x:50000/screenoff
http://192.168.x.x:50000/screentimeout=10
or easier the Home Tablet Remote:
viewtopic.php?t=40874
4. Well CCU3 / Raspberrymatic everything is faster than CCU2 here are some pics from the Redmatic Webapp:
https://github.com/HM-RedMatic/RedMatic-WebApp
5. Just an idea best would be to find a way to MQTT it
6. Redmatic (internal solution) or IoBroker and Home Assitant (external solution) can do Homematic CCU /RaspberryMatic and Mi light
RaspberryMatic Milight LED
viewtopic.php?t=30275&start=10
https://github.com/foxthefox/ioBroker.milight
https://www.home-assistant.io/component ... omi_aqara/
7. Home Assistant has already an Component for Egardia:
https://www.home-assistant.io/components/egardia/
There is a Phyton Libary in github - so you can become creative.
https://github.com/jeroenterheerdt/python-egardia
https://github.com/hobbyquaker/homemati ... /tag/2.3.0
Eg. HM-CC-RT-DN
For channel 4 - I can check/create variables for temperature, low battery, value state, ...
Those I can display or use later in programs.
Code: Alles auswählen
var temp = dom.GetObject("Temperatur");
var temp = dom.GetObject("Error Status")
var ventil = dom.GetObject("Ventil");
var t = dom.GetObject("BidCos-RF.KEQ0999999:4.ACTUAL_TEMPERATURE");
var f = dom.GetObject("BidCos-RF.KEQ0999999:4.FAULT_REPORTING");
var v = dom.GetObject("BidCos-RF.KEQ0999999:4.VALVE_STATE");
temp.State(t.Value());
error.State(f.Value());
ventil.State(v.Value());
2. I did with CuxD - 2min work:
Wake-on-LAN (for PC, NAS, ...)
Install latest CUxD Addon
Create a new Program on the CCU / RaspberryMatic with Code:
string stderr;
string stdout;
string wake;
wake = "/usr/local/addons/cuxd/extra/ether-wake -Your MAC-Adress";
system.Exec(wake, &stdout, &stderr);
You can also use Etherwake:
https://www.christian-luetgens.de/homem ... erwake.htm
or Redmatic:
https://flows.nodered.org/node/node-red-node-wol
3. People use for Android tablet the Home24-Mediaplayer:
http://www.home-24.net/wiki/index.php?t ... svergleich
http://192.168.x.x:50000/screenon
http://192.168.x.x:50000/screenoff
http://192.168.x.x:50000/screentimeout=10
or easier the Home Tablet Remote:
viewtopic.php?t=40874
4. Well CCU3 / Raspberrymatic everything is faster than CCU2 here are some pics from the Redmatic Webapp:
https://github.com/HM-RedMatic/RedMatic-WebApp
5. Just an idea best would be to find a way to MQTT it
6. Redmatic (internal solution) or IoBroker and Home Assitant (external solution) can do Homematic CCU /RaspberryMatic and Mi light
RaspberryMatic Milight LED
viewtopic.php?t=30275&start=10
https://github.com/foxthefox/ioBroker.milight
https://www.home-assistant.io/component ... omi_aqara/
7. Home Assistant has already an Component for Egardia:
https://www.home-assistant.io/components/egardia/
There is a Phyton Libary in github - so you can become creative.
https://github.com/jeroenterheerdt/python-egardia