I’m new here and playng with tis nice fully featured softuare.
Unfortunately I’m facing a small problem, like I can not add/edit radio stations in multimedia section.
Actualy rule section looks like this:
Are the URL’s valid? From a clean browser can you launch these streams without logging in? OH has its own web client built in so it will not have access to any authentication tokens or cookies or anything that might be needed to access some or all of these streams.
Is the volume turned up and speakers working on your openHAB server? NOTE that playStream will play through the openHAB server’s speakers, not through the speakers of whatever computer or phone you have accessed the sitemap from.
Is Radio_Station actually getting set to these expected states? Add a logInfo to print out receivedCommand to make sure that it is being set as you expect.
Is the rule being triggered at all? Again, a logInfo can help answer that.
I run OH on raspberry PI2 which is connected via HDMI to an TV, for the moment because is still in testing.
OH takes the command as long for the radio station 1 and 3 he plays the expected link. But when I change to 2 and 4, it stops, like the link is “dead”.
Configuration should work the same way as in openHAB1, use an unbound number item to select the radio station (through selection widget) and use a rule to switch to the station ‘for real’.
im not sure yet , just wanted to create some list with different radios. but not so sure how should i do it. do i need to make .rules conf file with like the top post have and radio.sitemap too ?
I don’t have a kodi system here (well, in fact, I have… yavdr…, so, I actually have kodi, but I make no use of it, as I only use the vdr part).
You have to install the kodi binding, and there will be a channel named playuri, which would be used to send the stream url to the kodi system. In fact, the kodi instances would be registered as audio sinks, so audiostreams would be sent to kodi when used as audio sink, but I did not test this yet.
The “rule way” would be to create some items:
Number Radio_Station "Station [%d]"
String MyKodiUri "Kodi URI [%s]" {channel="kodi:kodi:myKodi:playuri"}
rule "Select Radio Station"
when
Item Radio_Station received command
then
switch(receivedCommand) {
case 0 : MyKodiUri.sendCommand(null)
case 1 : MyKodiUri.sendCommand("http://metafiles.gl-systemhaus.de/hr/hr3_2.m3u")
case 2 : MyKodiUri.sendCommand("http://www.radio21.ro/Radio21Live.m3u")
case 3 : MyKodiUri.sendCommand("http://edge.live.mp3.mdn.newmedia.nacamar.net/radioffh/livestream.mp3.m3u")
case 4 : MyKodiUri.sendCommand("http://stream.hitradio-rtl.de/HRRTL/mp3.m3u")
}
end
I don’t know, if MyKodiUri.sendCommand(null) would work as expected, but sure you would want play and stop button for kodi and could use these items to stop the playback anyway.
Please be aware that kodi is playing back the stream, so kodi must be capable to play the stream without openHAB (well, this should be no problem at all…)
Yes, at least rules and sitemap are conf-file-only.
I’m not sure about unbound items (the Radio_Station item is not bound to any binding, so I call it unbound), the other item could be created via Paper UI, maybe (if simple mode is true… Paper UI-> Configuration-> System-> Item Linking-> Simple Mode) the item is already existing, if kodi and its binding was configured through auto discovery.