I am new to HomeAssistant - I tried to read the Docs etc. but I guess I was not too successful And I am not really sure if configuration is the right spot for this (but 3rd party integration or hardware neither).
At the beginning, I’d like to use HA mainly for Heating Control (Smart Radiator Valves), later on I might extend it to oil and water tank level monitoring, lighting control, etc. That’s also the main reason to go with HA instead of a “complete” product like Netatmo.
What I want in the beginning (basic heating):
Read temperature values (current, set) of valves (e.g. every 15 minutes, or if it changes) and story it for historical data
Set temperature values of valves (or group of valves if multiple in one room)
React to manual temperature change at a valve (e.g. set the temperature for the room / all vavles to the changed value, or maybe only this one, don’t know yet)
Read temperature values from wall thermostat (again, to set room temperature on group of valves)
Define time schedules to automatically lower temperature during the day (no one at home) or night (sleep mode)
Define different modes: winter mode (normal heating with schedules), holiday mode (lower temperatures in general), summer mode (no heating/disabled)
Later on, I might want to add:
Heating oil tank level monitoring (e.g. read level every 6 hours)
Water flow monitoring of the main pipe
Rain-water tank level monitoring (e.g. read level every 1 hour)
Control lighting (light switches, light bulbs)
Maybe control some devices with power plugs
Other stuff like automatically water plants and so on … but waaaay in the future
Now, I’ve read a lot about which radiator valves etc. and I guess I decided to go with HomeMatic IP - they have a good variety of products (valves, wall thermostat, in-the-wall light switches, power plugs, …).
What I do not really understand: as far as I got it, they use a proprietary communication protocol (compared to ZigBee or Z-Wave). As I want to have as less additional devices (bridges etc.) as possible:
is their CCU mandatory (so basically HA connects to CCU via e.g. REST and CCU to the devices via proprietary protocol) or can I somehow omit the CCU and do it directly via some kind of USB stick / GPIO board?
does anybody know if it is possible to read the set AND current value from the HomeMatic IP valves?
And for HA: I already have a RasbPi 4 (4GB). I plan to extend it using the 7" touch screen. The touch screen should show a dashboard (e.g. for heating). Additionally I’d like to add a battery / power bank so that HA works for some time even if power grid is down. Any recommendations on this (don’ts, do’s)?
In general, tipps regarding the setup above are very welcomed
Hello and welcome to the forum. I also have an RPi, but the RPi 3. I have recently had Homematic IP with the original bridge, so far I have connected four thermostats. The setup in HA was very simple via the “integration”. The thermostats show you the current temperature as a sensor . The “Heating Level” is also displayed, I suspect that indicates how far the valve is open. In addition, the status of the battery is displayed. Here are a few screenshots of the “clicked” sensors …
As a newcomer to HA, you may also be interested in NodeRED, it can be installed as an add-on in HA. Have fun with HA and if there are problems you will most likely be helped here in the forum, these are great people here …
You have a lot of plans there, I suspect that everything will be possible. Here in the forum there is definitely someone who can give you more detailed information.
Get the HomeMatic IP Access Point and use this integration (does not work fully offline as far as I know).
Get a CCU / RasperryMatic and use this integration (manual setup, a bit more complex, but works offline)
Use the HomeMatic add-on with the hardware-dongle that meets your requirements and run everything on only one machine. This also uses the integration from option 2.
In general everything you want to do will be possible in some way, albeit with some amount of work to configure everything.
One topic I advise to search Google for is “HomeMatic Direktverknüpfungen”. Even though Home Assistant is great for automating all this - especially in conjunction with with presence detection - “Direktverknüpfungen” allow you to offload quite some automation logic onto the devices. With battery powered devices this will keep everything working even during a power outage, and without Home Assistant being available to take control. I have programmed my thermostats to a useful default behavior where they operate fully autonomous, and only in some cases use Home Assistant to control them manually in cases where my programmed defaults don’t match the current requirements. That way such elementary functions like heating always do their job, regardless of Home Assistant being functional (which is not the case when you perform an upgrade, or if you have messed up something and have to rebuild everything).
Wow, thank you very much you two for your extensive answers!
@VolkerKa: on which component have you implemented the logic (e.g. controlling the radiator valves depending on the temperature from the thermostat, or a night or holiday mode with lower temperatures)? On the CCU or on the HomeMatic?
@danielperna84: Aah, so basically RasperryMatic is really only a “copied” CCU, so I would still have two devices (HomeMatic + CCU or RasperryMatic). Is there any advantage / disadvantage in using the CCU vs. one of the hardware-dongles (e.g. range, features which are easy available in the CCU but needs to be complexly built in HA by hand)? Good to know about the “Direktverknüpfungen”, thanks!
Btw: my plan is to give the HA-RaspberryPi a big power bank so that survives some dozens hours even if the power grid fails.
HomeMatic Wall thermostats and radiator valves can (and should be) directly paired. Once you have done that you don’t have to build any logic constructs to control the valve from the thermostat. You can even add shutter-contacts for doors / windows to these groups, in which case the valve will automatically close if the window is opened.
Yes, RaspberryMatic is a CCU that’s running on a RaspberryPi. So there would be two devices. That’s how I have it.
I don’t have any experience with the hardware dongles when used with the CCU-addon. My RaspberryMatic uses the PCB from the “Charly Bausatz”, and reception is pretty much equal to the old real CCU2.
I wouldn’t use the HomeMatic UI for anything else but pairing the devices and managing the thermostat groups and Direktverknüpfungen. Both things that can also be done with 3rd party tools when using the CCU-addon for Home Assistant.
Automation logic should only be at one place, and that’s you automation-hub (Home Assistant in this case). The internal programs of the thermostats (or other actors with Direktverknüpfungen) are the only exception to this rule.
You plan using a power bank might fail. Modern Raspberries require at least 2,4 amps to provide enough power to run stable. Only few power banks deliver that. On top of that, most power banks interrupt the power flow for a short amount of time when they loose their main power source, causing your connected machines to crash. Besides that, 20.000mha (which I would consider quite big by todays standards) isn’t really much for how much power raspberries require. I recommend a real UPS, preferrably with compatible with Home Assistant so you can react to the power loss.
And one thing to keep in mind: apart from being directly functional when power is back, an always running HA-hub doesn’t provide a real benefit. You can’t control your lights or whatever when there is no power.
Is it possible to switch from the HomeMatic add-on to a RaspberryMatic installation without connecting all devices from skretch to the new installation?
Background: I want to move my hassio installation from RPi4 to my Synology NAS and have to use a RPi to connect the HM-MOD-RPI-PCB to.
I don’t know the answer to that question. If I’m not mistaken, the add-on emulates a full CCU. So you should be able to access the CCU website and create a regular backup. Maybe RaspberryMatic is able to import that backup and work right away because the HM-MOD-RPI-PCB will be the same. But that’s just a wild guess. This could go terribly wrong for devices that use AES. If the process fails, those devices would be bricked.
The only route I would go (if I chose not to unpair all devices):
Make a CCU-backup on the hassio HomeMatic
Get a second Pi to install RasperryMatic on
Turn of the current hassio
Move the Radio to the second Pi
Try to import the backup
If it fails you would just have to move back the radio to the hassio-device and, hopefully, all devices would work as before. In that case you still could unpair all the devices, and then re-pair them with RaspberryMatic later on.
But as I said before, that’s all just a wild guess.
In the meantime I have installed a RasPi4 (with Touchsreen ), which runs HA in a docker container, and a CCU3. I have added 7 valve thermostats (HmIP-eTRV-2) and 1 wall thermostat (HmIP-WTH-2) to the CCU3. For the living room, I created a group with 3 valves and the wall thermostat, so all members of the group have direct connections between them. Everything works fine so far.
Now I tried to integrate the CCU3 into HA by using the HomeMatic integration mentioned by @danielperna84 (option 2). But I just cannot get it running.
I see my CCU3 as entity (ID homematic.ccu3, value 1), but I dont’ know neither how to get the valves and wall thermostat into HA nor how to troubleshoot this.
I would really appreciate a push into the right direction
Here is the part of my /config/configuration.yaml (validation check OK):
2020-03-20 22:40:42 WARNING (MainThread) [homeassistant.setup] Setup of homematic is taking over 10 seconds.
2020-03-20 22:44:57 WARNING (SyncWorker_10) [pyhomematic._hm] Failed to initialize proxy
Firewall in CCU3 is set to restricted, IP and whole 192.168.0.0/16 subnet is permitted (and according to nmap, the ports used above are all reachable).
Some things I don’t understand:
Do I need the callback_ip/callback_port option in the interface configuration because I’m running HA in a Docker container?
In the host section, there is the port option (Port of CCU/Homegear XML-RPC Server. Wireless: 2001, wired: 2000, IP: 2010) - as I do only have Homematic IP devices, I thought I will use 2010. Is this correct?
How can I troubleshoot if everything works fine? Are there any additional logfiles? Any debug mode?
How do I add the Homematic IP devices to HA? Do they pop up automatically or do I need to add them all from hand somehow?
Yes, that could be the case. It depends on which network type you use in Docker. If the container uses the internal network (something like 172…), then you have to set the callback IP to the IP of the machine Docker is running on. The callback port would be the one that gets forwarded to the container. For that you also have to manually set the local port in the HomeMatic configuration.
Yes. Because you only use HmIP you can remove the two blocks in your configuration that are identified by rf and wired. However, you set it to 42010, which also is correct for ssl: true. For the host configured below though 2010 is incorrect. That’s the port by wich you acccess the CCU via browser. So most likely 80 or 443.
Yes. You can put this into your configuration.yaml:
They will appear automatically. You don’t have to do anything besides adding the yaml-configuration.
By setting the log like I have posted above you will get a DEBUG-message right before the Failed to initialize message you get. It will look like proxyInit: Exception: some error…. That will help to figure out what the problem is.
Thanks for your fast answer and your help - greatly appreciated!
It seems that A) callback_ip is not needed as it detects the IP of the docker host correctly and B) callback_port should NOT be used because EVERY TIME the docker container restarts, another port (additional to tcp/8123) is forwarded to the docker container. And used correctly for callback (see CCU logs below).
I removed rf and wired for now and removed ssl as well. If omitted, the port option of the host (ccu3) defaults to 2001 (which equals wired). If I use 2001 or nothing, the value of homematic.ccu3 is 0. If I use 2010 the value changes to 1. To be honest, I have no clue what the value exactly means, but I would guess that 1 is like “connection ok” or “host is there” … ?
Thanks, very helpful! I noted in the CCU logs that the callback address seems to be fine (even or especially without callback_ip/callback_port). Proxy can be initialized as well. But somehow (and as far as I understood the logs), the callback method for homeassistant-ip runs into a Connection timeout. Edit: Changing the CCU3 firewall to “Ports open” and “Full Access” for everything changes nothing. Timeout after a bit more than 2 minutes.
Another stupid question: I thought that the HomeMatic devices should appear in HA under Configuration > Devices or Entities. Is this assumption correct?
I’ll get some sleep now - maybe I see the error tomorrow in plain sight …
Mar 21 00:39:44 de.eq3.cbcs.legacy.bidcos.rpc.LegacyServiceHandler INFO [vert.x-worker-thread-0] (un)registerCallback on LegacyServiceHandler called from url: http://192.168.130.10:42299
Mar 21 00:39:44 de.eq3.cbcs.legacy.bidcos.rpc.LegacyServiceHandler INFO [vert.x-worker-thread-3] init finished
Mar 21 00:39:44 de.eq3.cbcs.legacy.bidcos.rpc.internal.InterfaceInitializer INFO [vert.x-worker-thread-3] Added InterfaceId: homeassistant-ip
Mar 21 00:39:44 de.eq3.ccu.virtualdevice.service.internal.rega.VirtualDeviceHandlerRega INFO [vert.x-eventloop-thread-3] (un)registerCallback on VirtualDeviceHandlerRega called from url: http://192.168.130.10:42299
Mar 21 00:39:44 de.eq3.ccu.virtualdevice.service.internal.rega.VirtualDeviceHandlerRega INFO [vert.x-eventloop-thread-3] Added InterfaceId: homeassistant-groups
Mar 21 00:39:44 de.eq3.ccu.virtualdevice.service.internal.rega.BackendWorker INFO [vert.x-worker-thread-3] Execute BackendCommand: de.eq3.ccu.virtualdevice.service.internal.rega.BackendUpdateDevicesCommand
Mar 21 00:41:35 de.eq3.cbcs.server.core.otau.DeviceBackgroundUpdateSubsystem INFO [vert.x-eventloop-thread-1] SYSTEM: 1 Accesspoints in Queue
Mar 21 00:41:35 de.eq3.cbcs.server.core.otau.DeviceBackgroundUpdateSubsystem INFO [vert.x-eventloop-thread-1] SYSTEM: Permanent-/Burstlistener Handler utilization: 0/50 used
Mar 21 00:41:35 de.eq3.cbcs.server.core.otau.DeviceBackgroundUpdateSubsystem INFO [vert.x-eventloop-thread-1] SYSTEM: Eventlistener Handler utilization: 0/50 used
Mar 21 00:41:35 de.eq3.cbcs.lib.remotecommadapter.device.service.AccessPointWatchdog INFO [vert.x-eventloop-thread-5] SYSTEM: Access Point Watchdog running periodic connection check...
Mar 21 00:41:57 de.eq3.cbcs.legacy.bidcos.rpc.internal.InterfaceInitializer ERROR [vert.x-worker-thread-3] IO Exception: Could not add interface: homeassistant-ip
de.eq3.cbcs.legacy.communication.rpc.RpcIOException: java.net.ConnectException: Connection timed out (Connection timed out)
at de.eq3.cbcs.legacy.communication.rpc.internal.transport.http.HttpTransport.sendRequest(HttpTransport.java:110)
at de.eq3.cbcs.legacy.communication.rpc.internal.rpc.RpcClient.sendRequest(RpcClient.java:94)
at de.eq3.cbcs.legacy.communication.rpc.internal.rpc.RpcClient.invoke(RpcClient.java:82)
at com.sun.proxy.$Proxy21.listDevices(Unknown Source)
at de.eq3.cbcs.legacy.bidcos.rpc.internal.LegacyBackendClient.listDevices(LegacyBackendClient.java:139)
at de.eq3.cbcs.legacy.bidcos.rpc.internal.DeviceUtil.synchronizedBackendDevices(DeviceUtil.java:142)
at de.eq3.cbcs.legacy.bidcos.rpc.internal.InterfaceInitializer.handle(InterfaceInitializer.java:109)
at de.eq3.cbcs.legacy.bidcos.rpc.internal.InterfaceInitializer.handle(InterfaceInitializer.java:26)
at io.vertx.core.eventbus.impl.HandlerRegistration.deliver(HandlerRegistration.java:212)
at io.vertx.core.eventbus.impl.HandlerRegistration.handle(HandlerRegistration.java:191)
at io.vertx.core.eventbus.impl.EventBusImpl.lambda$deliverToHandler$3(EventBusImpl.java:505)
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337)
at io.vertx.core.impl.TaskQueue.lambda$new$0(TaskQueue.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection timed out (Connection timed out)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:120)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:179)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:612)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:884)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at de.eq3.cbcs.legacy.communication.rpc.internal.transport.http.HttpTransport.sendRequest(HttpTransport.java:106)
... 15 more
Mar 21 00:46:35 de.eq3.cbcs.server.core.otau.DeviceBackgroundUpdateSubsystem INFO [vert.x-eventloop-thread-1] SYSTEM: 1 Accesspoints in Queue
Mar 21 00:46:35 de.eq3.cbcs.server.core.otau.DeviceBackgroundUpdateSubsystem INFO [vert.x-eventloop-thread-1] SYSTEM: Permanent-/Burstlistener Handler utilization: 0/50 used
Mar 21 00:46:35 de.eq3.cbcs.server.core.otau.DeviceBackgroundUpdateSubsystem INFO [vert.x-eventloop-thread-1] SYSTEM: Eventlistener Handler utilization: 0/50 used
Mar 21 00:46:50 de.eq3.cbcs.server.core.otau.DeviceBackgroundUpdateSubsystem INFO [vert.x-eventloop-thread-1] AP 3014F711A0001F9A499232F8: OTAU Handler 9177d3c8-3a71-432f-8670-a0e6c006a15c continues for device(s) [3014F711A0000A18A9A674D5]
Yes, in your setup the settings seem not to be required.
No, the number is the count for Servicemeldungen. In any case, the interfaces section is something completely different than the hosts section. The protocol-specific ports (2000, 2001, 2010 and 9292) only apply to the interfaces section. So your ccu3-section should either have no port configured at all, or 80 or 443. It will not get the correct data from any of the other ports mentioned.
You can tell if the cc3-entity is working by clicking on it. You should see a list of CCU system variables as the attributes. In general this entity is just a helper for those that want to get notified about service messages or other variables. If you don’t use them you don’t even need the hosts section.
After the changes you have made the error from your previous post has disappeared. So at first sight in terms of configuration everything seems fine. The remaining question would be why the connection from CCU to HASS times out. Does the machine where Home Assistant is running have a firewall? As you have seen, a dynamic high port is used where it creates a listener for events from your CCU. These events (which includes the list of available devices) are essential to this integration. So for this to work your machine either has to accept all incoming connections, or you set the local port manually and add a firewall rule to allo that specific port.
Historically: no. I’m not on the latest Home Assistant version, so I don’t know if this has changed. But the list of devices I think you are referring to only gets populated with entities that are configured via integrations (the things you can setup within the Home Assistant UI). Manual integrations don’t reveal their entities there. You will just see them directly in your Home Assistant UI.
I used port 2010 for the host ccu3 - this works, I guess because the CCU itself is listed as device as well (once as RF and once as HmIP). Nevertheless, according to the debug log, the connection to the CCU is still via port 80 (I guess that’s hardcoded). If I change the port of host ccu3 to e.g. 80, the logs shows an error.
Yeah, that’s the funny part now. First of all: CCU3 and HA are in a separate subnet, all other devices (e.g. my computer) are routed there via my pfSense firewall. I enabled SSH on CCU3 and started to debug with netcat, curl and tcpdump and I noted, that connections from anywhere to CCU3 and HA were possible, as well as from anywhere (includinng HA) to CCU3. But NOT from CCU3 to HA; I saw the first two packets of the TCP handshake but nothing more. And than, I noted that on my Raspi4 with HA on top, the routing table did NOT show an entry for the subnet itself (192.168.130.0/24), only for its own IP (192.168.130.10) and the default route to 192.168.130.1. So all traffic from HA to CCU3 went via firewall, all return traffic went directly. Means that for sessions initiated by HA, the firewall got the TCP SYN packet, created a session for it and permited all further packets. On the other hand, for sessions initiated by CCU3, the firewall did not get the TCP SYN packet and therefore did not create a session for it, therefore all further packets (e.g. the TCP SYN-ACK from HA) have been dropped. Typical asymmetric routing issue. So the solution: I uninstalled network-manager (which I previously installed as mentioned in the hass.io Docker documentation somewhere) and reverted to dhcpcd -> everything is fine now.
And yes all HmIP devices showed up immediately. They are also visible in Configuration > Entities
Thank you again very much for your help!
And sorry for wasting your time by generating such issues through network misconfiguration
Hi Daniel,
I’m new to HA as well and currently look into connecting my raspberrymatic to HA using you option 2.
Get a CCU / RasperryMatic and use this integration (manual setup, a bit more complex, but works offline)
My problem is that I can’t find the integration in the “integrations” list in HA->Settings(Einstellungen). There is only a HomematicIP Option which I assume wants to connect to the Homematic Web Services. The documentation of the integration linked seems to be valid for use with a previous HA Version using the configuration.yaml which in the current releas seems to have gone?
Sorry, I am a bit confused. I would really appreciate if you could point me into the right direction.
I am using both RF and HMIP RF Devices which I would like to connect to HA.
Configuration via yaml is still supported, and currently also the only way you can enable the HomeMatic integration. So the documentation is still accurate.
@danielperna84 I also want to integrate Homematic with home assistant but still have some questions.
I ordered the following stuff from Homematic:
5x HMIP VD24N Actuators 24 V
1x HMIP FAL24-C6 HomeMatic IP 6-way underfloor heating actuator, 24 V
1x HMIP FAL24-TR HomeMatic IP transformer for underfloor heating actuators — 24 V
2x HMIP ETRV-B Radiator thermostat - basic
1x Homematic IP Access Point (basically got it for free)
1x Homematic CCU3
3x HMIP STHD Homematic IP Temperature-Humidity Sensor Disp.
There are 3 zones in the house that use floor heating, because of that I ordered 3 temperature sensors and 5 actuators (one zone has multiple heating groups). The radiator thermostats are for upstairs and will be controlled separately. However my first question here is am I missing something to make this work and is the Homematic IP access point unnecessary in this system (as mentioned basically got it for free). Second question is that on the floor heating unit there are 5 groups (where the actuators will be placed) but there is also an other valve to control the temperature, does this valve also need a smart radiator thermostat? See the picture for reference:
Since I’m in no way a product expert for HomeMatic, please ask such a question at the official HomeMatic forum. There you’ll find the real experts.
What I can say though: the AP isn’t necessary, but I think I’ve heard that it can be repurposed as some sort of range xtender for the signal. But again, that’s something the people at the official forum could tell you more about.
Hey, i currently trying the HomeMatic add-on with the USB Dongle.
I have then connected two HMIP Devices, which I also see in HA.
My problem is now that when i restart the addon or the Raspberry PI the Devices don‘t reconnect automatically. Only after I do a reset on the HMIP Device itself (remove power - press button 4 seconds - press button 4 seconds again) the devices are accessible again.
Has anyone else this problem, or do you have any ideas how to fix this?
I have just bought a Charly-Bausatz out of the intention to run an All-in-One appliance, meaning a coexistance of HA, Homematic (and NodeRed), as mentioned by danielperna as option 3 .
As my device features this so called New Radio (RPI-RF-MOD), this seems to be an obstacle for the Homematic integration.
So, would someone be so kind as to publish a foolproofly working hardware setup for my desired all-in-one appliance (if not best practices lead to a different architecture, be it option 1 or 2)?
Fairly new to Home Assistant and was hoping to get some advice. I am using Homematic IP thermostats and I do have the CCU bridge. My question is, how do I break away from the app. As an example:
All the thermostats have a temperature profiles set in the app. Shall I set up a temperature profile in home assistant or should I set them all to manual and use automations to set their temperatures? I have not found a temperature profile option in home assistant. I also have not figured out how to delete the profiles set up in the app.
How do you automate vaction mode in Home Assistant? I do see there is a service “HomematicIP Cloud: Activate Vacation”, but you have to specify an end date. I want it to be more automatic than that. One option I guess is to specify an end date far out from your current date and then just deactivate vacation mode with an automation when I return.
I’d be interested to understand how everyone uses their thermostats.