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

Plugwise Forum about Plugwise devices and the Source software.
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

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

Post 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
SevenW
Starting Member
Starting Member
Posts: 26
Joined: Tue May 29, 2012 10:04 am
Contact:

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

Post 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
mvdp
Starting Member
Starting Member
Posts: 8
Joined: Sun Jan 15, 2017 11:06 pm

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

Post 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.
mvdp
Starting Member
Starting Member
Posts: 8
Joined: Sun Jan 15, 2017 11:06 pm

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

Post 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
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

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

Post by Bwired »

top :)
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

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

Post 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?
Post Reply

Return to “Plugwise Forum”