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.

Repeat faster than every second

Hi.

Are the any way to repeat something faster than every second? The time card only holds values down to one second, also when using variables.

Is there an app for that? :)

Comments

  • Nope, no app... What would you want to repeat, setting colors? And which radio (technology) would you like to use?
  • There actually is an option to get faster than 1 second with the delay option in the cards. If you type '0.5' in notepad or whatever, and copy-paste it in the delay option field, you will get a 0.5s delay. I'm not sure how well it works and/or if it's stable, but you have the option.
  • LurendrejerLurendrejer Member
    edited October 2017
    @bvdbos I enable and disable a repeating flow, by hold and release scene notifications. The flow changes the brightness of zigbee and zwave based lights. I would like to have the flow repeat faster that every second.

    @KoenMartens I might misunderstand. Can I repeat a flow by delaying an action? I don't have a flow with multiple actions with a relay, I have one flow that repeats based on time(every 1 second) until the flow is disabled again.
  • LurendrejerLurendrejer Member
    edited October 2017
    It's hard to explain flows in text, but: I have a switch that sends a hold scene notifications when held, it doesn't repeat this scene notification. I use this to enable a looping flow. 
    When I release the switch, it sends a release notification. Which disables the looping flow.


  • Ooooh... I'll just put the dim command in twice in the looping flow... Thank you, sleep and advice helps!
  • Pooh.. just hit me. It doesn't really solve my problem. But it would make the dimming smoother. I still won't be able to stop the dimming midway between the repeats.
  • Indeed, that was my plan. Of course I'm not sure what your specific applications are/were, but instead of adding +10 every 1 second, you could add +1 every 0.1 second. However, the flow should be repeated every second, and thus can only be stopped every second, not at 0.5 seconds.

    If you know beforehand at what value you want to stop, you can do something like this (example following):

    Current value: 0
    Wanted end-value: 15
    Step-size: 1 every 0.1 second

    Make flow A like:
    For every second, do: [10x flow B at delay 0.1, 0.2, 0.3, etc]

    Make flow B like:
    if current value < wanted end-value, dim lights and set current value to +1

  • The goal is to have the lights dim up or down while holding the button down, and to stop dimming when released . But thanks :)
  • KoenMartensKoenMartens Member
    edited October 2017
    Maybe something like this might work, but it will be quite resource-intensive:

    Flow A:
    If button is pressed, set var_pressed to TRUE

    Flow B:
    If button is released, set var_pressed to FALSE

    Flow C:
    Repeating every second, activate flow D with delay 0.0, 0.1, 0.2 seconds (etc).

    Flow D : (repeated every 0.1 second)
    If flow is activated, AND var_pressed is TRUE, then do something with the lights.

    As I said, since flows C and D are constantly active, this will have a non-stop load on Homey. However, in principle, this should work, since flow A and B react instantly on getting the signal from the button.
  • @KoenMartens - nice creative solution. And if everything was hardwired it would work like charm :) but I fear that the z-wave commands would congest the network and start overlapping/overtaking each other.
Sign In or Register to comment.