Page 4 of 4

Re: Plugwise-2-py - an evolution of earlier python/linux work

Posted: Sat Mar 04, 2017 4:40 pm
by Edwin
almost everything is working now :)
only the sheduler is a problem, its not working.
i made a shedule for saterday to go on at 08:00 and off at 21:00 the squares are orange in the on settings and grey in the off settings.
I did set the switch "shedule on " to on in the webapp but the plugwise plug stays on all the time.
what am i doing wrong here?




thanks
edwin

Re: Plugwise-2-py - an evolution of earlier python/linux work

Posted: Thu Mar 09, 2017 1:45 am
by SevenW
Hi Edwin,

I thought everything with schedules was finally OK for the last few months. Apparently not. Can you send me an email for user info at the domain of my website? See github to figure it out. I need to take a look at your log files and config files.

SevenW

Re: Plugwise-2-py - an evolution of earlier python/linux work

Posted: Tue Jul 25, 2017 9:19 am
by mvdp
Hi Steven,
Thanks for the great work on plugwise-2-py. I've got it running in my house with 12 circles and Domoticz which runs fantastico.
There is a strange thing with plugwise-2-web.py service and websockets. On some devices (macbook air, linux box, ipad 2) and Chrome the measurements are showing and updating. However, on newer devices (ipad mini, iphone 6) with chrome and on the macbook air with safari the measurements are not showing.

Before I start an extensive debug session I would like to know if this sounds familiar to you and if you have a clue?

Thanks,
Martin\

Edit. I started to check the developers tool in Safari. When connecting with Plugwise-2-web.py it logs multiple messages like:

WebSocket connection to 'ws://diskstation:8000/socket.ws' failed: Invalid HTTP version string: HTTP/1.0

Googling a bit further shows this link.
I'll try if I can fix this in my git checkout.

Re: Plugwise-2-py - an evolution of earlier python/linux work

Posted: Wed Jul 26, 2017 8:34 am
by mvdp
I found out that setting the protocol version in swutil/HTTPWebSocketsHandler.py did the trick.
After the line with
_opcode_pong = 0xa
add
protocol_version = 'HTTP/1.1'

and restart Plugwise-2-web.py

Re: Plugwise-2-py - an evolution of earlier python/linux work

Posted: Wed Jul 26, 2017 8:55 pm
by Bwired
top :)

Re: Plugwise-2-py - an evolution of earlier python/linux work

Posted: Thu Feb 22, 2018 7:31 am
by Edwin
I cant start plugwise 2py
And get this error:

rsync -aXuq /home/pi/datalog/2018/pwact/pwact-2018-02-22*.log /tmp/2018/pwact/
rsync: link_stat "/home/pi/datalog/2018/pwact/pwact-2018-02-22*.log" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
Traceback (most recent call last):
File "Plugwise-2.py", line 1467, in <module>
main=PWControl()
File "Plugwise-2.py", line 126, in __init__
self.device = Stick(port, timeout=1)
File "/home/pi/Plugwise-2-py/plugwise/api.py", line 60, in __init__
self.init()
File "/home/pi/Plugwise-2-py/plugwise/api.py", line 65, in init
self.send_msg(msg)
File "/home/pi/Plugwise-2-py/plugwise/api.py", line 93, in send_msg
resp = self.expect_response(PlugwiseAckResponse)
File "/home/pi/Plugwise-2-py/plugwise/api.py", line 186, in expect_response
msg = self._recv_response(retry_timeout)
File "/home/pi/Plugwise-2-py/plugwise/api.py", line 142, in _recv_response
raise TimeoutException("Timeout while waiting for response from device")
plugwise.exceptions.TimeoutException: Timeout while waiting for response from device
How can i solve this?