Following step one from above, the PR Custom Component will only work if you go and change line 330 in apy.py to: “async with async_timeout.timeout(TIMEOUT):” Otherwise it gives a loop error message when trying to pull the link from step two.
After finishing with the steps, there’s a new discovery with the modified overkiz. When configuring you only get to enter the credentials, there is no choice of hub or local api. Once the credentials are entered all the devices connected to the TaHoma are found. However it seems to be using the cloud and not local api.
Regarding the PR CC, realize this isn’t on your part, but figured for the instructions you might wanna add it to the original post so there won’t be lots of same questions here in the thread
I backtracked now and added the link 71644 pull again.
I now pressed add integration and choose “custom overkiz PR#71644”. In the next step I can choose to add one of the discovered devices (for some reasons it shows up three times). If i choose “Configure one more instance…” instead of one of the discovered devices, nothing happens.
If I choose one of the discovered devices I get a new menu where it asks for my credentials. There is no choice of Hub (if I do the original Overkiz I get to choose Somfy Europe for example). When I today tried entering my credentials I get an unexpected error message. and the logs reads:
Logger: custom_components.overkiz
Source: custom_components/overkiz/config_flow.py:132
Integration: Custom Overkiz PR#71644
First occurred: 21:07:56 (2 occurrences)
Last logged: 21:08:10
local variable 'gateway' referenced before assignment
Traceback (most recent call last):
File "/config/custom_components/overkiz/config_flow.py", line 178, in async_step_cloud
await self.async_validate_input(user_input)
File "/config/custom_components/overkiz/config_flow.py", line 132, in async_validate_input
if re.match(r"\d{4}-\d{4}-\d{4}", gateway.id):
UnboundLocalError: local variable 'gateway' referenced before assignment
That was indeed a small bug I made during development, but it is solved now. Apparently I did not push the latest version…
The discovery is not functional yet, but adding it through ‘Add new integration’ should work. Just make sure you fully scroll down and select TaHoma Developer Mode.
Question: is is possible to have both integrations (the official cloud one and the developer local one) running at the same time? I know that would yield double devices, but I’d rather not uninstall the unoffical one until this works.
Where and when exactly is the choice for “Tahoma Developer Mode” supposed to show up?
Because I never get any such options. Now i backtracked again so I got your newly push and the credentials work again. However when entering them there is no choice for developer mode. And once the credentials are entered, the devices are immediately discovered and I just get to choose which rooms each one is in and then finish.
I also tried adding the “Somfy” integration instead of the Custom Overkiz PR#71644 one. If I press that one, I get a pop up asking if I am sure, “support for Somfy units is available via Custom Overkiz PR#71644. Do you want to continue?” If I choose yes, the popup goes away but nothing more happens…
Note, when adding the Custom Overkiz one I get the same display as post #9 below does. I can’t add manual but am forced to pick one of the three discovered ones.
Can you please share your log? I am running 2022.11 as well and I don’t face any issues, the only change is that I don’t have any instances discovered.
If nothing happens when you click on an option in the Config Flow, there should be an exception in your log.
You wrote somewhere you do not own actual devices. Did you try adding RTS type devices to your Tahoma? These are RF operated devices that do not communicate back. So the Tahoma would not realise you do not have te actual device. The tahoma would just send out RF codes and be done with it.
I can have a look if I can do that, will have a look! Not sure if that will work with the TaHoma Switch as well.
Regarding the discovery, this is related to my development environment. I need to switch to a local installation in order to test this, since this is not supported in my devcontainer unfortunately.
The Tahoma Switch supports RTS. I just tried it on the Tahoma classic - if you say you operated the remote as they asked and that the device responded, it will add it without problems. Only downside is these are all stateless devices due to the lack of 2 way communication.
If I press the “configure one more instance of Custom Overkiz PR#71644” nothing happens at all. There is no update in the log either. The pop-up still remains up. If I press configure on one of the discovered devices I get the following pop-up where there is no choice to make regarding Hub (so can’t choose Tahoma Developer Mode)
If I use the first one (with the Host). I get a red integration and if I press control the logs, the following error is reported:
Logger: homeassistant.config_entries
Source: custom_components/overkiz/init.py:66
Integration: Overkiz
First occurred: 23:05:26 (1 occurrences)
Last logged: 23:05:26
Error setting up entry gateway-xxxxxxxxx.local:8443 for overkiz
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File “/config/custom_components/overkiz/init.py”, line 66, in async_setup_entry
token = entry.data[CONF_TOKEN]
KeyError: ‘token’
If I enter the credentials on the one without the “host” it is successful in finding my devices, however they aren’t using the local api.
(not sure if I need to hide my box pin or not, but the excluded pin is correct and corresponds with the one listed on somfy account)
Sorry for the spam, but I think I got it to work through the help of rjlee on github (here)
Changing the config_flow.py line 47 and 75 to the following got it to work for me:
47 LOCAL = "somfy_europe"
75 if user_input[CONF_HUB] == "somfy_europe":
Note I still had to use the discovered device (the one where the host was needed in addition to somfy credentials) as adding new instance nothing happened still. But this time there was no token error, all devices are found. And they list the gateway/pin for the devices instead of Tahoma Switch so it seems to be running localy. Just comfirmed it runs localy, turned my WAN off but could still control my devices from hassio. Should mention also that I added the local IP and the gateway-xxxx-xxxx-xxxx.local to my etc/hosts file as well to make sure it got picked up, don’t know if that made any difference or not.
Hope this can help others.
////
Update
I keep getting the following log error, usually with 2-5 minutes intervals.
Logger: custom_components.overkiz
Source: helpers/update_coordinator.py:151
Integration: Custom Overkiz PR#71644
First occurred: 01:18:52 (204 occurrences)
Last logged: 20:11:16
Error requesting device events data: Cannot connect to host gateway-xxxx-xxxx-xxxx.local:8443 ssl:default [Invalid argument]"
The devices become unavailable then they are back online a bit later again. Very frustrating behavior.