Ole8700 / openhab

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

Sonos Binding throws NullPointerException #269

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start openhab with sonos binding

Hi, I am running version 1.2.0 of the sonos binding for openhab. Starting 
openhab I see this:

Exception in thread "Sonos Polling Thread" java.lang.NullPointerException
        at org.openhab.binding.sonos.internal.SonosZonePlayer.updateRunningAlarmProperties(SonosZonePlayer.java:662)
        at org.openhab.binding.sonos.internal.SonosBinding$2.run(SonosBinding.java:789)

What is this related to? Here my item configuration:

String          lrSonosCT       "Now Playing"   (gLivingRoom, Sonos) 
{sonos="<[RINCON_000E58852BCC01400:currenttrack]"}
Switch          lrSonosLed      "Led"           (gLivingRoom, Sonos) 
{sonos=">[ON:RINCON_000E58852BCC01400:led],   
>[OFF:RINCON_000E58852BCC01400:led]"}
Switch          lrSonosAlm      "Alarm"         (gLivingRoom, Sonos) 
{sonos=">[ON:RINCON_000E58852BCC01400:alarm], 
>[OFF:RINCON_000E58852BCC01400:alarm]"}
Switch          lrSonosMute     "Mute"          (gLivingRoom, Sonos) 
{sonos=">[ON:RINCON_000E58852BCC01400:mute],  
>[OFF:RINCON_000E58852BCC01400:mute]"}
Switch          lrSonosPlay     "Play"          (gLivingRoom, Sonos) 
{sonos="*[ON:RINCON_000E58852BCC01400:play]"}
Switch          lrSonosStop     "Stop"          (gLivingRoom, Sonos) 
{sonos="*[ON:RINCON_000E58852BCC01400:stop]"}
Switch          lrSonosPause    "Pause"         (gLivingRoom, Sonos) 
{sonos="*[ON:RINCON_000E58852BCC01400:pause]"}
Number          lrSonosVolume   "Volume [%.1f]" (gLivingRoom, Sonos) 
{sonos=">[RINCON_000E58852BCC01400:volume]"}

Original issue reported on code.google.com by mathias....@googlemail.com on 2 May 2013 at 4:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have committed some improvements on my clone 
(http://code.google.com/r/paulianttila-ihc-binding/)

1) UPNP now searches AVTransport services and only devices where manufacturer 
is Sonos will be added. ZoneBridges will be filtered out.
2) Exception handling added to several places to improve stability.
3) sonos="*[ON:RINCON_000E58852XXXXXXXX:play], 
*[OFF:RINCON_000E58852XXXXXXXX:pause]" should now work.
4) Individual support for title, album and artist variables.

At least now the binding works nicely with my Sonos Play5 devices.

I assume that those mods should also solve this issue.

More discussion can be found 
https://groups.google.com/forum/?fromgroups=#!topic/openhab/M8B4L1F7yso

Original comment by pauli.an...@gmail.com on 6 May 2013 at 8:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by teichsta on 21 May 2013 at 9:40

GoogleCodeExporter commented 9 years ago
Pauli, what are change sets?

I found this one 
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=5cb6419e60b4e8
5f0977ec806d0576e639f9154d but it doesn't seem to contain anything regarding 
UPnP searches, right?

Original comment by teichsta on 25 May 2013 at 9:56

GoogleCodeExporter commented 9 years ago
SonosBinding: several improvements:
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=2aab21b4d07e10
5d1642c90e83c8b62ed6d300ff

SonosBinding: If AlbumArtist field is empty use Creator field on current track:
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=eb3f0dbe61db3c
94e407be1ec87224591becf500

SonosBinding: Added artist, title and album commands:
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=5cb6419e60b4e8
5f0977ec806d0576e639f9154d

If you synchronise only sonos binding from my clone, should you see all change 
sets (differences)?

Original comment by pauli.an...@gmail.com on 26 May 2013 at 6:19

GoogleCodeExporter commented 9 years ago
merged into default (see changesets 32afb0f1fb4c, f81c1e4e0e57, 1c6a4b680747)

@Mathias: after your confirmation that all works fine now, we can close this 
issue.

Thanks Pali for contributing!!

Original comment by teichsta on 26 May 2013 at 12:07

GoogleCodeExporter commented 9 years ago
Hi, I can only test this if I get the binding as a compiled JAR. I tried once 
to get this Yoxos and stuff working but failed - no interest in wasting time on 
this again ;)

Original comment by mathias....@googlemail.com on 26 May 2013 at 1:32

GoogleCodeExporter commented 9 years ago
ok, i've started the ci-build manually - #413 will contain the above changes 
(will be available in ~1h)

Original comment by teichsta on 26 May 2013 at 2:13

GoogleCodeExporter commented 9 years ago
Now where can I download it?

Original comment by mathias....@googlemail.com on 26 May 2013 at 7:23

GoogleCodeExporter commented 9 years ago
here: 
https://openhab.ci.cloudbees.com/job/openHAB/lastSuccessfulBuild/artifact/distri
bution/target/distribution-1.3.0-SNAPSHOT-addons.zip

Original comment by teichsta on 26 May 2013 at 7:30

GoogleCodeExporter commented 9 years ago
Added command to play playlist.

Change set: 
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=147c33f8123cdb
9e6cf75fdd10ea4d11277e7d7d

Original comment by pauli.an...@gmail.com on 1 Jun 2013 at 4:50

GoogleCodeExporter commented 9 years ago
merged to default (see 
http://code.google.com/p/openhab/source/detail?r=75e8d2aa4218d6ceac5fb54daa208a9
a424ac76f)

Original comment by teichsta on 1 Jun 2013 at 10:13

GoogleCodeExporter commented 9 years ago
Changed annoying UPNP notifications logging level from debug to trace.

Change set: 
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=0982053b32242c
b6d2b15912b5f71df6d75a90c8

Original comment by pauli.an...@gmail.com on 30 Jun 2013 at 8:20

GoogleCodeExporter commented 9 years ago
Committed bug fix, which prevent Sonos device discovery if any device is not 
defined on the config.

Change set: 
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=d55b704756c755
ecb57a25f518be88f58fba2b55

Original comment by pauli.an...@gmail.com on 2 Jul 2013 at 6:17

GoogleCodeExporter commented 9 years ago
pulled both changesets (0982053b3224, d55b704756c7) to the main repo.

Original comment by kai.openhab on 2 Jul 2013 at 6:38