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

Interactive flow-editor

24

Comments

  • Fire69Fire69 Member
    edited January 2015
    Yes, ofcourse, if you tell him he'll know :)
    But I think Aaron's example was meant like this:
    "Homey, lights on please"
    And then Homey runs through those ifs
    if location:kitchen then lights:kitchen:on
    if location:bedroom then lights:bedroom:on
  • EmileEmile Administrator, Athom
    Oh, like that. Well, 'lights on' is already enabled by default, just as 'lights on in the living room'. If you want if-else, you should create more flows. We are thinking about a 'go to flow' block, but this might be confusing to most.
  • In the future it could be possible to detect to which microfone you speek. The simple way :-)
    Yes, it would be nice to have it fancier later on, beacon, wifi or something else (kinect kinda device). But with the microfone it would be the easiest way I think.

    Sure you could say where you are (@MarcoF), but just saying "lights on" should be enough.

    Let me say that the editor looks really nice, the designer has done a really nice job here. It look simple and intuitive to. Can't wait to start making scenes with it.

    But it does not do what I said above (at least not the image you have shown), missing the multiple conditions.
    But…let me stop with this and wait till I see the whole thing in action (live) and then see if there still is a problem or room for improvement.
  • EmileEmile Administrator, Athom
    Thanks for the compliment :)

    The middle column can hold as many conditions as you want. A condition here is 'something that is true', e.g. "I am home".
  • :-) I was typing and already there where two new messages.

    Maybe you are right Emile. Lets wait till we can play with it ;-) and then see if I am missing what I think I am.

    But at least I got you posting another picture and some more insight in the editor :-))
  • If you create rules in the flow editor, will the underlying code be visually available somewhere?
    Maybe that would be handy for non-programming users, so they can check the code and see how it works.
    This way they can gradually (me including :P ) create the rules in JS directly and make more complicated rules.
  • EmileEmile Administrator, Athom
    edited January 2015
    The 'code' that the flow editor creates is not JavaScript, but a describing json file. It looks like this:

    { "title": "Aaron", "name": "aaron", "trigger": { "id": "speech-input", "type": "manager", "method": "said", "args": { "triggers": "" } }, "conditions": [ { "id": "geolocation", "type": "manager", "method": "inZone", "inverted": false, "droptoken": false, "args": { "zone": "Living Room" } }, { "id": "cron", "type": "manager", "method": "day_equals", "inverted": false, "droptoken": false, "args": { "day": "Friday" } } ], "actions": [ { "id": "speech-output", "type": "manager", "method": "say", "args": { "text": "See, it works :-)" } } ] }
  • AthomeyAthomey Member
    edited January 2015
    Emile, first compliments with where this is going. Secondly: Two questions and somewhat of a suggestion, brainstorm/question:

    #1 Is it possible to add a delay resulting action? E.g.: The Fibaro motion sensor notifies the system that movement has stopped, then wait 60 seconds, then turn the fan of the toilet off. ;-) I can do that in the Vera Edge.

    #2 Is it possible to to have a logical OR condition in the middle column between multiple arguments? As I understand it, now it only works as logical ANDs? Your JSON looks like it doesn't support it, nor that it's easy to include in your choosen format in the future.

    #3 As I read in you JSON, and in an earlier comment of yours, that you also support NOT for individual arguments, resulting in an "inverted" flag. Have you solved the GUI part of this yet? Maybe the elements "You are in" and "Today is" could have the word "not" shown, but grayed out with a cross through it. E.g. it will show "You are not in"If you click/touch it, it toggles to an underlined not-crossed out not-grayed-out "You are not in". The unerlining is quite intuitive to show you can click it, suggesting to toggle it. The crossing out (I used strike-out in the formatting here) and at least as important the graying out is showing clearly it is disabled and make people want to toggle it if they need it. 2 cts
  • EmileEmile Administrator, Athom
    @Athomey, great suggestions!

    #1 That is in the pipeline. Every action card will get a 'delay' option. Visible after you click a small stopwatch icon.

    #2 Not at the moment. The alternative is to make another flow. Later, I'll probably add some 'advanced features', together with grouping conditions. But for now that's quite hard to do and takes a long time to get right.

    #3 My initial though was flipping the card with a 3D animation. Showing a cross is a good suggestion, but I'm afraid people will see it as the card being disabled, instead of being inverted.
  • #1 - Very nice!

    #2 - Very fair!

    #3 - I meant only a cross through the word "not" and making it gray: inline, in the sentence "You are not in" e.g.. It is clear it's not enabled as inverted. It's also clear that apparently the system dóes support inverting. You try to solve this problem graffically, but I don't see how. Could you describe the "flipping" idea a bit more graffically? If you simply use the textual word "not" crossed out or clear as a toggle you do solve the problem. I'm just saying, I don't see the flipping solution as being clear, but maybe I'm wrong. Just don't let form rule over function.

    #4 - NEW QUESTION: You mentioned controlling Philips Hue lights directly. I assume this means brightness and color? Could you shed some light (pun intended) and the GUI component doing this? A nice color wheel, brightness, plus color temperature (in Kelvin) would be very nice (and a minimum to be better than the competition in my eyes). Will it also be possible (no must have for me) to implement smooth transitions (like delays between steps in controlling)?

    #5 - OFF TOPIC Since this weekend I've got a Vera Edge, Fibaro components, sensors, etc. and 30 Philip Hue lights in my house, to really compare it with Homey when it arrives. I've been mailing with Stefan about the business side of things a tiny bit, and decided to become first batch backer. Could you change my "member" suffix to "first batch backer"? Thx in advance! ON TOPIC
  • ((I see you are replying Emile, right now, don't forget this one!)) ;-)
  • EmileEmile Administrator, Athom
    ( This was supposed to be my programming night, lol )

    #3 I'll come back to this one

    #4 Yeah, this will be similar to the app, see the Kickstarter video and photos. Cycle through cards to toggle between temperature/brightness/hue

    #5 Already did that <3
  • #3 - Fine! I'll await patiently!

    #4+#5: Thx!

    Emile, maybe I've overlooked something somewhere, but couldn't find the answer to the following three questions:

    #6 - I assume it is possible to use any condition that can exist in the "AND" section in the middle, also as a trigger at the left? E.g.: "Fibaro 1x3kW switch switches ON"...it would be the least to support I think, but checking anyway.

    #7 - Is it possible to have a minimal duration for the trigger before it fires? E.g. "Fibaro binary sensor has been ON for 5 minutes"? I need this for some unconventional stuff in my Domotica demo-house.

    #8 - Is it possible to have a scenario trigger on a TOGGLE or FLIP? E.g. "Fibaro 1x3kW switch changes/toggles state from ON to OFF or vice versa"? [Ofcourse it ís possible to solve this with two almost equal scenario's, but it would duplicate a lot of scenario's for me, maybe it is should-have, not must-have]
  • EmileEmile Administrator, Athom
    #6 yep
    #7 nope. You'd write this in the driver yourself. Then a trigger card will be created "sensor has been {on|off} for {x} minutes"
    #8 yep
  • rvdmrvdm Member
    edited January 2015
    @ThieuStultiens, we've never definitely confirmed that we would support Tasker :)
    Should you not support tasker officially, one way to make the tasker users happy, is to use intents in your app, and to document them. Tasker can receive and send Android intents and act on it. This is almost no work on behalf of the Homey tasker-app builder, and will bring a lot of joy to tasker users. This essentially entails making sure the app broadcasts intents whenever it does something relevant, and making sure there's a receiver-service that listens for intents and acts on it. That last bit is probably slightly more work for the dev, the first bit is a no-brainer.
    Documentation can be found here: http://developer.android.com/guide/components/intents-filters.html
    Intents are not Tasker-specific, and will enable other apps to interface with Homey as well. There is a mountain of Win there.

    A simple use case for this (at least, the way I'm using it now): I'm using Sleepbot as an alarm clock on my Android phone. When i go to sleep, Sleepbot broadcasts an intent signifying I'm going to sleep; Tasker picks up the event, and signals my (current) home automation system to switch most useless equipment off, and to turn off the lights.
    In the morning, I switch off my alarm (Sleepbot broadcasts an intent), and Tasker switches on some lights (if it's winter and dark), and switches on my espresso machine, so it's heated up once I get downstairs for my morning espresso.

    Given my dependency on caffeine, I would really be happy if Homey could let me continue to do it like this :)
  • AthomeyAthomey Member
    edited January 2015
    #2b The 'or' condition - Emile, we talked about 'or' in the middle column of Homey's scene editor. Lets forget that for a second. At the moment I'm testing VeraEdge intensively.

    I've come to the conclusion that Homey could REALLY use an 'or' in the first column, so multiple triggers for one scene. (Maybe you already support that and I just misunderstood?) If you need to add that, it seems to me an easy feature (MUCH easier than 'or' in the middle column) with GREAT commercial advantages.

    Just creating multiple scene's COULD emulate this, but it would be unworkable and create a chaos of scenes, and thus create a huge commercial disadvantage. I think reviews of Homey trying out real-live use-cases will result in very bad conclusions.

    Use case: I have 4 switches in my living room, which control 20 Philips Hue lights in total (in the ceiling) and also 3 different kind of lights, through Fibaro switches.

    In VeraEdge: I create 2 scene's, one for switching everything OFF, with 4 different Fibaro switches as the OFF triggers in an 'or' set-up and the other scene is for turning everything ON. In each scene I have to add 23 devices in the correct mode, thus adding and configuring 46 devices to get the job done.

    In Homey as I understand it: I have to create 8 scene's (because there is no 'or' in the first column), with each 23 devices. This means I have to add and configure right state for 184 devices.

    My conclusion is the extra work and chaos when automating a whole house beyond the point of ' hobby' with Homey, will really damage Homey's impressions of reviewers. Nerds no problem, me too, I'll simply use Homey and create the chaos and do the extra work. I'm thinking about expansion beyond the hobby-tweaker.

    I'd really like to read about your view on this, or hopefully Ithe first column already has an 'or', which is technically much easier than in the second column, as I look at it. Cheers.
  • #9 Disable/enable scenes - Emile, I'd LOVE to have the option to enable/disable scene's. I'm extensively using VeraEdge at the moment in some real live test-cases (project 'automate EVERYTHING in my house possible'), and really missing the ability the enable/disable scene's easily. I have to delete them to get them to stop working. This really breaks experimenting, and causes LOADS of work. For Homey/you I think it's quite easy (your own words) to add this, it would be clear/intuitively, and also give you an edge for competition.

    ((For future features you could even think of enabling/disabling scenes from within other scenes as an action. Also really intuitively and possibly helpful, but be warned, I don't see a use-case for this and maybe this is confusing means and purpose (middel en doel verwisselen) from my side. 2cts))

    #10 Hide/show devices - In VeraEdge LOADS of devices get added that you seldomly use. In VeraEdge you may put them in one zone, collapse the zone, and thus hiding those Devices (e.g. the battery state devices). How are you solving the problem of cluttering the system with devices?
  • EmileEmile Administrator, Athom
    @rvdm, we'll add intents wherever it's possible. But for real Tasker support, don't expect it at launch. It's not something many people use, so it's hard to put effort into.

    You can always use Tasker with the Homey API though!

    @Athomey,

    #8 interesting use case, however really uncommon. I'll think about this and see what would be the best solution. Right now, you'd select a device on the trigger card 'turns on', but maybe this could be a wildcard, and use the logical condition block to do your or logic.

    #9 that's already implemented ;)

    #10 that depends on where you'll view the devices. In the zone+devices configurator, you'll always see all of them. In the flow editor, only enabled devices are displayed, and can be searched for in an autocomplete style.
  • So if I understand this correct there is a block in homey where you can put java script codes inside for more advanced scenes ?
  • EmileEmile Administrator, Athom
    Nope, there is not. There is a logic block however which allows for boolean comparison (==,! =, <, >)
  • @JaapPelt, you can not save variables in this way using the Flow Editor. For these kind of scenarios I really suggest to program it in JavaScript. It's almost as easy and allows for unlimited flexibility.

    The flow editor works like this:

    when: { something happened }
    and: { this is true, this is true as well, this is not true, this is true }
    then: { do this, and do this, and do this }

    The 'when' exposes tags, so for example "When someone has entered the house", a tag 'Who' would contain the person who just entered. You can then use this tag in the 'and' and 'then' columns. For example:

    when: { Someone entered the house }(who: dave)
    and: { (who) equals 'dave' }
    then: { say: Hi, (who)! }

    Does that make sense? :)
    So how would you make this. is it like a separate app you add to homey or how ? im no a pro programmer so just want to know where you would put a javascript.
  • EmileEmile Administrator, Athom
    We'll have a tutorial on how to make an app for Homey. It's pretty easy and straightforward!
  • I love the idea to enable/ disable scenes. Would it be possible to use switches for this?

    For example: when stuff and not away do things.
    Away is a (virtual) switch.
  • EmileEmile Administrator, Athom
    Away is a condition, so that would work, yeah.
  • What kind of modes/conditions do exist? Vera supports four fixed ones: Home | Away | Night | Vacation. For those modes you can control which scenario's/devices/etc. are enabled/disabled?
  • EmileEmile Administrator, Athom
    That's configurable by yourself. By default, we supply Home and Away
  • So Homey will be (semi) intelligent, and autonomously react on events in the environment to do stuff for you. Some thoughts:
    - if Homey does something (you did not want), you want to ask it Why?
    Thats the starting point for be
  • Hm. Something ate part of my comment.

    You should be ask Homey: Why. It should explain. Then you can tweak the rule, configuratio, whatever
  • Emile, is it possible to switch mode/condition (like home/away) from within a scene? That would make it powerfull to use any kind of signaling to switch modes. Proximity sensors, RFID scanning, smart camera which recognizes people?
  • EmileEmile Administrator, Athom
    Yup, that's possible :-)
This discussion has been closed.