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


HC3 QuickApps coding - tips and tricks


jgab

Recommended Posts

4 hours ago, 10der said:

I have patched @tinman code with separated "device"

now 

dev:playFromCIFS

or

dev:playFromUri

not removed the current queue playing.

so if you now listen Ozyy Osbourne and HC3 playing notification now it lok like


 

 

:) 

 

Please login or register to see this code.

 

Is the local dev not getting IP-address in function QuickApp:onInit()?

Link to comment
Share on other sites

28 minutes ago, Rover said:

Is the local dev not getting IP-address in function QuickApp:onInit()?

no. cuz i can call ANY sonos and pass any IP addresses what i want to play

Link to comment
Share on other sites

 

 

+ can seek

+ save / restore (also queue)

playFromCIFS

and

playFromUri

now always auto save the current state / queue / etc

 

% known bug - volume not saved but can't changed by playing playFromCIFS & playFromUri. TODO

 

 

Edited by 10der
Link to comment
Share on other sites

2 hours ago, 10der said:

Please login or register to see this attachment.

 

+ can seek

+ save / restore (also queue)

playFromCIFS

and

playFromUri

now always auto save the current state / queue / etc

 

% known bug - volume not saved but can't changed by playing playFromCIFS & playFromUri. TODO

 

 

Is it a scene or a QA?

How to call this scene?

Link to comment
Share on other sites

5 hours ago, Rover said:

Is it a scene or a QA?

It’s raw code for any. 
you can make from code or scene or Qa 

but probably it should be Qa

well will do

Link to comment
Share on other sites

 

[violation of copyright]

sorry @Tinm

Edited by 10der
  • Like 1
Link to comment
Share on other sites

4 hours ago, 10der said:

1) upload QA.

2) save.

 

now from anywhere


somehow I can’t get it to work. It only plays the first second of the mp3 ?
 

(Start and stop do work)

 

 

 

Edited by SmartHomeEddy
Link to comment
Share on other sites

18 minutes ago, SmartHomeEddy said:

somehow I can’t get it to work. It only plays the first second of the mp3 ?

(Start and stop do work)

 

this is why i decided to not count on timers in my QA, state trigger is better for that (or state change check in loop). State check is separate loop, so one can specify even .25 for 250ms update, so as long your Sonos can handle it, you have the state change in time.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, SmartHomeEddy said:

somehow I can’t get it to work. It only plays the first second of the mp3

from NAS should be OK

if you playing from URL - SONOS do not return me how many time i should waiting for the end.

Sonos always return me 0:00:00

 

I do not know how to fix it.

may be I should loop here... and wait IDLE state... but i do not know.

i can test when i back top home

Edited by 10der
  • Like 1
Link to comment
Share on other sites

9 minutes ago, 10der said:

from NAS should be OK


I use a local NAS. (I also tried from a web url, but no sound)

The mp3 I use, is almost 2 seconds. 

 

10 minutes ago, 10der said:

I do not know how to fix it.

may be I should loop here... and wait IDLE state... but i do not know.

i can test when i back top home


no worry 

 

 

Link to comment
Share on other sites

31 minutes ago, SmartHomeEddy said:


I use a local NAS. (I also tried from a web url, but no sound)

The mp3 I use, is almost 2 seconds. 

 


no worry 

 

 

can you check is changes somthing in teh queue?

maybet you wrong provide path?

Link to comment
Share on other sites

The Sonos plays only the first part of the mp3. So I hear what she is trying to say ("You have got mail"), but she stops after "You" ?

 

(The MP3 is included in this post)

 

So the path will be OK then?

 

Please login or register to see this attachment.

 

 

Link to comment
Share on other sites

[violation of copyright]

sorry @Tinm

 

Edited by 10der
Link to comment
Share on other sites

13 hours ago, SmartHomeEddy said:

Is there a way to extract the Lua code from the fqa?

 

(I like to copy past the Lua code)

using io.open and io.write at ZBS or VScode

 

 

Link to comment
Share on other sites

 

[violation of copyright]

sorry @Tinm

Edited by 10der
Link to comment
Share on other sites

Thanks @10der, I am at work right now, I can't hear what Sonos is saying at home ?, I will listen to her end of the day. 

 

 

27 minutes ago, rangee said:

using io.open and io.write at ZBS or VScode

 

Thanks, I have VScode (don't use it that much). I will try to figure it out. 

 

(Would be nice to learn from several codes, without having to install the QuickApp)

 

 

Edited by SmartHomeEddy
  • Thanks 1
Link to comment
Share on other sites

@10der The whole MP3 play, from begin to end. I expected after playing the MP3, the music station playing before the MP3 would return. But the Sonos turnes off, or mutes. If I push play, the MP3 is played. 
 

Or do I have the wrong expectations? 

Link to comment
Share on other sites

No. Strange 

radio station - have a mail - radistation again 

ok will check 

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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...