Jump to content

Polyglot LIFX NodeSever


einstein.42

Recommended Posts

Ok, so I'm not entirely sure what's going on here, but my lifx node server is still ending up in a stoppe state frequently. Simply signing into the web portal and clicking the restart button "fixes" it but obviously that isn't a great solution. Previously when this happened there were some errors in the logs etc which I think have since been fixed with recent updates. It does seem to be lasting a bit longer now than it used to before stopping but it is stopping. Looking at logs, I really don't see any obvious reason why it may have stopped.

 

Any suggestions on how to proceed?

Link to comment
Share on other sites

Einstein,

 

I have tried both the master and multi-zone versions and find that the master is a bit more stable. I have a chron job that now resets polyglot at 2am each day mainly because the LifX NS crashes. For me all I have to do is send half a dozen color changes one after another to the bulbs I am using for testing and within about 5min of that if not during one of the changes the LifX NS will crash. Before it crashes the bulbs begin to respond very slowly. I send a color change and 25 -30 sec later the bulbs change color. While this is happening I can instantly (well almost) change the bulbs color or status on/off via the LifX app on my andriod so it's not a wifi issue, its something in NS, ISY 5.0.8, or possibly the API.

 

As I mentioned before changes that I make via the ISY portal are always instant and do not seem to suffer the crash problems associated with sending commands via ISY admin > NS > LifX. 

 

I was hoping to have better information for you but as paulbram mentioned when the LifX NS crashes it doesn't leave anything in the log out of the ordinary. Ultimately I would like to use this to create moving waves of color across 30' of the multi-zone lights, but with the NS constantly slowing to a snails crawl or crashing it's been difficult to test.

 

The only clues that stand out to me are the fact that via the portal I don't seem to have these problems, and second it first slows and then crashes. That makes me wonder if there is a memory leak or something similar occurring. It could be in ISY 5.0.8 as will as in the NS itself.

 

Kaz

Link to comment
Share on other sites

Thanks kzboray, now that I read your description it sounds very similar to my symptoms. I too have a program that sends various colors in rapid succession. Usually within 10-15 minutes the NS is fully unresponsive.

 

​For now I might just disable the program that sends many commands to see if it'll stay up and running longer.

Link to comment
Share on other sites

Ok, so here is the test program I'm using. It sets Zone 0 and 1 to one color, 2 - 5 to another color, 6 - 7 to yet another color, and 8 - 9 (9 is on the second strip) to a fourth color. It then applies these changes to the lifx so they all happen at once. 

 

I then have it loop every 8 seconds. 

 

Can either of you send me what you are doing so I can do that?

post-7295-0-08242000-1488555962_thumb.png

Link to comment
Share on other sites

Ok. I found a bug in Polyglot AND a bug in the LiFX Z code. After a send a bunch of commands via the LiFX lan protocol to the Z strip, it totally stops responding. (sometimes).

 

I think this is as good as I can get it at the moment. I sent 16 zone commands and an apply, every 2 seconds for over an hour (god my eyes hurt from that flashing). Didn't crash on me. 

git pull

Multizone branch. 

 

Also try to use the latest developmental branch of Polyglot.

 

Good luck. 

Link to comment
Share on other sites

Einstein,

 

LOL OK that made me laugh. Thank you so much for your continued dedication and help with this! I honestly don't know where you find the time. 

 

I am rebuilding my development pi3 from scratch and was just getting ready to load Polyglot when I saw your post. I wanted to make sure I hadn't done something stupid that was contributing to the crashes. I was also going to load 5.0.4 up on my ISY and try to recreate your production environment. Once it's all together I'll give it a go and let you know how it turns out.

 

Kaz

 

EDIT: I'll continue using 5.0.8 for testing. See below.

Link to comment
Share on other sites

Ok. I found a bug in Polyglot AND a bug in the LiFX Z code. After a send a bunch of commands via the LiFX lan protocol to the Z strip, it totally stops responding. (sometimes).

 

