Listen to your favourite radios V2

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
0n370uch
Posts: 44
Joined: Monday 08 January 2018 3:30
Target OS: Raspberry Pi
Domoticz version: Latest
Contact:

Re: Listen to your favourite radios V2

Post by 0n370uch » Thursday 20 September 2018 8:08

I only use the latest version from the stock package sources.

Gianni
Posts: 70
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi
Domoticz version:
Location: Home@Belgium
Contact:

Re: Listen to your favourite radios V2

Post by Gianni » Thursday 20 September 2018 13:48

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
images.png (2.06 KiB) Viewed 446 times

0n370uch
Posts: 44
Joined: Monday 08 January 2018 3:30
Target OS: Raspberry Pi
Domoticz version: Latest
Contact:

Re: Listen to your favourite radios V2

Post by 0n370uch » Thursday 20 September 2018 15:24

Seems that your Pi cannot find a bluetooth device... Can you check lspci and lsusb.

Gianni
Posts: 70
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi
Domoticz version:
Location: Home@Belgium
Contact:

Re: Listen to your favourite radios V2

Post by Gianni » Friday 21 September 2018 10:51

status of bluetooth give me this output
did a fresh reinstall BTW
Everything looks working normal

Code: Select all

gianni@xxxxxxx:~ $ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
   Active: active (running) since Fri 2018-09-21 09:39:36 CEST; 1h 2min ago
     Docs: man:bluetoothd(8)
 Main PID: 449 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─449 /usr/lib/bluetooth/bluetoothd

