I have done several test, with FQDN, ports, http, https and certificates. The only conclusion that I can find is that it works on Hassio when the “custom_components” folder is located in “config” folder in the Samba share.
On Hassbian I have created the mentioned folder in the “homeassistant” Samba share (/home/homeassistant/.homeassistant/) and it’s not working on Hassbian, is there anything in the config files downloaded that have the path hard coded?
Both installations are accessible from internet over https, Hassio continued to work even after adding https (updated the app at NIBE with new callback URL) so https doesn’t seems to be the cause.
Same error every time:
An error occured: <class ‘oauthlib.oauth2.rfc6749.errors.MissingCodeError’>
No. There are no hard coded paths. I suppose you could test my WIP branch named “module” . It’s a bit tricker to install thou since you need a separate python module.
@Johan_Nolen the url you pasted is wrong. You need to paste the local url after nibe uplink has redirected you. See nords comment earlier. You press the link in the config screen, login to nibe uplink, it will redirect you to your local rediret url (may very well be something your browser can’t reach, or your home assistant screen), copy that complete url into the config screen.
Notes for new module should anybody want to give it a try:
git clone https://github.com/elupus/hass_nibe.git custom_components
cd custom_components
git checkout -b module origin/module
Read the readme.md file since config has new needs (you can read that on the top link).
Ps. It now has some rudimentary climate module with theoretical write access. However you NEED premium nibe account for it to work (i don’t have so i haven’t been able to verify it at all)
The new version is just about completely rewritten to be async. But almost no new features apart from the climate platform with potential update support.
It’s closer to okey to merge into standard Hass, that is the main reason for the rewritten
2017-11-12 13:44:36 ERROR (MainThread) [homeassistant.setup] Error during setup of component nibe
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py”, line 194, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/homeassistant/.homeassistant/custom_components/nibe.py”, line 85, in setup
hass.data[DOMAIN] = NibeUplink(hass, config)
File “/home/homeassistant/.homeassistant/custom_components/nibe.py”, line 109, in init
from requests_oauthlib import OAuth2Session
File “/srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/init.py”, line 9, in
if requests.version < ‘2.0.0’:
TypeError: unorderable types: module() < str()
I would love to use this, but I’m getting a lot of errors:
Error during setup of component nibe
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 193, in _async_setup_component
component.setup, hass, processed_config)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/nibe.py", line 85, in setup
hass.data[DOMAIN] = NibeUplink(hass, config)
File "/home/homeassistant/.homeassistant/custom_components/nibe.py", line 109, in __init__
from requests_oauthlib import OAuth2Session
File "/srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/__init__.py", line 9, in <module>
if requests.__version__ < '2.0.0':
TypeError: unorderable types: module() < str()
Sorry about that. Thank you for pointing me in the right direction.
I installed the module instead and ran:
pip install git+https://github.com/elupus/nibeuplink.git
but I am getting:
Unable to install package nibeuplink==0.2.0: Could not find a version that satisfies the requirement nibeuplink==0.2.0 (from versions: )
No matching distribution found for nibeuplink==0.2.0