Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Sonos HUB v.1


Question

Posted

hi!

 

this is sonos hyb QA.  

Please login or register to see this attachment.

written from the scratch.

 

how to use.

1) most popular action = notification

fibaro.call(1987"playNotification""192.168.1.70""//192.168.1.29/Multimedia/Music/female-opening-mail.mp3"

 

where 

1987 - QA id

playNotification - function / action

"192.168.1.70 - SONOS IP address

"//192.168.1.29/Multimedia/Music/female-opening-mail.mp3" - file for notification.

the last param (not required) is volume.

 

!notice: // means what SONO should play file from the NETWORK

!notice #2 - you can play notification on;y from network.

 

when you playing notification my QA will save your current volume, queue, etc

than play notification and restore prev. state of ypur sonos.

so,. if you listen the music QA restore your music / radio erc 

 

2) working with queue

yes, now you can add some music to sonos queue for xample lime mornign alram.

 

fibaro.call(1987"cleareQueue""192.168.1.70"
fibaro.call(1987"addToQueue""192.168.1.70",  {
             "//192.168.1.29/Multimedia/Music/!NEW/Squazoid - Voyage Across (The Remixes) - 2020/06. Squazoid - Sacred Mantra (Kuba Remix).mp3",
             "//192.168.1.29/Multimedia/Music/female-opening-mail.mp3",
             "//192.168.1.29/Multimedia/Music/Ding.mp3",
             "http://192.168.1.29/Ding.mp3"
         }
    )

 

QA can recognize only NETWORK playing without prefix. just add //before.

otherwise here is all prefixes

--[[
x-rincon-stream:                Line In
x-sonos-htastream:              TV
x-file-cifs:                    Local Library
x-rincon-mp3radio:              Radio
x-sonosapi-stream:              Radio
aac:                            Radio
x-sonosapi-radio:               Radio
hls-radio:                      Radio
http:                           Track or Radio
https:                          Track or Radio
x-sonos-spotify:                Spotify
x-sonos-http:                   Google (music library or mix)
x-sonos-http:library            Amazon (my music)
x-sonosapi-hls-static:          Amazon (tracks and radio stations)
x-sonos-http:ondemand_track     Napster tracks
x-sonosprog-http:station_track  Napster stations
]]
 

 

 

others

 

 fibaro.call(1987"pause""192.168.1.70")
 fibaro.call(1987"play""192.168.1.70")
 fibaro.call(1987"save""192.168.1.70"

 

notice,

you also can use 

fibaro.call(1987"save""192.168.1.70")
fibaro.call(1987"restore""192.168.1.70")

 

manually. when you wish.

 

for example

fibaro.call(1987"save""192.168.1.70")
 
.. MORNING ALARMS
 
-- at 10 AM - restore sonos queue
 
fibaro.call(1987"restore""192.168.1.70")

 

 

Have a nice day and weekend!

 

O.

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Like 7
  • Thanks 1

15 answers to this question

Recommended Posts

  • 0
Posted

@10der

Thanks for ythe modified fqa.

I instaled but it doest play (I dont see anything changing on my Sonos app).

This I use:

fibaro.call(227,"playNotification""192.168.1.16","//192.168.1.1/Schijf2/04-ServerDomotica/gordijnenopen.mp3",30)
The previous version played my file.
//Sjkaie
  • 0
Posted

I am so verry sorry I made a typo

Its working great

 

  • 0
Posted

@10derIs it possible to play  also on pc or laptop?

Than I should have a extra speaker.

//Sjakie

  • Like 1
  • 0
Posted (edited)

Hi @10der , is it possible to play on JBL, Bluesound, Kef, Harman Kardon and Bose?
I would like to play also on my vacuum tube radio and my Logitech Squeezebox?

??????????

Edited by Bodyart
  • Thanks 1
  • 0
  • Inquirer
  • Posted

    @Bodyart

    (patient) - Doc, can I play the violin after tonsils out the operation?

    (doc) sure!

    (patient) wow! I will playing on violin!

    • Like 1
    • 0
    Posted

    @bodyart

    Perhaps a small guidance for this noob in the right direction to accomplisch what I would like to do should be nice.

    Note: in HC2 sound can come out of laptop by NodeRed

    With this beatifull QA from 10der perhaps I can free my Raspberry and use it as NAS server thats why the Q?

    But thanks for laughing.

    //Sjakie

     

    • 0
    Posted

    Can I also use the scene to increase the volume before playing an mp3 over the network?

    • 0
  • Inquirer
  • Posted
    1 hour ago, roeggi said:

    Can I also use the scene to increase the volume before playing an mp3 over the network?

    the last param is volume (if no provided = not changed)

    • 0
    Posted

    Hi

    I have tried this and on my sonos play 1, on the iphone app i get a message saying it "Unable to play song.mp3 - the file cannot be found.

    can anyone shed any light on this please?

    SETUP HC3, Synology NAS drive

    SONOS play 1

    • 0
    Posted

    did you add all the files to your sonos library.

    in sonos app - media servers put your NAS shared music folders details

    then run update media index

     

    to confirm its all working try playing a file from the sonos app. if it wirks from app it will work from HC3

     

    • 0
    Posted

    Sorry for lame question but how to use it? I've uploaded this QA but it's empty. Should I add variables or what?

    • 0
    Posted

    can you play apple music? not sure how to reference it?

    • 0
    Posted

    is it possible to play on two sonos speakers at the time? ie. can i call to two different ipaddress in one call or do i need send it twice? as just thinking that there might be a slight delay if i send it twice?

    • 0
    Posted (edited)

    @10der thank you for a great qa, i have it working other then the queue part of it, i can send the queue but it does not play the queue, when i look at my sonos app i can see the queue but it shows me a message saying not playing queue, have you come across this before? is there a way of calling it to play the queue?

    thank you for your help.

     

    this is what i get back

    [05.01.2022] [17:58:17] [TRACE] [QUICKAPP478]: UIEvent: {"deviceId":478,"values":[null],"eventType":"onReleased","elementName":"btErev"}

    [05.01.2022] [17:58:17] [DEBUG] [QUICKAPP478]: //nas/music/HC3/SholomAleichem.mp3 //nas/music/HC3/KohEchsoif.mp3 //nas/music/HC3/JoyShabbos.mp3 //nas/music/HC3/ItsTimeToSayGoodShabbos.mp3

    [05.01.2022] [17:58:17] [DEBUG] [QUICKAPP285]: onAction: {"actionName":"clearQueue","args":["192.168.1.185"],"deviceId":285}

    [05.01.2022] [17:58:17] [DEBUG] [QUICKAPP285]: onAction: {"actionName":"playNotification","args":["192.168.1.185","\/\/nas\/music\/HC3\/SholomAleichem.mp3"],"deviceId":285}

    [05.01.2022] [17:58:17] [DEBUG] [QUICKAPP285]: onAction: {"actionName":"addToQueue","args":["192.168.1.185",["\/\/nas\/music\/HC3\/KohEchsoif.mp3","\/\/nas\/music\/HC3\/JoyShabbos.mp3","\/\/nas\/music\/HC3\/ItsTimeToSayGoodShabbos.mp3"]],"deviceId":285}

    [05.01.2022] [17:58:22] [DEBUG] [QUICKAPP285]: ERROR: { } INFO: Play

    [05.01.2022] [17:58:22] [DEBUG] [QUICKAPP285]: ERROR: { } INFO: GetTransportInfo

    Edited by Jay Ess
    • 0
  • Inquirer
  • Posted

    1) remove sonos hub :) 

    2) install Fibaro Sonos Speaker

    image.png.9f41e4c252430e333d0bd43c3c083c4d.png

     

     

    play radio

    fibaro.call(2521, "playFromUri", "https://hirschmilch.de/chillout/listen.pls")

     

    play from queue song #4

    fibaro.call(2521, "playFromQueue", 4)

     

    clear all 

    fibaro.call(2521, "clearPlaylist")

     

    actually fibaro implement 

    addToPlaylist

     

    but it doesnot works!

     

    fibaro.call(2521, "addToPlaylist", "192.168.1.29/Multimedia/Music/ОДИН В КАНОЕ/Один в каное - Один в каное - 2021/03 - Будь мені кимось.mp3")

    @m.roszak

    please fix. if possible

     

    here is alternative as temp fix

     

    Please login or register to see this code.

     

    Please login or register to see this code.

     

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...