sep 21 09:39:36 domotic systemd[1]: Starting Bluetooth service...
sep 21 09:39:36 domotic bluetoothd[449]: Bluetooth daemon 5.43
sep 21 09:39:36 domotic systemd[1]: Started Bluetooth service.
sep 21 09:39:36 domotic bluetoothd[449]: Starting SDP server
sep 21 09:39:36 domotic bluetoothd[449]: Bluetooth management interface 1.14 ini
[color=#FF0000]sep 21 09:39:36 domotic bluetoothd[449]: Failed to obtain handles for "Service C
sep 21 09:39:36 domotic bluetoothd[449]: Sap driver initialization failed.
sep 21 09:39:36 domotic bluetoothd[449]: sap-server: Operation not permitted (1)
sep 21 09:39:37 domotic bluetoothd[449]: Failed to set privacy: Rejected (0x0b)[/color]
lines 1-18/18 (END)
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-09-21 09:39:36 CEST; 1h 2min ago
     Docs: man:bluetoothd(8)
 Main PID: 449 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─449 /usr/lib/bluetooth/bluetoothd

sep 21 09:39:36 domotic systemd[1]: Starting Bluetooth service...
sep 21 09:39:36 domotic bluetoothd[449]: Bluetooth daemon 5.43
sep 21 09:39:36 domotic systemd[1]: Started Bluetooth service.
sep 21 09:39:36 domotic bluetoothd[449]: Starting SDP server
sep 21 09:39:36 domotic bluetoothd[449]: Bluetooth management interface 1.14 initialized
[color=#FF0000]sep 21 09:39:36 domotic bluetoothd[449]: Failed to obtain handles for "Service Changed" characteristic
sep 21 09:39:36 domotic bluetoothd[449]: Sap driver initialization failed.
sep 21 09:39:36 domotic bluetoothd[449]: sap-server: Operation not permitted (1)
sep 21 09:39:37 domotic bluetoothd[449]: Failed to set privacy: Rejected (0x0b)[/color]
lsusb works lspci not=

Code: Select all

gianni@xxxxxxxx~ $ lsusb
Bus 001 Device 004: ID 0658:0200 Sigma Designs, Inc.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
gianni@xxxxxxx:~ $ lspci
-bash: lspci: opdracht niet gevonden
gianni@xxxxxx:~ $

Code: Select all

gianni@xxxxxx:~ $ rfkill list
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no

0n370uch
Posts: 44
Joined: Monday 08 January 2018 3:30
Target OS: Raspberry Pi
Domoticz version: Latest
Contact:

Re: Listen to your favourite radios V2

Post by 0n370uch » Friday 21 September 2018 11:46

Hi, this is interesting:

Code: Select all

Sap driver initialization failed.
Look here:
https://www.raspberrypi.org/forums/view ... p?t=131999

Gianni
Posts: 70
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi
Domoticz version:
Location: Home@Belgium
Contact:

Re: Listen to your favourite radios V2

Post by Gianni » Tuesday 16 October 2018 17:12

ok first thing solved.
The distance between te bleutooth speaker and the pi was to far.
Put my pi near my speaker and i got music when i exesute the command om my PI
But i still not get it work in Domoticz.
Looks like the os.excecute is not excecute on the pi :-)

User avatar
emme
Posts: 952
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Listen to your favourite radios V2

Post by emme » Tuesday 16 October 2018 17:29

have you setted the country in raspi-config or in the wpasupplicant.conf ?
The most dangerous phrase in any language is:
"We always done this way"

Gianni
Posts: 70
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi
Domoticz version:
Location: Home@Belgium
Contact:

Re: Listen to your favourite radios V2

Post by Gianni » Thursday 18 October 2018 11:14

yep my country is set correct

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=BE
but my bleutooth is working now it's only the os-execute that not work.
When i test to make a dir in my homefolder with os-execute the dir does not come in my home folder.

Gianni
Posts: 70
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi
Domoticz version:
Location: Home@Belgium
Contact:

Re: Listen to your favourite radios V2

Post by Gianni » Saturday 03 November 2018 3:22

still not working
it's drive me mad :-(
Reinstall my domoticz and stretch multiple time's.

so short
if i execute

Code: Select all

mplayer -noconsolecontrols http://uk2.internet-radio.com:8358/ &> /dev/null
direct on my pi manual it's play on my bleutooth speaker.
if i execute this code on domoticz

Code: Select all

    if  device.state == 'Off' then
        os.execute ("killall mplayer")    
    end
it's kill the player i started manual.

But if is start this code from domoticz it's not play

Code: Select all

        if device.state == 'MNM' then
           os.execute ("killall mplayer") 
           os.execute ("mplayer -noconsolecontrols http://uk2.internet-radio.com:8358/ &> /dev/null")
        end
so whats the different between the off and the MNM code?
The only thing i can think off is that is delete the PI user and use my own user account?

Gianni
Posts: 70
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi
Domoticz version:
Location: Home@Belgium
Contact:

Re: Listen to your favourite radios V2

Post by Gianni » Saturday 03 November 2018 10:38

i found the problem now i need to find a solution
I create a simple bash script that excecute

Code: Select all

mplayer -noconsolecontrols http://uk2.internet-radio.com:8358/
if i run mplayer -noconsolecontrols http://uk2.internet-radio.com:8358/ in the console it's works

Code: Select all

Audio only file format detected.
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 160.0 kbit/11.34% (ratio: 20000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...

if i run it from the script i get a pulse connection refused

Code: Select all

Audio only file format detected.
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 160.0 kbit/11.34% (ratio: 20000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...

0n370uch
Posts: 44
Joined: Monday 08 January 2018 3:30
Target OS: Raspberry Pi
Domoticz version: Latest
Contact:

Re: Listen to your favourite radios V2

Post by 0n370uch » Saturday 03 November 2018 11:35

Hi, I'm not sure. But can you try this:

Code: Select all

sudo adduser <username> audio

Gianni
Posts: 70
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi
Domoticz version:
Location: Home@Belgium
Contact:

Re: Listen to your favourite radios V2

Post by Gianni » Saturday 03 November 2018 15:20

gianni@domotic:~ $ sudo adduser gianni audio
De gebruiker `gianni' is reeds lid van `audio'.

:-)

toch bedankt om mee te denken

0n370uch
Posts: 44
Joined: Monday 08 January 2018 3:30
Target OS: Raspberry Pi
Domoticz version: Latest
Contact:

Re: Listen to your favourite radios V2

Post by 0n370uch » Saturday 03 November 2018 15:23

Oh great :-).
Gern geschehen. Viel Spaß ;-).

Gianni
Posts: 70
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi
Domoticz version:
Location: Home@Belgium
Contact:

Re: Listen to your favourite radios V2

Post by Gianni » Saturday 03 November 2018 16:55

hheehehe it's not working,i was already a member of audio :-(

0n370uch
Posts: 44
Joined: Monday 08 January 2018 3:30
Target OS: Raspberry Pi
Domoticz version: Latest
Contact:

Re: Listen to your favourite radios V2

Post by 0n370uch » Saturday 03 November 2018 18:01

Ok bad... :(

User avatar
amplituda
Posts: 12
Joined: Thursday 23 August 2018 14:30
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Listen to your favourite radios V2

Post by amplituda » Wednesday 21 November 2018 12:32

Hello everyone!) Have you tried to switch channels with a radio button from Xiaomi?
that is, you can make the command "next channel" and so on in a circle?

0n370uch
Posts: 44
Joined: Monday 08 January 2018 3:30
Target OS: Raspberry Pi
Domoticz version: Latest
Contact:

Re: Listen to your favourite radios V2

Post by 0n370uch » Wednesday 21 November 2018 12:42

amplituda wrote:
Wednesday 21 November 2018 12:32
Hello everyone!) Have you tried to switch channels with a radio button from Xiaomi?
that is, you can make the command "next channel" and so on in a circle?
Hi, oh cool. I will test it.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest