Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with multiple static devices (s20s) #19

Open
marioPS opened this issue Sep 24, 2020 · 1 comment
Open

Error with multiple static devices (s20s) #19

marioPS opened this issue Sep 24, 2020 · 1 comment

Comments

@marioPS
Copy link

marioPS commented Sep 24, 2020

Hi @cherezov !

Here's my issue: installed on MacOS device using Homebridge to control sockets following https://www.atpeaz.com/enabling-siri-and-homekit-to-work-with-orvibo-s20-smart-socket/

Repeating error causes Homebridge to be not responsive until it (I assumes) times out.

Tried offsetting polling to see if they are clashing being polled at the same time ...

Thanks in advance for your help.

@marioPS

Error (from Homebridge logs):
** Error repeats multiple times per hour
[9/24/2020, 10:57:55 AM] [homebridge-cmdswitch2] Failed to determine Blanket Switch state.
[9/24/2020, 10:57:55 AM] [homebridge-cmdswitch2] Traceback (most recent call last):
File "/Users/me/orvibo/orvibo/orvibo.py", line 715, in
d = Orvibo.discover(o.ip)
File "/Users/me/orvibo/orvibo/orvibo.py", line 330, in discover
with _orvibo_socket() as s:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "/Users/me/orvibo/orvibo/orvibo.py", line 135, in _orvibo_socket
sock = _create_orvibo_socket() if external_socket is None else external_socket
File "/Users/me/orvibo/orvibo/orvibo.py", line 130, in _create_orvibo_socket
sock.bind((ip, PORT))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 48] Address already in use

Config:
{
"name": "homebridge-cmdswitch2",
"switches": [
{
"name": "Office Switch",
"on_cmd": "python /Users/me/orvibo/orvibo/orvibo.py -i 192.168.0.243 -s on",
"off_cmd": "python /Users/me/orvibo/orvibo/orvibo.py -i 192.168.0.243 -s off",
"state_cmd": "python /Users/me/orvibo/orvibo/orvibo.py -i 192.168.0.243 -x socket | grep -i 'Is enabled: True'",
"polling": true,
"interval": 120,
"timeout": 2000,
"manufacturer": "Orvibo",
"model": "S20",
"serial": "8675309a"
},
{
"name": "Blanket Switch",
"on_cmd": "python /Users/me/orvibo/orvibo/orvibo.py -i 192.168.0.69 -s on",
"off_cmd": "python /Users/me/orvibo/orvibo/orvibo.py -i 192.168.0.69 -s off",
"state_cmd": "python /Users/me/orvibo/orvibo/orvibo.py -i 192.168.0.69 -x socket | grep -i 'Is enabled: True'",
"polling": true,
"interval": 130,
"timeout": 2000,
"manufacturer": "Orvibo",
"model": "S20",
"serial": "8675309b"
}
],
"platform": "cmdSwitch2"
}

@marioPS
Copy link
Author

marioPS commented Sep 26, 2020

Hi again, I came across this site about the s20: https://www.pitt-pladdy.com/blog/_20160121-103754_0000_Orvibo_S20_Wifi_Power_Socket_Utility/ and found this:
image
I noticed I did not get the error with one device - could this come into play?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant