Attemp in brief:
Oh2 -> invoke radiostream -> play over webaudio on client’s speaker
status:
no sound (in oh2 panel)
But, as this is my first post, first of all many thanks to all of those who made this nice system as functional as it is. I appreciate the the time, the effort an the knowledge very much! The setup went well and the demanded things are working smoothly (eg lights).
But I am stuck at one point:
I am trying to achieve that one of my clients (Android-tablet) plays a radio stream which is meant to be invoked on my oh2 host machine. But by now only “playsound” is working. The stream (radio url) seems to be played, but there is no output on the webaudio sink.
Until now I tried to understand the manuals and I did a bunch of searches in the forum and the net. I found some similar (or slightly different approaches) but I could not find a suitable solution, since I simply do not get any output from the stream in webaudio, so it feels as I am missing something.
Since I am a beginner I assume a mistake in the rules file. I am not a developer. My skills are limited to some shell scripting, basic php and a raw idea of python.
My OH2-Server
Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Debian 9 (stretch)
Java 1.8.0_221
OH2: 2.4.0 (release build)
Sound-configuration: default sink = webaudio
Client(s)
Android Tablet (sound works in general)
AOSP (sort of)
OH2 app 2.7.0
OH2 panel view 0.9.25
Laptop
Linux Mint 19.1, cinnamon
Firefox / Chromium
Steps on the OH2-Server:
Create a simple items in /items/Webradio.items
Switch WebradioS "Webradio Switch"
Create a simple sitemap for the switch in /sitemap/Webradio.sitemap
sitemap Webradio label="Webradio"
{
Frame
{
Switch item=WebradioS icon="radio"
}
}
Create a rule in /rules/Webradio.rules, including for testing a playSound (which is working)
rule "RadioS"
when
Item WebradioS received command ON
then
playStream("webaudio", "http://streams.fluxfm.de/live-hls/aac-96/streams.fluxfm.de/play.m3u")
//playSound("webaudio", "doorbell.mp3")
end
Results:
Switch appears in sitemap; when turned to on “playsound” is working on all devices (with habpanel open);
playStream gives no sound.
When the switch is turned on, Karaf says:
[INFO ] [smarthome.event.ItemCommandEvent ] - Item 'WebradioS' received command ON
[INFO ] [smarthome.event.ItemStateChangedEvent] - WebradioS changed from OFF to ON
[INFO ] [smarthome.event.PlayURLEvent ] - Play URL 'http://fluxfm-hls.streamabc.net/flx-flxtsmy2g2xllzgjbw-aacplus-96-2726077?sABC=5q41nrn1%230%23rr0538n810q570q69os58oonos0qoos0%23fgernzf.syhksz.qr&amsparams=playerid:streams.fluxfm.de;skey:1564585633'.
I believe that the streaming url is valid; I also tried a different one with the same result (playing but no sound).
So a little guidance would be very helpull. Thanks in advance.