I think this is as good as I can get it at the moment. I sent 16 zone commands and an apply, every 2 seconds for over an hour (god my eyes hurt from that flashing). Didn't crash on me.

git pull
Multizone branch.

 

Also try to use the latest developmental branch of Polyglot.

 

Good luck.

Thanks so much. Do you think you will merge to master or should I just change branches?

 

Sent from my Robin using Tapatalk

Link to comment
Share on other sites

Einstein,

 

Please don't shoot the messenger. I got it running and started my standard testing. I got as far as changes to the SAT, HUE, Brightness, etc values and crashed the NS on ZONE. Entering a value into the zone field seems to cause the NS to crash. Also in the Group view, the number of devices doesn't seem to be updating. It is always blank. 

INFO     [03-05-2017 08:58:08] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SETZ/16/56 (10.0.0.50) 2.87ms
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX: Traceback (most recent call last):
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:   File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx.py", line 58, in <module>
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:     main()
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:   File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx.py", line 55, in main
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:     nserver.run()
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:   File "/tmp/polyglot_5Ao2WH/polyglot/nodeserver_api.py", line 710, in run
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:     self.poll()
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:   File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx.py", line 30, in poll
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:     i.update_info()
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:   File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx_types.py", line 407, in update_info
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX:     self.set_driver(driver, self.color[self.current_zone][ind])
ERROR    [03-05-2017 08:58:14] polyglot.nodeserver_manager: LifX: IndexError: list index out of range
INFO     [03-05-2017 08:58:15] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/DON (10.0.0.50) 2.56ms
ERROR    [03-05-2017 08:58:15] polyglot.nodeserver_manager: Node Server LifX has exited unexpectedly.

Also changing any of the other settings, like SAT, HUE and Brightness, etc first shows the manually entered value, then as soon as the SET button is clicked it reverts to the original value, then as soon as the new value is executed by the NS it changes to back to the new value. If it's possible to have those fields update without showing the original value momentarily it might save some confusion. 

 

 

To test I wrote a program to decrement HUE and ZONE. I stated with HUE=65535 and zone =16.

The program is in two parts:

Part one:

Setup Rainbow - [ID 0002][Parent 0001]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Repeat 14 times
           Set 'LIFX LIFX Bulb 149bcb' Change HSBKDZ
           Set 'LIFX LIFX Bulb 149bcb' Apply
           Run Program 'LifX Rainbow Counters' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action') 

Part Two:

LifX Rainbow Counters - [ID 0006][Parent 0001]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        $s.LifX_Hue  = $s.LifX_Hue
        $s.LifX_Hue -= 4000
        $s.LifX_Zone  = $s.LifX_Zone
        $s.LifX_Zone -= 1
 
Else
   - No Actions - (To add one, press 'Action')

Here's what the log looks like.

INFO     [03-05-2017 09:49:00] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=65535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=16 (10.0.0.50) 1.95ms
INFO     [03-05-2017 09:49:00] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 1.65ms
INFO     [03-05-2017 09:49:01] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=61535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=15 (10.0.0.50) 3.27ms
INFO     [03-05-2017 09:49:01] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 3.14ms
INFO     [03-05-2017 09:49:01] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=57535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=14 (10.0.0.50) 3.44ms
INFO     [03-05-2017 09:49:02] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 3.67ms
INFO     [03-05-2017 09:49:02] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=53535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=13 (10.0.0.50) 3.41ms
INFO     [03-05-2017 09:49:03] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 2.68ms
INFO     [03-05-2017 09:49:03] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=49535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=12 (10.0.0.50) 3.42ms
INFO     [03-05-2017 09:49:04] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 3.29ms
INFO     [03-05-2017 09:49:04] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=45535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=11 (10.0.0.50) 1.82ms
INFO     [03-05-2017 09:49:05] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 1.51ms
INFO     [03-05-2017 09:49:05] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=41535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=10 (10.0.0.50) 3.27ms
INFO     [03-05-2017 09:49:06] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 3.09ms
INFO     [03-05-2017 09:49:06] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=37535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=9 (10.0.0.50) 3.27ms
INFO     [03-05-2017 09:49:07] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 3.13ms
INFO     [03-05-2017 09:49:07] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=33535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=8 (10.0.0.50) 3.27ms
INFO     [03-05-2017 09:49:08] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 3.12ms
INFO     [03-05-2017 09:49:08] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=29535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=7 (10.0.0.50) 1.82ms
INFO     [03-05-2017 09:49:09] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 1.55ms
INFO     [03-05-2017 09:49:09] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=25535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=6 (10.0.0.50) 3.36ms
INFO     [03-05-2017 09:49:10] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 2.71ms
INFO     [03-05-2017 09:49:11] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=21535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=5 (10.0.0.50) 3.27ms
INFO     [03-05-2017 09:49:11] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 2.70ms
INFO     [03-05-2017 09:49:12] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=17535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=4 (10.0.0.50) 3.34ms
INFO     [03-05-2017 09:49:12] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 6.67ms
INFO     [03-05-2017 09:49:13] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SET_HSBKDZ?H.uom56=13535&S.uom56=65535&B.uom56=65535&K.uom26=3500&D.uom42=0&Z.uom56=3 (10.0.0.50) 1.93ms
INFO     [03-05-2017 09:49:13] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/APPLY (10.0.0.50) 1.55ms
WARNING  [03-05-2017 09:49:18] polyglot.nodeserver_manager: Node Server LifX: time since last pong: 79.47
ERROR    [03-05-2017 09:49:18] polyglot.nodeserver_manager: Node Server LifX has stopped responding.

This is the third time I executed it manually. The program only runs through one time then it stops. The first time it worked and the entire 14 zones lite up almost instantly and then immediately reverted to white across the entire strip. HUGE improvement if only it hadn't reverted the entire strip back to the color white! The second time I ran the program it started with a new color in each zone then as soon as the next command executed the previous zone switched back to its original color (white). I always start with White in all zones. Also the second time I executed this it took a very long time to actually run through. Instead of being almost instant it was taking two to three seconds for each zone to change.The third run is the log above and you can see it crashed.

 

Restarting Polyglot didn't help, nor did restarting ISY Admin, nor power cycling the LifX strip. I was only able to get it to light each zone all the way across the strip the very first time I tried running the program. Now it just lights each zone momentarily then moves on to the next zone and resets the previous field to the original color. Help Obi Wan. What am I doing wrong?

 

Kaz

 

+++++++++++++++++++++++++

EDIT: Two hours later... Iv'e done a lot of testing and haven't been able to crash the NS except that one time. So I'm not sure if it's worth worrying about. I would like to know how you would suggest rapidly setting each zone to a distinctive color that will be persistent after the next zone is changed. And just as importantly how to do this quickly. Only twice during testing have I been able to get the strip to load each zone with a different color in the millisecond times listed in the log. The norm is that it takes two to three seconds for each zone to actually load a change in color. Across thirty feet of strip lights that means it would take minutes to change the entire strip. Since Iv'e seen it do the change in milliseconds a couple of times I know its possible. I just can't seem to figure out how to do it on a consistent basis. Thanks Einstein.

 

Kaz

Link to comment
Share on other sites

Einstein,

 

I did just one more test and this one is easy to reproduce. I went to the group control and simply started clicking the ON / OFF buttons rapidly I did this four times and got this error. Then another few times and it errored again, and finally crashed. Mainly I wanted you to see the error. I can't imagine someone doing this except to test resilience, but I was trying to simulate rapid changes without writing another program. It's late and i'm tired lol.

