[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

move the 2nd if to outside of the 1st if or move to the else block and it will work. like so:

if switch changes to on
   pause pistons
else
   if switch changes to off
      resume pistons
   end if
end if

may be the switch does not support notification of physically vs programmatic events? not sure that all switches do.

Hey all,

I’m goofing around Fuel streams as I find it very intriguing and plan on subscribing to premium once available.

I’d like to log at what time each day I close the bedroom light, which basically means I went to sleep.

Y axis cannot contain string so $time24 doesn’t seems to be a viable solution.

What I think I can achieve is logging instead the variation in minutes to a specified time (I.e. +102 min over 10pm).

Anyone have idea how I could achieve that? I played around with variables and couldn’t figure how to make it works as non-strings one also include the date so they are unique and not rotating everyday.

Thanks!

time($now) - time(“10:00 pm”)

Thanks but here is what it returns

(expression) Time($now) - time("10:00 pm") »»» (time) -40937967

Divide that by 1000 to get the minutes.

Edit: it will be a negative number before 10 pm and after it will be positive.

1 Like

For anyone using their Sonos–or any speaker for that matter–as a door chime.

What should the string be in order to resume playback of a current track that’s interrupted after the piston kicks in to announce any door is open? And which ‘Do’ in the track would one use?

or

I would also presume that some type of track variable would have to be defined to check the track that is currently playing, put it in memory, so the piston knows which track to resume. i’d also be nice if i could resume from the last track position (if possible) instead of starting the track from the beginning.

thanks in advance.

What happens if you select “Speak text and resume”.
So you would have "Do Speak text ‘front door open’ and resume.

Just what i was looking for.

Can you please post your piston here so that i can test it out myself?

id like to use it for my setup.

Thanks

my initial problem is to determine the string to use for the track URL.

can you direct me to the right documentation that has that information? such as the API?

thanks

How do I store variables based on a JSON file obtained thru GET web request?

I’m calling WU API with French setting (we can’t choose language the way it’s setted in webcore as far as I know).

What task should I execute after the web request one? Do I Have to parse Json response? I’m kinda in the blue here. Thanks!

P.S.: I’ve logged to console $reponse and it confirms the web request works fine.

I’m a bit confused.
Are your speakers playing something already?
In my setup with Sonos speakers if something is already playing then I use Speak text and resume.
The current track is stopped, text spoken and then the track that was playing is resumed.

For a radio setting I use the following url:-
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_two.m3u8
Is this the sort of thing you mean?

yes. track is actively playing.

i was under the impression that i had to write some type of string in the track URL field. the way you’re explaining it seems that is not that case. with that missing piece of information in mind. i will run my test.

EDIT: okay. that worked… using the “speak to test and resume” that is. which i overlooked.

Now.

Back to my original question; second condition–which is to resume playback at the location where the track left off, before being interrupted with “speak to text” for the door chime. Is this possible with ST (webCoRE)? Starting playback from the beginning isnt practical. especially during parties :smile:

Thanks

yes, parse the json using the “parse JSON data” task and then reference the attribute(s) you need as the set variable source to store to a local or global variable.

TBH I’ve never tested it.
I know this is not the answer but all I can suggest is try it and see if it does start playing the track again from when it stopped. Sorry.
With a radio playing it just resumes the radio stream. Not from where it was stopped though but where it is when the stream resumed.

Excuse my noobness but would you have a minute or two to go deeper in your explanation?

Thanks for your help and worry not, I’m a fast learner. Just need an exemple sometime :smiley_cat:

i read ya.

i tested it. and it works.

i can understand for a radio stream since it’s live and you dont really have the option to playback.

but for content that you’re streaming from music services that ive added to the Sonos config. I would like to “keep track” of where the playback is, and then resume from it if there’s interruption in playback. This is assuming the API is capable of doing such a thing.

lastly, would you happen to know if it’s possible in webCoRE to:

Scenario 1:

-current track is playing at say volume level 40%.
-a door is opened;
-piston is triggered which does:
-speak to text;
-set volume to 50%.
Except i want to:
-return back to the previous volume level (40%);
-resume playback

you see where i am going with this, right?

EDIT: I found the Sonos API description, albeit it’s from older code.
Based on what i can read from the API description. There
(https://github.com/jishi/node-sonos-http-api/blob/master/README.md)

will review it myself to see if the API is capable of doing what i want webCoRE to do.

what noobness … sure … give me a minute … let me find something …

here you go. i have overlaid the json itself right before the tasks that parse and reference values in it.

Hi all,
Hopefully an easy one.

Is there a way to store messages without sending a push? For instance if I want some pistons to run through the night I don’t want to be bothered with notifications all night so I would like to check the messages in the morning to see if they ran OK.