google-code-export / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
0 stars 0 forks source link

Sonos binding polling thread is not started on startup #433

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently polling thread is started only when bindingChanged() method is called.

I recognised this problem earlier, but because anyone else did not complain, I 
assumed that sonos binding on my clone was broken. Just tested latest snapshot 
(#475) and problem still exists.

Fix can be found from my personal clone:

Changeset: 
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=0495dadfda35db
4de3b54f11ca9b2272fc429529

Original issue reported on code.google.com by pauli.an...@gmail.com on 5 Sep 2013 at 6:49

GoogleCodeExporter commented 9 years ago
created a fix inspired by Palis fix (see 
http://code.google.com/p/openhab/source/detail?r=17f06dd8bc2a6420b69882c2436e9bb
579e21895). Could you retest and confirm that it works, too?

Original comment by teichsta on 6 Sep 2013 at 12:56

GoogleCodeExporter commented 9 years ago
Seems to work fine on my environment. 

You removed start() from activate() method. Sonos binding support also 
configuration where devices are not defined on the openhba.cfg, but directly on 
binding configuration. So in that case, configuration on openhab.cfg does not 
exists and polling thread is never started. I didn't test that use case, 
because I prefer to use predefined devices on openhab.cfg (it's more robust). 

Original comment by pauli.an...@gmail.com on 6 Sep 2013 at 2:11

GoogleCodeExporter commented 9 years ago
that was accident. Added start() to activate() again 
(http://code.google.com/p/openhab/source/detail?r=18d650bbfbbbdd99285c4708180df4
07bdd1d52d) - thanks for pointing out!

Original comment by teichsta on 6 Sep 2013 at 2:30