Anyone got a simple Piston where when it starts raining outside it flashes a hue bulb to a colour (i.e blue) and then returns to its previous colour?
Thanks
Anyone got a simple Piston where when it starts raining outside it flashes a hue bulb to a colour (i.e blue) and then returns to its previous colour?
Thanks
In my experience, while itâs technically easily feasible, I wouldnât find it practical⌠Unless you do have some sort of sensors outside, thatâs a whole different story.
Using $weather pulled from Weather Underground wonât give you the result youâre probably looking for. Hereâs why :
A. AFAIK, you canât subscribe to variable change so youâll have to set a timer to check variable every x minutes.
B. While WU is really good, itâs usually not accurate/fast enough for real time monitoring.
Tl;dr youâll end up with a light flashing minutes after the rain started, or flashing when itâs not even raining.
if you have a rain sensor that works with ST that would be perfect.
if you dont, WU supports current condition change notification, apparently realtime, through IFTTT which supports 4 different conditions, one of them being rain.
if you want to give this a shot and need any help setting it up with webcore, just ask.
Long term looking for own weather station but short term just looking at using WU.
Have played with IFTTT and can get it to flash lights when condition changes to rain however cant get them to flash a certain colour (i.e. blue) they only flash what ever the current colour is.
Help would be appreciated
@lanky8804 Keep us posted about how satisfying is the result. Might only be my area but when I tried that work around I found it not reliable/fast enough.
As for help with coding, i might have time to look into it later today.
In a nutshell:
Thanks for the advice, sound exactly what Iâm after.
New to webhooks and linking into Piston so coding help would be appreciated.
Am i correct in this:
IFTTT
If condition changes to Rain Then Webhooks (not sure what setting to input)
WebCore
If IFTTT executes Value (name of IFTTT???) Then change Hue bulbs etc
On top of my head, yeah.
I donât know how the ifttt app is made, but youâll most likely be able to pass values to webcore thru the webhook.
Those values will be exploitable under $args in webcore. Donât know which value you might wanna pass, depends on the ifttt app. Could be rain intensity for exemple.
ok, need some ideas about what to input on these as new to webhooks etc.
Ingredient would be âConditionâ from the drop down that appears.
In the webcore snapshot you got the URL to paste into webhooks and use post method. Data format would be json if Iâm not mistaking.
In webcore, compare value is where you got to put the ifttt app name/label canât remember and not on iPad to check.
here is executing a piston from IFTTT:
then in the piston use these variables from $args:
EDIT: this one was not specifically for rain but its more about IFTTT executing a piston (THAT) with variables passed in, when a WU trigger (THIS) is sent to IFTTT.
sure thing. you dont need the if condition, since this piston will get executed by IFTTT only when WU condition changes to rain. so drag the with statement to outside of the if and then delete the if and it should work.
So had some rain and piston didnt work.
@bangali so if i drag my with statement out of the IF. Do i not need the âIFFFT executes âRainââ part either?
Think the IFFFT is working ok as get notifications on phone but piston and light not appearing to do anything??
The URL in the IFFFT is correct isnt it?
if you drag the with outside, you dont need the if statement.
its custom to you, so cant tell. but look at the example i posted and match it to yours generally in format though your values will be different.
So this is now what it looks like:
How does it link to IFTTT? As that URL was in the IF statement part?
Sorry if these are stupid questions and thank you for your help
there are no stupid questions only dumb answers /jk so, if the answer below is not clear enough, just ask again.
the piston is not linked to IFTTT. IFTTT links to the piston thru the URL you provide to execute the piston when WU triggers rain on IFTTT.
EDIT: the instructions on how to execute a piston from IFTTT is under settings ⌠this section:
Ah ok that makes sense.
Have edited URL as that was incorrect from now understanding this, shall now wait for rain LOL.
Thank you once again.
you probably know this already, but you can take the same fully formed URL that IFTTT would generate with the params and just run it from a new window on your browser. if you dont send the params the piston should still execute just not find the params.
EDIT: actually i see that you are not using the ifttt passed in param, so the piston should just run fine even without the param.