Orvibo Install Errors

Hi

I’m trying to get an Oribo switch going but not having much luck.

This is my entry in the YAML file :-

switch:
platform: orvibo
host: 10.0.0.13

The errors in the startup log file are :-

File “c:\python34\lib\site-packages\homeassistant\helpers\entity_component.py”, line 145, in _setup_platform
self.hass, platform_config, self.add_entities, discovery_info)
File “c:\python34\lib\site-packages\homeassistant\components\switch\orvibo.py”, line 21, in setup_platform
from orvibo.s20 import S20, S20Exception
File “C:\Users\HA\AppData\Roaming.homeassistant\lib\orvibo\s20.py”, line 292, in
_setup()
File “C:\Users\HA\AppData\Roaming.homeassistant\lib\orvibo\s20.py”, line 54, in _setup
for opt in [socket.SO_BROADCAST, socket.SO_REUSEADDR, socket.SO_REUSEPORT]:

Any ideas from anyone. I’m a Python newbie and a HA newbie but HA looks very promising and Im keen to get it going.

Thanks in Advance

Kman

I think this log is incomplete. There should be a few more lines. Are there?

Happleaves

Yes there was but I only copied what I thought was relevant :blush:

Anyway I have completely uninstalled Python and I’m starting again. I also deleted the /.homeassistant dir and the remains of /Python34 so I can do a clean install.

OK so after a clean install of Python and HASS this is a copy of the boot log :-

15-12-29 10:35:29 netdisco.ssdp: Error fetching description at 10.0.0.25

All I then did was modify configuration.yaml and I added this :-

switch:
platform: orvibo
host: 10.0.0.13

I restarted Windows 10 again (just in case) and this is the full contents of the boot log.

15-12-29 10:45:42 homeassistant.components.switch: Error while setting up platform orvibo
Traceback (most recent call last):
File “c:\python34\lib\site-packages\homeassistant\helpers\entity_component.py”, line 145, in _setup_platform
self.hass, platform_config, self.add_entities, discovery_info)
File “c:\python34\lib\site-packages\homeassistant\components\switch\orvibo.py”, line 21, in setup_platform
from orvibo.s20 import S20, S20Exception
File “C:\Users\HA\AppData\Roaming.homeassistant\lib\orvibo\s20.py”, line 292, in
_setup()
File “C:\Users\HA\AppData\Roaming.homeassistant\lib\orvibo\s20.py”, line 54, in _setup
for opt in [socket.SO_BROADCAST, socket.SO_REUSEADDR, socket.SO_REUSEPORT]:
AttributeError: ‘module’ object has no attribute ‘SO_REUSEPORT’
15-12-29 10:45:57 netdisco.ssdp: Error fetching description at 10.0.0.25

UPDATE:

I restarted the machine again. This is the copy of the log :-

15-12-29 11:13:03 homeassistant.components.switch: Error while setting up platform orvibo
Traceback (most recent call last):
File “c:\python34\lib\site-packages\homeassistant\helpers\entity_component.py”, line 145, in _setup_platform
self.hass, platform_config, self.add_entities, discovery_info)
File “c:\python34\lib\site-packages\homeassistant\components\switch\orvibo.py”, line 21, in setup_platform
from orvibo.s20 import S20, S20Exception
File “C:\Users\HA\AppData\Roaming.homeassistant\lib\orvibo\s20.py”, line 292, in
_setup()
File “C:\Users\HA\AppData\Roaming.homeassistant\lib\orvibo\s20.py”, line 54, in _setup
for opt in [socket.SO_BROADCAST, socket.SO_REUSEADDR, socket.SO_REUSEPORT]:
AttributeError: ‘module’ object has no attribute ‘SO_REUSEPORT’
15-12-29 11:13:04 homeassistant.components.recorder: Found unfinished sessions
15-12-29 11:13:17 netdisco.ssdp: Error fetching description at 10.0.0.25

Does “Found unfinished sessions” mean I aborted HASS incorrectly?

Program looks like it’s going to work for me if I can get things going. I’v looked at a few and this seems very straight forward compared to say openHAB. I currently use an Arduino that runs my home automation but it’s limited to no web interface and the fact that I have to re-write code every time. Hopefully you can help. I also noticed in the documentation that I can pull the dev branch from Github but I figured the standard build should work just for 1 switch :slight_smile:

Thanks :smiley:

I also discovered this bug while migrating my install to a new system. I will fix it.

Thank god. I thought I was going bonkers :smiley:

Thanks for that. BTW I got HA talking to my mqtt broker at home and controlling existing lights just fine. Love HA so far and after looking at so many solutions, HA just fits the bill. My search is over. Now if you can get Orvibo work, wooo hooo

Kman

If you want to try a quick fix:

Edit file ~/.homeassistant/lib/orvibo/s20.py: Delete lines 55 and 56:

for opt in [socket.SO_BROADCAST, socket.SO_REUSEADDR, socket.SO_REUSEPORT]: _SOCKET.setsockopt(socket.SOL_SOCKET, opt, 1)

And replace with:

    _SOCKET.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)

Love quick fixes. Thanks worked like a charm :smiley: