nousefreak / niko-home-control Goto Github PK
View Code? Open in Web Editor NEWPython connector for niko home control
License: MIT License
Python connector for niko home control
License: MIT License
I'd like to test the Niko connector, but it is unclear from the documentation and discussions how to install on hass.io. Do I install as custom component? Which files to go where? Many thanks. On hass.io only the config directory is easily accessible and will not be overwritten.
Hi,
I got here because I tried to get Niko Home Control working in Home Assistant.
All the lights worked, except for the dimmers. So after some debugging with a python script using this module I noticed it worked if value1
is between 0-100.
I even noticed if I do list_actions_raw()
that even my "normal" switches return value1: 100
, even after setting it to 255.
So it seems for my installation I have the range between 0-100 needed for all my actions.
My installation is pretty up to date and probably updated to the last version possible.
{'swversion': '1.10.0.34209', 'api': '1.19', 'time': '20210817211234', 'language': 'NL', 'currency': 'EUR', 'units': 0, 'DST': 3600, 'TZ': 3600, 'lastenergyerase': '', 'lastconfig': '20210420171354'}
So my question is, am I the only one which the range is 0-100 for value1 (and >100 gets dropped for dimmers) or is this is "bug" ?
Hi Dries,
hope you don't mind I am using your component in Home Assistant Gentoo Overlay, ebuilds: https://git.edevau.net/onkelbeh/HomeAssistantRepository/src/branch/master/dev-python/niko-home-control.
Home Assistant currently relies on niko-home-control==0.2.1
You do not publish SDIST on Pypi, and you did not add a tag for 0.2.1 here.
To get a valid source, I forked it, and created the missing tag for 4b9ff57
Could you please snap a release or add a tag for 0.2.1, so I could get rid of the fork?
Thanks a lot.
Greeting from sunny bavaria!
is this still an active project? seems the platform in Home assistant is still not working?
thnx for the feedback
When enabling the Niko home control integration in Home Assistant, the following error appears in the logs:
2018-12-30 10:27:10 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform niko_home_control Traceback (most recent call last): File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=hass.loop) File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for return fut.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 "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/niko_home_control.py", line 44, in setup_platform [NikoHomeControlLight(light, hub) for light in hub.list_actions()], File "/srv/homeassistant/lib/python3.5/site-packages/nikohomecontrol/__init__.py", line 35, in list_actions return [Action(action, self) for action in self.list_actions_raw()] File "/srv/homeassistant/lib/python3.5/site-packages/nikohomecontrol/__init__.py", line 32, in list_actions_raw return self._command('{"cmd":"listactions"}') File "/srv/homeassistant/lib/python3.5/site-packages/nikohomecontrol/__init__.py", line 52, in _command data = json.load(StringIO(self._socket.recv(8192).decode())) File "/usr/lib/python3.5/json/__init__.py", line 268, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/usr/lib/python3.5/json/__init__.py", line 319, in loads return _default_decoder.decode(s) File "/usr/lib/python3.5/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.5/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 1357 (char 1356)
Tracing this back, I see Home Assistant depends on version 0.1.8 of this niko-home-control component. I'm a bit new to the Python ecosystem, so I'm not sure which commit that version relates to. Maybe there is a newer version without the issue.
If this is not a known issue, I will set up a local copy of this project to figure out what's going on, but I first wanted to check whether or not this was already investigated.
BTW: I'm not sure if it matters, but I have Niko Home Control I. There's now also a Niko Home Control II, but I think this is only available in Belgium right now (I could only find this page in Dutch: https://www.niko.eu/nlbe/software )
BTW2: Thanks for the project!
Hi, we still have the error below, even with 92.0
NHC version 1
2019-05-07 21:29:07 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform niko_home_control
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/niko_home_control/light.py", line 43, in async_setup_platform
NikoHomeControlLight(light, niko_data) for light in nhc.list_actions()
File "/usr/local/lib/python3.7/site-packages/nikohomecontrol/nikohomecontrol.py", line 36, in list_actions
return [Action(action, self) for action in self.list_actions_raw()]
File "/usr/local/lib/python3.7/site-packages/nikohomecontrol/nikohomecontrol.py", line 36, in
return [Action(action, self) for action in self.list_actions_raw()]
File "/usr/local/lib/python3.7/site-packages/nikohomecontrol/nikohomecontrol.py", line 77, in init
self._id = action['id']
TypeError: string indices must be integers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.