Error when adding integration
seanthomas0409 opened this issue · 18 comments
After installation of the integration using HACS and then adding the integration on home assistant, I receive the error :
Config flow could not be loaded: {"message":"Invalid handler specified"}
I did not encounter any such error in my local testing. Could you maybe enable default debug logging to gather more details? Also what is your HA version?
logger:
default: debug
I'm using Home Assistant Core 2022.6.2 and Home Assistant OS 8.3 and it doesn't work for the Sensi integration I put in my credentials and it errors. What is the version I need?
@ranski1999 Your HomeAssistant version is a year old; the current version is 2023.4.6.
Also what error are you getting?
Sorry that screenshot doesn't tell me much. Can you enable debug logging and see if that gives more details?
You should also update to latest version of HomeAssistant.
I have the same issue when adding Sensi to integration.
Config flow could not be loaded: {"message":"Invalid handler specified"}
System is Home Assistant Core 2023.12.4 on ubuntu 22.04
With another HA system with 2024.1.1 on docker/ubuntu, sensi does not have any issue to setup or run
Sorry, I won't be able to debug older versions but debug logging (#3 (comment)) might reveal what went wrong.
Sorry, I won't be able to debug older versions but debug logging (#3 (comment)) might reveal what went wrong.
I moved HA to docker system and sensi is working perfectly. Thanks
Found a log entry relating to Sensi
Home Assistant Core
Config entry 'Sensi Thermostat' for sensi integration could not authenticate: Invalid login credentials
1:33:10 PM – (WARNING) config_entries.py
Home Assistant Core
2024-01-18 13:31:55.456 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration sensi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-18 13:33:10.232 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Sensi Thermostat' for sensi integration could not authenticate: Invalid login credentials
Core
2024.1.3
Supervisor
2023.12.1
Operating System
11.4
Frontend
20240104.0
Login info was correct.
When I go to https://manager.sensicomfort.com and login, I get a page asking me to choose a paid package. The refresh token results in the Sensi integration reporting "Invalid authentication." I have no interest in a paid package, so I cannot get to the dashboard. Does that mean this integration won't work unless I pay for a management package I don't want and will never use?
When I go to https://manager.sensicomfort.com and login, I get a page asking me to choose a paid package. The refresh token results in the Sensi integration reporting "Invalid authentication." I have no interest in a paid package, so I cannot get to the dashboard. Does that mean this integration won't work unless I pay for a management package I don't want and will never use?
All you need to do is log in and then use devtools to get the token, as described here in the readme. The token will be ~300 characters long.
When I go to https://manager.sensicomfort.com and login, I get a page asking me to choose a paid package. The refresh token results in the Sensi integration reporting "Invalid authentication." I have no interest in a paid package, so I cannot get to the dashboard. Does that mean this integration won't work unless I pay for a management package I don't want and will never use?
All you need to do is log in and then use devtools to get the token, as described here in the readme. The token will be ~300 characters long.
I was doing that, but what I thought was the token wasn't what I needed. The key was your mentioning the length of the token. That helped me find it on the Preview tab.
I am closing this issue. The latter issues logged here were not related to the original issue.
I have also added some more clarification for getting the token.
Hello, I'm having the same issue as OP. Trying to add the integration gives me a Config flow could not be loaded: {"message":"Invalid handler specified"}
on version 2024.7.3
.
Here are the relevant log entry :
Logger: homeassistant.config_entries
Source: config_entries.py:2832
First occurred: 4:22:03 PM (3 occurrences)
Last logged: 4:22:35 PM
Error occurred loading flow for integration sensi: No module named 'websockets'
If there's anything else I should do to help, do not hesitate to ask. It's my first install of HA, but I'm able to dig in ;)
This seems like a different issue. The message calls out missing websockets
module but that package is defined in HomeAssistant core constraints. What kind of install do you have? You can try setting default logging level to debug to see if it reveals something more.
Quite a bit more info yes !
2024-07-29 20:15:32.098 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140499918720448] MY_NAME from MY_IP (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0): Sending b'{"id":97,"type":"result","success":true,"result":[{"flow_id":"01J40FV1PFYK9FKDM2PBEFBCA5","handler":"bluetooth","context":{"source":"integration_discovery","unique_id":"F8:16:54:14:E6:04","title_placeholders":{"name":"hci0 (F8:16:54:14:E6:04)","model":"Unknown","manufacturer":"Intel Corporate"}},"step_id":"single_adapter"},{"flow_id":"01J40FV1PG9BKY342NW3Y55FYE","handler":"netgear","context":{"source":"ssdp","unique_id":"63A81471A1597"},"step_id":"user"},{"flow_id":"01J40FV1P8XZ3AVEWQMJHQF6W8","handler":"sonos","context":{"source":"ssdp","unique_id":"sonos","confirm_only":true},"step_id":"confirm"},{"flow_id":"01J40FV1PBWXEBEVN8NK0ST428","handler":"cast","context":{"source":"zeroconf","unique_id":"cast"},"step_id":"confirm"},{"flow_id":"01J40FV1P9NCVP0409DT5PPY7N","handler":"homekit_controller","context":{"source":"zeroconf","unique_id":"0d:6d:34:08:6b:e4","title_placeholders":{"name":"Sensi-1125B2","category":"Thermostat"}},"step_id":"pair"}]}'
2024-07-29 20:15:32.103 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140499918720448] MY_NAME from MY_IP (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0): Received {'type': 'manifest/get', 'integration': 'sensi', 'id': 98}
2024-07-29 20:15:32.104 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140499918720448] MY_NAME from MY_IP (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0): Sending b'{"id":98,"type":"result","success":true,"result":{"domain":"sensi","name":"Sensi","documentation":"https://github.com/iprak/sensi","requirements":[],"dependencies":[],"codeowners":["@iprak"],"issue_tracker":"https://github.com/iprak/sensi/issues","version":"1.3.7","config_flow":true,"iot_class":"cloud_polling","is_built_in":false}}'
2024-07-29 20:15:32.208 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated MY_IP for /api/config/config_entries/flow using bearer token
2024-07-29 20:15:32.209 DEBUG (MainThread) [homeassistant.helpers.http] Serving /api/config/config_entries/flow to MY_IP (auth: True)
2024-07-29 20:15:32.215 DEBUG (MainThread) [homeassistant.loader] Importing platforms for sensi executor=['config_flow'] loop=[] took 0.01s
2024-07-29 20:15:32.215 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration sensi: No module named 'websockets'
If I'm not mistaken, 4th line seems to indicate it tries to load something with the OAuth tokens you have us get from logging in to Sensi portal, but... I have let encountered anywhere to give it to the system ! That might be the problem ?
(Install seems to be the default one. It's an install script from https://dietpi.com !)
I don't believe you were prompted for token. I am not familiar with dietpi but the instructions hint that additional packages need to be installed manually. You can try the instructions in the "Customize Python Environment" tab to install websockets
.
Yep, that was it ! To be frank, I'm now considering a SBC just to install HA OS and prevent possible future hicups... Thanks for the help !