home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.13k stars 29.8k forks source link

Tahoma component failing #29398

Closed dennismeng closed 4 years ago

dennismeng commented 4 years ago

Home Assistant release with the issue: 0.102.3

Last working Home Assistant release (if known): Possibly 0.101.2

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io

Integration: https://www.home-assistant.io/integrations/tahoma/

Description of problem: After updating to 0.102.3, the Tahoma component no longer can load. In the log it says "Error during setup of component tahoma". Since it didn't work, I tried to downgrade to the version I had before, 0.101.2 but it still didn't work - same errors. Full log is posted further down.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

     username: "xxxxx@yyyyy.dk"
     password: "Password"
     exclude: [BridgeHUEComponent, HueLampHUEComponent, PodComponent, PodV2Component, TSKAlarmComponent]```

**Traceback (if applicable):**


**Additional information:
Error during setup of component tahoma
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 44, in login
    result = request.json()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tahoma/__init__.py", line 73, in setup
    api = TahomaApi(username, password)
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 30, in __init__
    self.login()
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 49, in login
    request.reason + "(" + error + ")")
TypeError: can only concatenate str (not "int") to str
**
cwildt commented 4 years ago

Same here, are you also using your connexoon login data? They did a server maintenance yesterday.

dennismeng commented 4 years ago

Same here, are you also using your connexoon login data?

To be honest, not sure? How would I figure it out? I have a logon page at tahomalink.com which I assume the component uses :) when I use my credentials there, it works fine.

dickesW commented 4 years ago

I received a mail from somfy on monday the 2nd of December that there will be a change on their servers:

From the 3rd of December login in to Tahoma and Connexoon will not be possible with: • iPhones with iOS 4 or older • Android with 4.0 or older • iPad of the first generation • A Tahoma or Connexoon App that wasn't updated since 2017

I guess that might cause our problem?

probot-home-assistant[bot] commented 4 years ago

Hey there @philklei, mind taking a look at this issue as its been labeled with a integration (tahoma) you are listed as a codeowner for? Thanks!

cwildt commented 4 years ago

The used api is deprecated. https://github.com/philklei/tahoma-api/issues/16

cdeharo commented 4 years ago

Same here. Recently I've received a Connexoon firmware update. Since the next HA reboot, it stopped working with the error reported by @dennismeng .

labachev commented 4 years ago

I had the same issue but it is solved with the somfy component.

https://www.home-assistant.io/integrations/somfy/

The reason why it stopped is the Somfy decided to restrict the access to their environment from any 3rd party APIs like the one used in Tahoma component starting from 3rd of December 2019.

I called them and they've confirmed that.

So now the only way is to use the official Somfy API released in 2018.

The somfy component mentioned above is using it and it is working like a charm. I am not exactly sure if all the devices are supported like in tahoma component but the shutters/blinds are working without any problem with the old tahoma component configuration.

So it seems this is the solution to the current situation.

cwildt commented 4 years ago

The only Somfy device I‘m using is missing. Garage doors aren’t supported yet.

dennismeng commented 4 years ago

I have blinds and windows. None of the windows work in the Somfy component, only the blinds. Got two different kind of windows - not sure whether or not it counts as two different in the somfy component however. Also it doesn't look like scenes are available through the somfy component either?

dickesW commented 4 years ago

Same problem here: I have windows and using the tahoma scenes - both not supported by the official somfy API. The shutters/blinds are working,

As I'm using fhem next to home-assistant I'm wondering why their tahoma integration (not using the offical somfy API) is still working:

http://fhem.de/commandref.html#tahoma

The code can be found here.

theHasp commented 4 years ago

Hmmm I'm not an expert but they use https://www.tahomalink.com/enduser-mobile-web/enduserAPI/

theHasp commented 4 years ago

But as said I can't login on that site anymore (even with the right password)?

theHasp commented 4 years ago

Pretty interesting comment in the tahoma-api repo https://github.com/philklei/tahoma-api/issues/16#issuecomment-562848519 seems like the changed "just" the api?

cdeharo commented 4 years ago

I had the same issue but it is solved with the somfy component.

https://www.home-assistant.io/integrations/somfy/

The reason why it stopped is the Somfy decided to restrict the access to their environment from any 3rd party APIs like the one used in Tahoma component starting from 3rd of December 2019.

I called them and they've confirmed that.

So now the only way is to use the official Somfy API released in 2018.

The somfy component mentioned above is using it and it is working like a charm. I am not exactly sure if all the devices are supported like in tahoma component but the shutters/blinds are working without any problem with the old tahoma component configuration.

So it seems this is the solution to the current situation.

I changed to Somfy component as you recommended, but my awning (connected using Connexoon) doesn't work.

theHasp commented 4 years ago

I had the same issue but it is solved with the somfy component. https://www.home-assistant.io/integrations/somfy/ The reason why it stopped is the Somfy decided to restrict the access to their environment from any 3rd party APIs like the one used in Tahoma component starting from 3rd of December 2019. I called them and they've confirmed that. So now the only way is to use the official Somfy API released in 2018. The somfy component mentioned above is using it and it is working like a charm. I am not exactly sure if all the devices are supported like in tahoma component but the shutters/blinds are working without any problem with the old tahoma component configuration. So it seems this is the solution to the current situation.

I changed to Somfy component as you recommended, but my awning (connected using Connexoon) doesn't work.

I did the same ... but as by awing and my lightsensor is not supported ... And the comment "The reason why it stopped is the Somfy decided to restrict the access to their environment from any 3rd party APIs" seems to show that they want to push their own "environment" which is ok they want to sell this, but which is really bad news for us ...

The lightsensor is not a problem (other solutions exist) but I do not trust in somfy and their cloud anymore ... Who says that there will be an official API in the future for awings?

Thats why I currently think about taking an Somfy Smoove 1 io apart and combine it with a shelly ... if this works I will sell my connexxion and will give up the integration into somfy .... I can do everything from home then ....

Anyone already tried this?

Cheers Hannes

theHasp commented 4 years ago

I have another solution to call scenes (what I did before) ... Ill use IFTTT .... its a crazy chain:

HA (at home) --> IFTTT (some cloud) --> tahoma (another cloud) --> CONNEXXON (at home)

just stupid, but works and the feeling is (as I call Scenes) more reliable (all raffstores are moving at the same time, all finish at the same position)

...

butako commented 4 years ago

Someone has a fix for this: see https://github.com/philklei/tahoma-api/pull/18 Please can we not deprecate the Tahoma component just yet?

Personally I just spent £250 (!) on a Tahoma box to control both Velux windows&blinds (which use io:homecontrol protocol), and Somfy blinds (which use RTS protocol). All devices work fine using Somfy's Tahoma web, and Somfy's Tahoma Android App. But only Somfy own devices are available from their developers API. It is disappointing of Somfy to do that, but irrespective, the web API as used by Tahoma component still works and so I hope we can keep the Tahoma component alive too.

springstan commented 4 years ago

The deprecation will be reverted (see https://github.com/home-assistant/home-assistant/pull/29745#issuecomment-563311368)

dennismeng commented 4 years ago

Closing the issue, as butako it linking to a solution.