Please can you tell me, how i can implement this into my number item?
I don´t use sitemap-configuration for every item, isimply show the whole group, so i can´t change the sitemap entrys, i will have to do this in items-file i think?
But my item for duration is a number-item.
So how can i combine the returned value from the script and my number item?
Is this not working and i have to change my sitemap to separate configuration of each item instead of showing only the whole group?
Number PlayingTime "Playing Time [JS(mmss.js):%s]" { channel="squeezebox:squeezeboxplayer:36b70fd1:b827eb160000:currentPlayingTime" }
Number Duration "Duration [JS(mmss.js):%s]" { channel="squeezebox:squeezeboxplayer:36b70fd1:b827eb160000:duration" }
Install the Javascript transformation addon
Place a file named mmss.js in conf/transform that contains this
(function(i){
var s = ~~(i%60);
return (~~(i/60) + ':' + ((s < 10) ? '0' : '') + s);
})(input)
Hi, my squeezebox runs very smooth the last few months.
Only one problem: Sometimes, in openhab i can see in the logfile, that the commands to the squeezebox are sent. But i get no sound. I can connect to the squeezebox-client raspberry pi (max2play image) and make a reboot. Then the sound is back again.
I don´t know, how i can check, if the squeezebox-client (player software, not the raspberry at all) is still available?
Is there a way to check inside openhab with a rule, if the squeezebox player is still responding to openhab?
The binding only talks to the LMS, not the players. Only the LMS talks to the players. You could try to find the port that the LMS uses to talk to the player, then use the network binding to send the player a transaction.
Note on my post above that the playStream action accepts Strings as arguments so we need to feed it Strings
Put your Thing betweem "" and convert the state to String by using the toString method
Please check out our new plugin for http commands (copy and paste from our announcement thread)
Hi guys,
I wanted to update you on another feature we have been working on in conjunction with the openHAB server installer.
Our API-Examples plugin has just been added to all Max2Play systems with the new version 2.47 of Max2Play!
You can find it in all Max2Play systems with the update. It’s a free plugin and can be added in the Settings/Reboot menu from the available plugins section.
It dynamically creates a list of HTTP-Get and CLI commands to be copied and pasted into your openHAB solutions.
Commands like Play, Pause, Next Song but also commands like shutdown of the device or starting specific plugins like the Jivelite GUI or Kodi.
It also creates a more detailed API doc for the equalizer and other features we can add by request.
This is the ideal plugin to quickly find and add the functionalities you need for the multiroom audio to be added to your openHAB.
We would really appreciate feedback on this new plugin.
I wanted to play some different radio stations. If i save the stations inside plex and then play the favourites inside openhab-squeeze-binding, it works.
But when i send a url with playstream, then it plays the new radio station only for about 10 seconds.
Currently i´m not at home. But i did some further investigations:
When i send the comand to playstream, then i get “Notification” in my Remote-Tile-item. When the 10 seconds are over and it is switching back, i can see “Antenne Bayern …” in my item, this is the favourite 1 and it was played before, when i send a the new comand to playstream.
So why is there not the radio station name showed in the play remote title item?
What’s the default notification timeout in the player thing? It seems like playStream is using the audiosink notification stuff to play the url. I’ve never used playStream before, so I’m not very familiar with how it’s handled internally.
That’s why I asked about what happens is you try using an item linked to the stream channel. Basically do a StreamItem.sendCommand("http://stream/url").
Ok, so it looks like playstream is using the audiosink notification stuff. It looks like the timeout is 20 seconds, not 10. So I would expect it to stop playing after 20 seconds, then return to whatever was playing prior to the playStream.