This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Flows
Comments
where to find add to the log?
It is not one of my flow cards?
like https://apps.athom.com/app/nl.nielsdeklerk.log
https://apps.athom.com/app/nu.dijker.papertrails
Or one of the others
Thanks, very helpfull
My problem was that in my living room I have two Hue motion sensors and a Multisensor6, for which the Hue sensor would turn off the lights when only one of the two didn't detect motion. For example I would be working at the dinner table, but since the motion sensor at the television didn't detect any motion, all the lights in the living room were turned off. The lights should only be turned off when all the motion sensors don't detect motion for a certain period.
For the app Sets each set can have multiple states. In my case I defined the set 'MotionDetectors' and three states, one for each motion sensor. In the print screen below you can see the remaining seconds until the state is de-activated. The number of seconds for the countdown is defined in the next flow.
Next I defined how for each motion sensor a state is activated and for how long. In this flow a state is activated for 20 minutes, except on a Friday and Saturday evening, when I'm typically coding flows, the state is activated for 40 minutes.
Similar flows are created for the other two motion sensors.
Finally a light in my living room is turned on when one of the three states is activated. In the past I had a separate flow for each motion sensor and this app reduced the number of flows.
The Boolean 'Night' is added because during the night hours a different Hue Scene is used, but that is not important for the use case Sets.
Other cards are available and there is a detailed description for each card in the app store.
When the countdown is finished the state is de-activated. When all three state are not active, the flow below is started and will turn off the light.
The interesting extra is that other triggers can de-activate states which starts the flow below. For example I have a remote which will turn off the light by de-activating the entire set.
I hope this helps in using the app Sets.
I have some lights that I would like to turn on when it's getting dark if someone are at home - but not if the house is empty. Further, I want the lights to turn on when someone comes home and it's dark.
Flow #1: Making a "global" variable: Dark or not?
A Better Logic Boolean variable (#Dark) that becomes "true" if below a certain value (in this case 50).
By doing this, I get a global variable that I can use in other flows as a simple conditon (is it dark or not) - to trigger flows or as condition in other flows - and still only have to adjust the limit one place.
Further, it makes it possible to distinguish between two situations: Is it getting darker or is it getting lighter (Better Logic has a flow card that can trigger a flow, if a Better Logic variable changed at least "something" or specifically in- or decreased "something", but I've not found a way to do this with sensor values directly).
Flow #2: Turn lights on, if someone are home and it's getting dark
If the reported value from the motion sensor comes below my limit #Dark is set to "True" and the flow below is triggered. This flow includes a check that somebody is actually at home (a Better Logic variable "Anyone_home" set by other flows) and that I'm not sleeping (sleeping or not is only set for my own profile at present, therefore the "Nobody" card is used). The flow will trigger a separate flow "L-GF-on" in which I keep track of exactly whihc lamps should be included or not (and therefore a single flow to make changes in if needed).
Flow #3: Turn lights on, if it's dark, when someone comes home
Based on my Better Logic variable "Anyone_Home" (maintained by other flows and using information from various sources and not only Homey's native presence function) a flow is triggered when someone arrives at home - and if it's dark, the lights are turned on using the same flow as before (L-GF-on).
Hope it makes sense :-)
Update (reply to https://forum.athom.com/post/quote/936/Comment_64001):
Looked at Insights for the sensor and realised, that although the room is well-lit during daytime, the actual measured levels are quite low (the sensor is placed in the "dark" corner of the room) resulting in lumince-levels are actually always below 50 at present (during summertime higher, though).
As a consequence I'll change the limit to 20.
Regarding the question about changes caused by turning on lights, the report interval is set to 3600.
Further, the illumination report treshold is set to 200 lux.
Therefore, turning lights on obviously doesn't affect values in my present setup - tweaking these values will probably be the solution if turning on lights interferes with the "dark" status.
Update (reply to https://forum.athom.com/post/quote/936/Comment_64040):
Fibaro Motion Sensor 2
I did replicate this flow but when Homey asks, it never switches on the lights as I apparently give the wrong reply..?
Now about to change apartments, hyping up to get some Z-Wave devices. At the moment though I'm making due
There is no public API (https://dev.fitbit.com/reference/web-api/quickstart/) so I used IFTTT.
Aria scale (users chosen with foot) -> Aria app account -> IFTTT -> Homey
NyVikt = New Weight. GammalVikt = Old Weight. GammalNyVikt is the difference between the two.
In the end it says whether you lost weight, or gained weight, and how much. Now I just need a bluetooth speaker for the bathroom
And how do you create a global variable?
Think it must be a leftover from having som kind of calculation at some time in the flow card with math.js and just changed the formula at some point...
I have a fibaro plug. how can i solve this?
Hope this helps.
Yes that part works. But the idle watt is not constant, so it every few seconds it changes from 0.3 to 0.4 etc. so i keep getting notifications every time the watt changes between 0.4 and 0.3. These are my flows:
Energie changed AND less then 10----> Set boolean false
Boolean changed AND wasmachine false----->turn hourglass
I measure every 99 seconds the power usage.
I store this in 4 variables for each device (devicenameX1 - devicenameX4)
In this example I have 3 devices to measure.
I use a counter to know what variable to fill.
You need better logic for this, and create 4 variables per device, a variable for counting up, a boolean for every device to set a flag if it's actually active or not.
So
4 flows for measurement
for every 99 seconds, Energycount = 1
set Energycount = 2
set devicenameA2 = energydeviceA
set devicenameB2 = energydeviceB
set devicenameC2 = energydeviceC
for every 99 seconds, Energycount = 2
set Energycount = 3
set devicenameA3 = energydeviceA
set devicenameB3 = energydeviceB
set devicenameC3 = energydeviceC
for every 99 seconds, Energycount = 3
set Energycount = 4
set devicenameA4 = energydeviceA
set devicenameB4 = energydeviceB
set devicenameC4 = energydeviceC
for every 99 seconds, Energycount = 4
set Energycount = 1
set devicenameA1 = energydeviceA
set devicenameB1 = energydeviceB
set devicenameC1 = energydeviceC
Example for checking devicenameA, inactive ?
if Energycount changed
and
devicenameAboolean = true
devicenameA1 < 3
devicenameA2 < 3
devicenameA3 < 3
devicenameA4 < 3
then
set devicenameAboolean = false
Example for checking devicenameA, active ?
if energy changed (devicenameA) <- in my case the card for the fibaro plug
and
devicenameAboolean = false
energy (devicenameA) > 200
then
set devicenameAboolean = true
Instead of 4 flows (400 seconds) you can go for 3 flows, and with less variables, but I found it to be more accurate with 4.
I can post some screenshots but since the variable names are not entirely visible I thought writing down the flows was better.
Must also add that mine was from november 16 but hey, if it works it works aye?
Sorry if it sounded like the one (mine) being better than the other (yours). I haven't read all the comments. I remembered that I posted 'my' solution. That's all.
We're all here to help eachother, and find good ideas.
Must say I'm quite happy with all the comments I read on the forum. It's quite a mature forum with good input.
Just want to thank you all !
Just added a link to ur flows and wanna thank u for ur effort in posting this to help others.
Cheers!