Page 3 of 5
Re: Listen to your favourite radios V2
Posted: Tuesday 18 September 2018 21:58
by Gianni
just tested
MP3 did not solve my problem
if i go to my terminal then it's work like that(i used without the extra parameters to see my output)
Code: Select all
gianni@xxxxxx:~ $ mplayer http://icecast.vrtcdn.be/mnm_urb-mid.mp3
MPlayer 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing http://icecast.vrtcdn.be/mnm_urb-mid.mp3.
Resolving icecast.vrtcdn.be for AF_INET6...
Couldn't resolve name for AF_INET6: icecast.vrtcdn.be
Resolving icecast.vrtcdn.be for AF_INET...
Connecting to server icecast.vrtcdn.be[5.79.75.39]: 80...
Name : MNM UrbaNice | Kwaliteit**
Genre : Urban
Public : no
Bitrate: 64kbit/s
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes)
ICY Info: StreamTitle='';
if i run the script in domoticz my terminal get not any input
this is my selector

- 1.JPG (92.53 KiB) Viewed 2932 times
and this is my code
Code: Select all
--
-- This script play a streaming radio when the device is changed
-- Start files with "mplayer -noconsolecontrols radiostation.mp3 &> /dev/null"
-- Start playlists with "mplayer -noconsolecontrols -playlist radiostation.m3u &> /dev/null"
--
commandArray = {}
if (devicechanged['Radio'] == 'Off') then
os.execute ("killall mplayer")
end
if (devicechanged['Radio'] == 'MNM') then
os.execute ("mplayer -noconsolecontrols http://icecast.vrtcdn.be/mnm-mid.mp3 &> /dev/null")
end
if (devicechanged['Radio'] == 'TopRadio') then
os.execute ("killall mplayer")
os.execute ("mplayer -noconsolecontrols http://loadbalancing.topradio.be/topradio.mp3 &> /dev/null")
end
return commandArray
Re: Listen to your favourite radios V2
Posted: Tuesday 18 September 2018 22:04
by 0n370uch
Re: Listen to your favourite radios V2
Posted: Tuesday 18 September 2018 22:23
by Gianni
you mean in my terminal?
this works.
i just try in my terminal without to see the output
if i start mplayer manual in my terminal (putty) en then i select MNM then mplayer get the quit command so that works.
The problem must be in the stream url.
Code: Select all
--
-- This script play a streaming radio when the device is changed
-- Start files with "mplayer -noconsolecontrols radiostation.mp3 &> /dev/null"
-- Start playlists with "mplayer -noconsolecontrols -playlist radiostation.m3u &> /dev/null"
--
commandArray = {}
if (devicechanged['Radio'] == 'Off') then
os.execute ("killall mplayer")
end
if (devicechanged['Radio'] == 'MNM') then
os.execute ("killall mplayer")
-- os.execute ("mplayer -noconsolecontrols http://icecast.vrtcdn.be/mnm-mid.mp3 &> /dev/null")
if i try your solution no test Folder
Code: Select all
if (devicechanged['Radio'] == 'MNM') then
os.execute ("sudo mkdir ~/test &> /dev/null")
os.execute ("killall mplayer")
os.execute ("sudo mplayer -noconsolecontrols http://icecast.vrtcdn.be/mnm-mid.mp3 &> /dev/null")
If i do it manual
Code: Select all
gianni@xxxx:~ $ mkdir ~/test &> /dev/null
gianni@xxxxx:~ $ ls
bluez-5.49 bluez-5.49.tar.xz bluez-5.49.tar.xz.1 domoticz habridge mosquitto-repo.gpg.key test
gianni@xxxxx:~ $
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 0:30
by 0n370uch
I use mplayer without sudo and it works nice. Please test the command without sudo (like in your last example).
I executed this command in Fedora 28 without any problem some seconds ago:
Code: Select all
mplayer -noconsolecontrols http://icecast.vrtcdn.be/mnm-mid.mp3 &> /dev/null
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 8:28
by Gianni
yeah my fold
my script is without sudo this was just a test if it made any different.
like you say if i executed this command on my pi in putty it's works direct.
Code: Select all
mplayer -noconsolecontrols http://icecast.vrtcdn.be/mnm-mid.mp3 &> /dev/null
if i try it from within domoticz nothing happens

Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 8:32
by 0n370uch
Oh one Idea. Check the main settings:
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 9:26
by Gianni
exact the same

- Knipsel.JPG (100.94 KiB) Viewed 2893 times
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 9:32
by 0n370uch
Very frustrating... I cannot see any sort of configuration mistake. One last idea: check the domoticz log after switching. I hope there is an error message.
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 11:11
by Gianni
nope just a switch message
Code: Select all
2018-09-19 11:10:18.526 (Radio) Light/Switch (Radio)
2018-09-19 11:10:18.519 Status: User: Admin initiated a switch command (60/Radio/Set Level)
2018-09-19 11:10:19.968 (Radio) Light/Switch (Radio)
2018-09-19 11:10:19.960 Status: User: Admin initiated a switch command (60/Radio/Set Level)
2018-09-19 11:10:23.444 (Radio) Light/Switch (Radio)
2018-09-19 11:10:23.437 Status: User: Admin initiated a switch command (60/Radio/Set Level)
where are the log files from domoticz self i cannot find them in my console

- Knipsel.JPG (11.57 KiB) Viewed 2883 times
I'm not home right now but i see in my problem log the test from yesterday and i have 1 line
Code: Select all
2018-09-18 21:52:25.747 Error: EventSystem: Warning!, lua script Radio has been running for more than 10 seconds
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 11:39
by 0n370uch
OK. No helpful message there... Sry no idea from my side at the moment.
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 13:15
by Gianni
np i have no idea 2 but thx for trying to help

Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 13:53
by 0n370uch
Yeah... Tell me if you find a solution.
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 14:18
by Gianni
do you know where the log file from domoticz are in the terminal?
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 14:25
by 0n370uch
Oh not in the terminal. Just under settings.
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 21:11
by Gianni
yeah i know but maybe there is a log with more information in the terminal
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 22:09
by Gianni
the only thing i can think about is the bluetooth driver.
how did you install your speaker?
i have to install bleuz and then pulseaudio to work but every time i reboot i need to redo this.
Re: Listen to your favourite radios V2
Posted: Wednesday 19 September 2018 23:27
by 0n370uch
I wrote about this on page 2. I think this is a good way... I use this way for one year.
Re: Listen to your favourite radios V2
Posted: Thursday 20 September 2018 8:00
by Gianni
but i use the stretch lite,so i need to preinstall the Alsa en Pulseaudio?
witch version do you use?
Re: Listen to your favourite radios V2
Posted: Thursday 20 September 2018 8:08
by 0n370uch
I only use the latest version from the stock package sources.
Re: Listen to your favourite radios V2
Posted: Thursday 20 September 2018 13:48
by Gianni
hmm strange if i set my backup back and use the standard version without installing any other software i get this error
agent on error
power on error
etc
ps pic is from google but the same error

- images.png (2.06 KiB) Viewed 3791 times