SmartAxiom / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

Squeezebox Binding #187

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. Feature Description

Binding for control of Logitech Squeezebox

2. Example Use Case

Control of several Squeezbox Audioplayers/Internetradios

http://www.thejavashop.net/javaslimserver/index.shtml might be used

Original issue reported on code.google.com by thomas.t...@inode.at on 19 Jan 2013 at 7:45

GoogleCodeExporter commented 8 years ago
Markus started with a SB binding in his clone: 
http://code.google.com/r/mwolters666-dev/source/browse. But there is still some 
work to do ...

Original comment by teichsta on 23 Jan 2013 at 7:18

GoogleCodeExporter commented 8 years ago
I've just uploaded a new version.

I think it is ready for first testing and reviewing... if someone is willing to 
do it :-)

Original comment by m.wolter...@googlemail.com on 1 Mar 2013 at 6:36

GoogleCodeExporter commented 8 years ago
The classes org.openhab.binding.squeezebox.squeezeserver.* are missing. Could 
you check them in as well?

Original comment by teichsta on 1 Mar 2013 at 8:16

GoogleCodeExporter commented 8 years ago
Unfortunately I have absolutely no control over my hg tools :-(

Should be in there now, but without no guaranty, sorry. Let me know if there is 
still something missing.

Original comment by m.wolter...@googlemail.com on 2 Mar 2013 at 4:13

GoogleCodeExporter commented 8 years ago
i have testet the binding, works so far. Using 2 players makes some problems 
when updateing items file while openhab is running. clean startup works with 2 
players.

Original comment by tomtr...@gmail.com on 13 Mar 2013 at 3:18

GoogleCodeExporter commented 8 years ago
good to know, thx for testing!

Original comment by teichsta on 14 Mar 2013 at 11:22

GoogleCodeExporter commented 8 years ago
Sorry, didn't recognize your post tomtrath. Thanks for your input! Could you 
please provide some more infos on the issue you mention. I will have a look at 
it...

Thomas, is it possible to change ownership of issue 187 to me? 

Original comment by m.wolter...@googlemail.com on 21 Mar 2013 at 6:54

GoogleCodeExporter commented 8 years ago

Original comment by teichsta on 22 Mar 2013 at 10:48

GoogleCodeExporter commented 8 years ago
Just tested this out.  This is great!
Sometimes volume changes do not happen, seems to be random.  Using two players. 
I get this in the log:

11:33:29.717 WARN  o.o.b.s.i.SqueezeboxBinding[:133]- cannot find matching 
binding provider [itemName=sq1_test_volume, command=10]

Also, for title, when listening to web radio, some stations do not provide 
titles, so can the title become the station name? Can we add artist and album 
strings as well?  Album art would be awesome too if possible!

Original comment by g.g.r...@gmail.com on 7 May 2013 at 10:24

GoogleCodeExporter commented 8 years ago
Glad you like the binding.

I think it should be possible to provide the radio station name in a seperate 
item. Switching between these values from within a rule should be not problem 
too.

I'm not quite sure what you mean when you say "Can we add artist and album 
strings as well?" Do you need the ability to play everything from special 
artist/album? Or do you want more songinfos?

Providing a coverart url is a bit more tricky but I think it can be done too. 
Unfortunatey I don't know if this dynamic value could be used with an image 
widget? Can anyone else answer this please? 

Original comment by m.wolter...@googlemail.com on 8 May 2013 at 4:51

GoogleCodeExporter commented 8 years ago
> Providing a coverart url is a bit more tricky but I think it can be done too. 
Unfortunatey I don't know if this dynamic value could be used with an image 
widget? Can anyone else answer this please?

No, I am afraid, this is currently not possible. But it would be a valid 
feature request - if a Image widget is associated with a String item, it could 
read its uri from the item's state. Feel free to file an issue for it!

Original comment by kai.openhab on 8 May 2013 at 7:44

GoogleCodeExporter commented 8 years ago
If possible, more songinfos as items.

Original comment by g.g.r...@gmail.com on 8 May 2013 at 8:02

GoogleCodeExporter commented 8 years ago
New Version with more songinfos is in the repo.

@g.g.rich Could you please test it again and see if it fits your needs? Have 
you already open an issue for the image widget thing?

Original comment by m.wolter...@googlemail.com on 12 May 2013 at 7:29

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 11 Aug 2013 at 7:44

GoogleCodeExporter commented 8 years ago
HI Markus,

please find below my review comments.

# general
* please update version to 1.3.0

# SerialActivator
* this class doesn't seem to be used anywhere > please remove

# pom.xml
* L19 please spell Squeezebox with capital "S"

# /lib
* please remove this folder an the contained jars since they doesn't seem to be 
needed

# build.properties
* please remove reference to javaslimserver-5.0.jar

# MANIFEST.MF
* please remove reference to javaslimserver-5.0.jar

# PlayerCommandTypeMapping
* L56 please remove commented code

# SqueezeboxBinding
* please local member eventPublisher (and respective setters and getters) since 
the AbstractBinding superclass contains it already
* L83 please remove info-logging
* please remove all commented code
* L288, 289, 290 - please extract default values into constants
* L251-275 please replace '!=' with equals (Java string comparison)

# SqueezeboxGenericBindingProvider
* L84 please remove unused logger-member
* L143, 171, 174, 180 please extract values into constants

# SqueezePlayer
* please add license header
* please add javadoc on class- and method level
* if this class is merely copied from other libs then the original author 
should be mentioned as well
* please extract SqueezePlayerEventListener into a separate class

# SqueezeServer
* please add license header
* please add javadoc on class- and method level
* if this class is merely copied from other libs then the original author 
should be mentioned as well
* L70, 99, 111, 119, 155, 163, 171, 183, 191, 199, 207 please replace '!=' with 
equals (Java string comparison)
* please remove commented code

Regards,

Thomas E.-E.

Original comment by teichsta on 12 Aug 2013 at 8:24

GoogleCodeExporter commented 8 years ago
Markus, do you think you will be able to incorporate the review comments by the 
end of next week (21.th) ?

Original comment by teichsta on 13 Aug 2013 at 8:34

GoogleCodeExporter commented 8 years ago
I will try my best...

Original comment by m.wolter...@googlemail.com on 14 Aug 2013 at 5:02

GoogleCodeExporter commented 8 years ago

Original comment by teichsta on 17 Aug 2013 at 9:29

GoogleCodeExporter commented 8 years ago
Hope I got everything from the review except the method javadoc headers. Is it 
possible to write them later, as I have little time at the moment?

Original comment by m.wolter...@googlemail.com on 18 Aug 2013 at 5:21

GoogleCodeExporter commented 8 years ago
it seems as the class SqueezeboxPlayerEventListener is missing. Possible?

Original comment by teichsta on 18 Aug 2013 at 7:19

GoogleCodeExporter commented 8 years ago
Sorry, added

Original comment by m.wolter...@googlemail.com on 19 Aug 2013 at 3:36

GoogleCodeExporter commented 8 years ago
Merged binding into default branch (see 
http://code.google.com/p/openhab/source/detail?r=03f8b0f0cb7a19002000d26b76c72e8
b538ef6d8). Thanks Markus for this contribution.

There following topics are open from my point of view:

* there is one question left regarding the SqueezeServer. Please find a TODO 
with the question in the code.
* the Wiki page is missing yet. I added the template 
http://code.google.com/p/openhab/wiki/SqueezeboxBinding. Please document your 
binding as appropriate as possible. Newer bindings (see EpsonBinding) do also 
contain a demo section to show the capabilities of your binding.

Original comment by teichsta on 20 Aug 2013 at 10:14

GoogleCodeExporter commented 8 years ago
What about SqueezeboxActivator? That seems to be missing as well?

Original comment by ben.jone...@gmail.com on 23 Aug 2013 at 5:00

GoogleCodeExporter commented 8 years ago
You're absolutely right. I added a new one.

Original comment by teichsta on 23 Aug 2013 at 7:33

GoogleCodeExporter commented 8 years ago
Markus, will you be able to provide the Wiki-Page in time?

Original comment by teichsta on 28 Aug 2013 at 6:54

GoogleCodeExporter commented 8 years ago
Thanks for the template, it helped a lot.

A had a quick look at the ToDo. There was a time in development when startup 
was asyn (getting item states on first startup at a time the items aren't 
loaded from cfg). I had no clue how to fix that. Thanks for finding this one! 
Im not quite sure if the problem still exists, but do you habe any idea how to 
fix it properly? 

Original comment by m.wolter...@googlemail.com on 28 Aug 2013 at 5:34

GoogleCodeExporter commented 8 years ago
Thanks for providing the wiki-page

Original comment by teichsta on 28 Aug 2013 at 9:11

GoogleCodeExporter commented 8 years ago
Tried the squeezebox binding included in the 1.3.0 addons and it doesn't seem 
to work.
All I get in the log is: 
SqueezeboxActivator[:54]- Squeezebox binding has been started.
No other log entries for squeezebox after that, nor do my squeezebox items get 
updated
When I revert back to the jar from the forum discussions, it works as expected.

Original comment by g.g.r...@gmail.com on 2 Oct 2013 at 7:59

GoogleCodeExporter commented 8 years ago
I can confirm the missing functionality with 1.3.1.
There is no error in the log files. 

If I enter "ls" on the OSGI:
100   Unsatisfied     org.openhab.binding.squeezebox     
org.openhab.binding.squeezebox(bid=240)    

How can I get more information?                                                 

Original comment by cnm...@gmail.com on 4 Oct 2013 at 1:37

GoogleCodeExporter commented 8 years ago
I can confirm this too with 1.3.1. 

Original comment by das.chic...@gmail.com on 15 Oct 2013 at 4:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have just created a pull request with some major changes to this binding. 
Hopefully this issue will be resolved once these changes are merged into master.

Original comment by ben.jone...@gmail.com on 16 Oct 2013 at 4:27

GoogleCodeExporter commented 8 years ago
The "list" command of the osgi console gives me with version 1.3.1 on my 
raspberry pi:

76      Unsatisfied             org.openhab.binding.squeezebox                  
org.openhab.binding.squeezebox(bid=223)

Some more information from the "comp" command:

osgi> comp 76
        Component[
        name = org.openhab.binding.squeezebox
        activate = activate
        deactivate = deactivate
        modified =
        configuration-policy = optional
        factory = null
        autoenable = true
        immediate = false
        implementation = org.openhab.binding.squeezebox.internal.SqueezeboxBinding
        state = Unsatisfied
        properties = {event.topics=openhab/command/*, service.pid=org.openhab.squeeze}
        serviceFactory = false
        serviceInterface = [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService]
        references = {
                Reference[name = EventPublisher, interface = org.openhab.core.events.EventPublisher, policy = dynamic, cardinality = 1..1, target = null, bind = setEventPublisher, unbind = unsetEventPublisher]
                Reference[name = SqueezeboxBindingProvider, interface = org.openhab.binding.squeezebox.SqueezeboxBindingProvider, policy = dynamic, cardinality = 1..n, target = null, bind = addBindingProvider, unbind = removeBindingProvider]
        }
        located in bundle = org.openhab.binding.squeezebox_1.3.1.201309182025 [223]
]
Dynamic information :
  *The component is NOT satisfied
  The following references are not satisfied:
    Reference[name = SqueezeboxBindingProvider, interface = org.openhab.binding.squeezebox.SqueezeboxBindingProvider, policy = dynamic, cardinality = 1..n, target = null, bind = addBindingProvider, unbind = removeBindingProvider]
  Component configurations :
    Configuration properties:
      event.topics = openhab/command/*
      objectClass = String[org.osgi.service.event.EventHandler,org.osgi.service.cm.ManagedService]
      service.pid = org.openhab.squeeze
      component.name = org.openhab.binding.squeezebox
      component.id = 76
    Instances:

Original comment by sandra.k...@gmail.com on 18 Dec 2013 at 10:19

GoogleCodeExporter commented 8 years ago
Hi, squeezebox binding is great, thanks for your work!
I've a further feature request if possible:
I'd like to execute commands if defined IR-codes are sent.
E.g. switch on the light in bedroom, when squeezebox in bedroom receives a 
predefined IR-code from a IR remote control (e.g. Logitech Harmony)

Original comment by staehle...@googlemail.com on 25 Dec 2013 at 9:53

GoogleCodeExporter commented 8 years ago
since this issue tracker is no longer synched please use our new tracker at 
github 
https://github.com/openhab/openhab/issues?direction=desc&sort=created&state=open

Original comment by teichsta on 26 Dec 2013 at 10:57

GoogleCodeExporter commented 8 years ago
This issue does not exist at Github as it was already implemented.
A new issue had already been created asking for the IR support, see 
https://github.com/openhab/openhab/issues/666

Original comment by kai.openhab on 27 Dec 2013 at 7:52