INFO     [03-05-2017 11:31:42] polyglot.element_manager.isy: ISY: [1] ( 0.03) 200 OK: http://10.0.0.50:8880/rest/ns/1/nodes/n001_d073d5149bcb/report/status/ST/0/25
INFO     [03-05-2017 11:31:47] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DON (10.0.0.50) 2.71ms
INFO     [03-05-2017 11:31:48] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DOF (10.0.0.50) 2.87ms
INFO     [03-05-2017 11:31:49] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DON (10.0.0.50) 1.46ms
INFO     [03-05-2017 11:31:49] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DOF (10.0.0.50) 2.63ms
INFO     [03-05-2017 11:31:49] polyglot.element_manager.isy: ISY: [1] ( 0.04) 200 OK: http://10.0.0.50:8880/rest/ns/1/nodes/n001_d073d5149bcb/report/status/ST/1/25
ERROR    [03-05-2017 11:31:49] polyglot.nodeserver_manager: LifX: Error handling cmd in function on_cmd: error(9, 'Bad file descriptor')Traceback (most recent call last):  File "/tmp/polyglot_k9c3aP/polyglot/nodeserver_api.py", line 1419, in _recv    success.append(fun(**data))  File "/tmp/polyglot_k9c3aP/polyglot/nodeserver_api.py", line 61, in auto_request_report_wrapper    success = fun(*args, **kwargs)  File "/tmp/polyglot_k9c3aP/polyglot/nodeserver_api.py", line 1137, in on_cmd    command, value=value, cmd=command, uom=uom, **kwargs)  File "/tmp/polyglot_k9c3aP/polyglot/nodeserver_api.py", line 137, in run_cmd    success = fun(self, **kwargs)  File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx_types.py", line 336, in _seton    d.set_power(True)  File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/lifxlan/light.py", line 47, in set_power    self.req_with_ack(LightSetPower, {"power_level": 65535, "duration": duration})  File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/lifxlan/device.py", line 428, in req_with_ack    self.req_with_resp(msg_type, Acknowledgement, payload, timeout_secs, max_attempts)  File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/lifxlan/device.py", line 450, in req_with_resp    self.sock.sendto(msg.packed_message, (UDP_BROADCAST_IP, self.port))  File "/usr/lib/python2.7/socket.py", line 170, in _dummy    raise error(EBADF, 'Bad file descriptor')error: [Errno 9] Bad file descriptor
INFO     [03-05-2017 11:31:50] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DON (10.0.0.50) 2.81ms
INFO     [03-05-2017 11:31:50] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DOF (10.0.0.50) 2.62ms
INFO     [03-05-2017 11:31:51] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DON (10.0.0.50) 2.57ms
INFO     [03-05-2017 11:31:52] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DOF (10.0.0.50) 2.86ms
INFO     [03-05-2017 11:31:52] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DON (10.0.0.50) 2.74ms
INFO     [03-05-2017 11:31:53] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DOF (10.0.0.50) 2.84ms
ERROR    [03-05-2017 11:32:11] polyglot.nodeserver_manager: LifX: Error handling cmd in function on_cmd: error(9, 'Bad file descriptor')Traceback (most recent call last):  File "/tmp/polyglot_k9c3aP/polyglot/nodeserver_api.py", line 1419, in _recv    success.append(fun(**data))  File "/tmp/polyglot_k9c3aP/polyglot/nodeserver_api.py", line 61, in auto_request_report_wrapper    success = fun(*args, **kwargs)  File "/tmp/polyglot_k9c3aP/polyglot/nodeserver_api.py", line 1137, in on_cmd    command, value=value, cmd=command, uom=uom, **kwargs)  File "/tmp/polyglot_k9c3aP/polyglot/nodeserver_api.py", line 137, in run_cmd    success = fun(self, **kwargs)  File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx_types.py", line 342, in _setoff    d.set_power(False)  File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/lifxlan/light.py", line 51, in set_power    self.req_with_ack(LightSetPower, {"power_level": 0, "duration": duration})  File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/lifxlan/device.py", line 428, in req_with_ack    self.req_with_resp(msg_type, Acknowledgement, payload, timeout_secs, max_attempts)  File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/lifxlan/device.py", line 455, in req_with_resp    data, (ip_addr, port) = self.sock.recvfrom(1024)  File "/usr/lib/python2.7/socket.py", line 170, in _dummy    raise error(EBADF, 'Bad file descriptor')error: [Errno 9] Bad file descriptor
INFO     [03-05-2017 11:32:12] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DON (10.0.0.50) 2.83ms
INFO     [03-05-2017 11:32:12] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DOF (10.0.0.50) 2.69ms
INFO     [03-05-2017 11:32:12] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DON (10.0.0.50) 2.60ms
INFO     [03-05-2017 11:32:13] tornado.access: 200 GET /ns/o2b0p/nodes/n001_room1/cmd/DOF (10.0.0.50) 2.60ms
WARNING  [03-05-2017 11:33:14] polyglot.nodeserver_manager: Node Server LifX: time since last pong: 124.18
ERROR    [03-05-2017 11:33:14] polyglot.nodeserver_manager: Node Server LifX has stopped responding.

