That’s odd. What specific HomeMatic device are you using?
The only scenario where I could imagine HASS behaving like this would be, if you restart Homegear while HASS is running and not restarting HASS to re-initialize the connection (which can also be done while HASS is running using the homematic.reconnect service).
Which method did you use to reload HASS? homeassistant.reload_core_config is not sufficient, since it does not reconnect. homeassistant.restart would be the service you have to use to make sure communication with Homegear is working.
i have a running FHEM Version. For testing i stop fhem, start homegear wait until homegear shows the devices in the webinterface and finally start homeassistant.
Devices i have testet:
HM-LC-Dim1TPBU-FM
HM-LC-Sw1PBU-FM
HM-LC-Sw1-Pl-2
With “reloading homeassistant” i mean reloading the webinterface in the webbrowser does not help, not restarting with homeassistant.restart or reload_core_config
homeassistant.restart does not change the state of the UI.
Do you think it is more a homegear problem than homeassistant? Or how should i try to search for the problem?
Reloading the UI does not help. It’s just a representation of the internal states, so if a swich flips back, that’s the internal state. The question would be why this is happening.
It could be, that the events Homegear sends to HASS don’t arrive or are somehow corrupt. This would be a problem specific to your setup, since other users using Homegear haven’t reported such problems.
To find out what’s happening, you can set the logging for HASS to be more verbose. Something like this would show more about what’s happening in the inside:
Since you still have fhem running paralle that might also be the source of the issue. It’s been a while since I’ve last used fhem, but I remember that there was some sort of ID you had to configure for the “hub”, which was something like a 6 digit hex string. I don’t know if that’s relevant, but maybe Homegear and fhem collide because of this, even though fhem is stopped.
Anyway, with the log-configuration from above you shoud actually see all the events that arrive at HASS. And our HomeMatic implementation is designed to set the state of HASS entities based on the events we receive from Homegear, since we don’t want to rely on how the state should be, but instead on what Homegear reports the current state is.
So have a look at what’s happening with extended logging and maybe post some of that data so I can have a look at it.
A.LichtRechner is a “HM-LC-Sw1PBU-FM”. What i notice is that the log shows “switch.alichtrechner” but in homegear and the Homeassistant UI the Devicename is shown as A.LichtRechner" (with camelcase and a “.”).
Can my naming of the devices affect the behaviour?
If the “6 digit hex string” would be the issue the light would not be turned on, so i don’t think that there is a problem with it.
This is the event that sets HASS’ internal state. Since your log doesn’t have that: did this event not happen, or did you just not copy that? I don’t have debug enabled, but before the line I’ve posted there should also be a message that looks something like:
This would be the message the HomeMatic library creates when it receives an event from Homegear.
The internal name is automatically generated and should not be a problem. But it sure is worth a try to see how everything behaves if you don’t use the option to resolve names. Internally only the real device ID (MEQ123456) is being used. But maybe there’s some kind of bug related to that that never has occurred until now In that case my first guess would be, that the “.” in the name is the problem. HASS uses the “.” as a separator, like in hostnames/domains.
Have a look at the Homegear logs. Apparently, the connection between HASS and Homegear drops for some reason. While starting up the connection seems to be available, because otherwise HASS wouldn’t receive the list of devices Homegear is controlling. So the connection drop happens after HASS has finished loading. We don’t / can’t detect that in HASS, but maybe the Homegear logs help.