The event session is negotiated once when the integration starts, and normally never needs to be renegotiated (but as we saw, it sometimes fails anyway)
The command sessions are very short-lived, and they typically timeout after 90 to 120 seconds, so for those I negotiate a new one for each command sent, and close it properly each time as well.
2021-07-19 15:53:29 WARNING (MainThread) [custom_components.myhome] Connection interrupted, reconnecting...
2021-07-19 15:53:29 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MyHomeServer1 Gateway for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 461, in async_setup_entry
return await component.async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2021-07-19 15:53:29 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MyHomeServer1 Gateway for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 74, in async_setup_entry
return await hass.data[DOMAIN].async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2021-07-19 15:53:29 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MyHomeServer1 Gateway for cover
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/cover/__init__.py", line 159, in async_setup_entry
return await hass.data[DOMAIN].async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2021-07-19 15:53:29 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MyHomeServer1 Gateway for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 162, in async_setup_entry
return await hass.data[DOMAIN].async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2021-07-19 15:53:29 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MyHomeServer1 Gateway for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 141, in async_setup_entry
return await hass.data[DOMAIN].async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2021-07-19 15:53:29 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MyHomeServer1 Gateway for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 87, in async_setup_entry
return await component.async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
Thinking about it more, sending an ACK will probably not be enough since it will ‘stay’ in the command session.
You can send a status query for one of your lights for example, this will force the light to reply on the bus and the traffic will be picked-up by the event session.
Hi, I have a F454 gateway wich is not found when trying to install MyHome. My rasp and the gateway are on the same network
Ran the the discovery script manually but no output. Connecting with python -m OWNd -v 2 -a 192.168.1.82 -p 20000 -P xxxxx works well.
Is there a way to manually configure the gateway during installation ?
can someone please help guiding me how to install this integration?
I can’t find it in the official integration list nor do I see it in the HomeAssistant UI.
Thanks
@Crypt0-M3lon Yes! You can now manually configure the gateway if necessary.
During setup, you will get a dropdown menu to select (one of) the discovered gateway, and you will get a “custom” option as well.
From there you can manually enter your gateway’s details.
@rotman253 This integration is not an official integration, you need to install it with HACS (you’ll need add the “MyHome” repository that’s in the first post of this thread in HACS before it is visible)
@dirk291 Did your issue reoccur since adding the “keep-alive”?
Hello guys and @anotherjulien ,
I’ have updated the F454 firmeware yesterday + changed the gateway IP and…
Is it possible to define the gateway manually in the configuration.yml ?
When i do python -m OWNd -a 192.168.1.3 -p 20000 -P xxxxxx, i get a beautiful error:
> 2021-08-03 20:06:52,569 - OWNd - ERROR - Received data could not be parsed into a message: Traceback (most recent call last): File “/usr/local/lib/python3.9/site-packages/OWNd/connection.py”, line 441, in get_next data = await self._stream_reader.readuntil(OWNSession.SEPARATOR) AttributeError: ‘OWNEventSession’ object has no attribute ‘_stream_reader’
Forgot i was using the wrong IP. Now i can connect to the gateway with OWNd but the gateway is not discovered by HA.
@dominik978 your gateway is not discovered because the ‘key’ used to identify it is the MAC address, so as far as HA is concerned it’s still the same.
There should be a mechanism in place that would update its IP address (among other information) if it’s re-discovered with the same MAC but a different IP. I did not have the opportunity to test it in practice, so I guess it does not work
I think you should be able to delete your gateway from the “Integrations” tab, and re-add it.
Otherwise, you could manually edit /config/.storage/core.config_entries and change its IP address there. You’ll need to restart HA after that.
@Crypt0-M3lon good catch! I’ll remove this clause from the next release