Over all the performance is really much better. The work you have done has improved this NS tremendously. Thank you

 

Kaz

Link to comment
Share on other sites

Ok. So I spent about 8 hours on this today because I'm not going to let a stupid light beat me. (maybe).

 

I fixed the color reset thing on the set hsbkdz. 

 

I tried your specific program (the repeat step in ISY is slow as all get out, like 1 zone a second) but it worked fine.

 

I fixed the speed in which the new values update to the ISY so it doesn't take the few seconds (confusion you were talking about).

 

I also ran my superspeed switcher program that changes every zone to a different color every 2 seconds for an hour.

 

No crashes, speed stayed consistent, etc.

 

I ALSO found several more bugs in Polyglot itself related to speed.

 

Please:

git pull

On the multizone branch of the LiFX nodeserver, and git pull on the development branch of Polyglot itself, then restart polyglot.

 

Tell me how it goes. 

Link to comment
Share on other sites

Einstein,

 

Thank you so much.

 

The first thing I tried was to set the zone via the bulb properties. HUE/SAT/Bright....ZONE and I got this. I think since it's not listed in your fixes, it got over looked. I also keep forgetting to mention that if the color value on a bulb is set to say White and then I programmatically change the actual light, but want to reset it back to white via the bulb color settings, it won't change to an already selected color, you have to select another color and then you can go back to white. It's a small thing, but since you're poking around in this atm, I thought I'd mention it.

