glenpp / OrviboS20

Python management script for Orvibo S20 WiFi Plug
GNU General Public License v2.0
13 stars 4 forks source link

Getting [Errno 98] Address already in use after sevral uses #2

Open guysoft opened 7 years ago

guysoft commented 7 years ago

Hey, I am using this code to restart a device connected to the socket, after sevral uses I start getting:

[Errno 98] Address already in use

Sources here: https://github.com/Tikkun-olam/angelzzz/blob/devel/src/orvibo_s20.py#L7

Is there some closing function I should run on the socket or something like that?

Thanks,

Akalsharan commented 4 years ago

Hello. I know this is an old post but I'm getting a similar error today. I had no problems using s20control.py last time I tried (last week), but today keeps coming up with the same error.

Can control the plug fine from the Wiwo app and using this method (https://www.kaskus.co.id/show_post/54955fbfbccb17b00a8b4574/3/orvibo-s20-tasker-integration) which strangely did not work properly before .

Is there a fix/workaround for this?

Error as follows:

Traceback (most recent call last): File "s20control.py", line 408, in <module> main() File "s20control.py", line 388, in main with OrviboS20() as control: File "s20control.py", line 83, in __init__ self.sock.bind(('', self.port)) File "/data/data/com.termux/files/usr/lib/python2.7/socket.py", line 228, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use

merlin051 commented 4 years ago

I switched to Homeassistant (Hassio) and my problem went away.