INFO     [03-05-2017 18:04:25] tornado.access: 200 GET /ns/o2b0p/nodes/n001_d073d5149bcb/cmd/SETZ/16/56 (10.0.0.50) 2.64ms
INFO     [03-05-2017 18:04:26] polyglot.element_manager.isy: ISY: [1] ( 0.03) 200 OK: http://10.0.0.50:8880/rest/ns/1/nodes/n001_d073d5149bcb/report/status/GV1/49151/56
ERROR    [03-05-2017 18:04:29] polyglot.nodeserver_manager: LifX: Traceback (most recent call last):
ERROR    [03-05-2017 18:04:29] polyglot.nodeserver_manager: LifX:   File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx.py", line 58, in <module>
ERROR    [03-05-2017 18:04:29] polyglot.nodeserver_manager: LifX:     main()
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX:   File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx.py", line 55, in main
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX:     nserver.run()
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX:   File "/tmp/polyglot_hig0qe/polyglot/nodeserver_api.py", line 710, in run
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX:     self.poll()
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX:   File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx.py", line 30, in poll
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX:     i.update_info()
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX:   File "/home/pi/Polyglot/config/node_servers/lifx-nodeserver-multizone/polylifx_types.py", line 470, in update_info
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX:     self.set_driver(driver, self.color[self.current_zone][ind])
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX: IndexError: list index out of range
ERROR    [03-05-2017 18:04:30] polyglot.nodeserver_manager: LifX: Exception in thread Thread-3 (most likely raised during interpreter shutdown):
ERROR    [03-05-2017 18:04:31] polyglot.nodeserver_manager: LifX: Traceback (most recent call last):
ERROR    [03-05-2017 18:04:31] polyglot.nodeserver_manager: LifX:   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
ERROR    [03-05-2017 18:04:31] polyglot.nodeserver_manager: Node Server LifX has exited unexpectedly.
ERROR    [03-05-2017 18:04:31] polyglot.nodeserver_manager: LifX:   File "/usr/lib/python2.7/threading.py", line 763, in run
ERROR    [03-05-2017 18:04:31] polyglot.nodeserver_manager: LifX:   File "/tmp/polyglot_hig0qe/polyglot/nodeserver_api.py", line 1367, in _send_err
ERROR    [03-05-2017 18:04:31] polyglot.nodeserver_manager: LifX:   File "/usr/lib/python2.7/Queue.py", line 174, in get
ERROR    [03-05-2017 18:04:31] polyglot.nodeserver_manager: LifX: <type 'exceptions.TypeError'>: 'NoneType' object is not callable


The other values change much more quickly and don't offer the user a moment of hummm. Well done! 

 

The over all speed is better but slower than I would like. We all drive Tesla's Right? Things are definitely improving. 

 

From where this started just three short days ago, you have made major improvements and I wanted to give you some quick feedback. I am going to keep playing with this and I'll post any other findings, but mostly a huge Thank you.

 

Kaz

Link to comment
Share on other sites

Well god bless america. Ok ok. That's fixed. 

git pull

As for it being slow, I'm not seeing that at all. The 'slow' part of the program you are trying to run is the ISY loop delays a second for each iteration. If you created a script that looked something like the attachment, it runs fast as all get out.

post-7295-0-17043300-1488767952_thumb.png

Link to comment
Share on other sites

Einstein,

 

The latest release seem to be rock solid!

 

A couple of minor things I've noticed.

 

1.) On the bulb setting, HUE, SAT etc. Can you take a look at the speed of updates for the Duration and Zone fields. They are abnormally slow just like the others used to be.

 

2.) This next one is weird. On the bulb settings page, first set your strip to one solid color, Zone=0. Now select a single zone. Change it's color to whatever. You should now have a strip with a single zone lite to a unique color. Now change duration to 1000ms and then change the color of the same single zone again. The adjacent zone will change to the old color, while the selected zone changes to the new color. The adjacent field changing is now permanent and requires a restart of Polyglot to clear. Note Maybe just LifX NS needs to restart. I'm not at home to test atm, but restarting Polyglot I know fixes it.

 

3.) Under group, the number of devices is still blank.

 

Good bug hunting!

 

Kaz

Link to comment
Share on other sites

I'll chime in as well. With the latest updates this thing is really performing well now! Unfortunately, I can't say the same for my ISY in general as I find myself needing to power cycle the thing every few days, but I'll attribute that to 5.0 Alpha issues.

 

Anyway, I have a program that flashes Lifx lights and in addition sends network requests to an LED strip connected to an ESP8266 (MUCH cheaper than Lifx Z). In the past the LED strip and LIFX lights would never be in sync, but after these updates they are in perfect synchronization!

 

Great job!

 

p.s. I just ordered some Xiaomi Yeelights from GearBest. They are basically identical to Lifx but significantly cheaper. I'll be curious to see how well they work. If they do a decent job I might be interested in either:

1. Creating a Yeelight node server

2. Creating a branch off of your Lifx node server and attempting to add support for these lights

 

Thoughts?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.5k
    • Total Posts
      367.6k
×
×
  • Create New...