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

Separate the devices from the flows

I think that the devices should be separated from the flows.

I had a switch broken and had to replace it with another one.
After the replacement and adding the switch to the devices i had to make every flow i made for the old, broken switch over again for the new switch. This is because the flow can't replace the device.

If you however make a flow with a device-ID and then connect the switch to that device-ID then you could use this flow with any other switch with the same attributes.

For example:
Flow: IF -> "Something was said"  And "Text contains" "Lights On" THEN SwitchA01 -> "Turn On"

At this point SwitchA01 is not connected to any device but we can now connect a switch-device to this SwitchA01.
Like: Connect "Lightswitch Livingroom" to "SwitchA01"
When this "Lightswitch Livingroom" breaks and has to be replaced, then the new one can take it's place by connecting this device to "SwitchA01".

This would save a lot of time and work because you can reuse the existing flow. Also are the flows exchangeable so people can share their flows with others.

Hendrie

Comments

  • +1

    I totally agree. But that might have a huge impact on the existing architecture and existing flow.
    Maybe a global replace of a device is an acceptable trade-off? (Replace device x with device y)
  • You are thinking as a developer / geek. Why not just have a real option to replace an device. Click on the settings of an device and click 'replace'. Ofcourse replacing the device should only be possible with the same device type. I think that this is a great feature. 

    Maybe you can create a github issue: https://github.com/athombv/homey/issues fort his. 
  • undergroundunderground Member
    edited December 2016


    Maybe you can create a github issue: https://github.com/athombv/homey/issues fort his. 
    There are 2 options:
    1. People of Athom are not following this forum
    2. People of Athom are following this forum.

    I hope it is the second, but in both caes, I am not their secretary maintaining their issue list.
    (Maybe you read some irritation whithin this post. I don't see Athom participating much. We can think of improvements, but why should we? Why even bother when Athom seems abcent? Why did I even reply to the topic starter in the first place? Hell, I think I will only leach this forum instead from now on. ....me getting more and more irritated by the loud abcense of Athom on this forum)
  • jjtbsomhorstjjtbsomhorst Member
    edited December 2016


    Maybe you can create a github issue: https://github.com/athombv/homey/issues fort his. 
    There are 2 options:
    1. People of Athom are not following this forum
    2. People of Athom are following this forum.

    I hope it is the second, but in both caes, I am not their secretary maintaining their issue list.
    (Maybe you read some irritation whithin this post. I don't see Athom participating much. We can think of improvements, but why should we? Why even bother when Athom seems abcent? Why did I even reply to the topic starter in the first place? Hell, I think I will only leach this forum instead from now on. ....me getting more and more irritated by the loud abcense of Athom on this forum)
    I don't really know why you are reacting like this on a thread like this? You are not their secretary, nobody said this, but what you can do is add a request on that list to implement a certain feature. As you already have encountered they are not actively monitoring their forum. Which is a shame. But on the other hand they do work on their issue lists... 
  • Hell, I think I will only leach this forum instead from now on. ....me getting more and more irritated by the loud abcense of Athom on this forum)
    Thanks
  • @KoenMartens ;
    Always so friendly and open for others  <3

    @underground please share your concerns and the issues you encounter with homey. Else others (especially @Athom, @Emile, @JeroenVollenbrock) ;can learn from there customers. 
  • MHubert said:
    @KoenMartens ;
    Always so friendly and open for others  <3

    @underground please share your concerns and the issues you encounter with homey. Else others (especially @Athom, @Emile, @JeroenVollenbrock) ;can learn from there customers. 
    Well, let me put it in another way. I have had help from others on this forum. So, I think it is fair if I can help someone, I would do that.
    But as far as other stuff like suggesting something that concerns the core of Athom, I would not participate any more. It seems really silly talking about it whilst the ones who really can do something about it are not present. That doesn't make sense at all. E.g. I stated somewhere that you really need a backup of all devices and flows in case you need a factory reset. But what use does this statement has when nobody at Athom participates?
    And asking to add it to their github issue list? Come on! If they really are interested in our opinion, they would participate and if they want, they can add issues themselfs. Thats why I said that I am not their secretary. If they like the idea, they can add it to the issue list themselfs.
  • @underground you're welcome to join the discussion on slack. That's also where Emile and Jeroen pop up. You can also pm them personally there. 
  • mruiter said:
    @underground you're welcome to join the discussion on slack. That's also where Emile and Jeroen pop up. You can also pm them personally there. 
    Thanks. I have been on slack, but I don't like that IRC stuff. I prefer a forum like this and is really public and organized.
  • You are thinking as a developer / geek. Why not just have a real option to replace an device. Click on the settings of an device and click 'replace'. Ofcourse replacing the device should only be possible with the same device type. I think that this is a great feature. 

    Maybe you can create a github issue: https://github.com/athombv/homey/issues fort his. 
    There's issue 899 already for updating a device.

  • I have already separated my devices from my flows, by defining a ttrigger and action flow for each trigger or action. This way I can have multiple triggers for one action. For example, a trigger based on time of day to switch on a lamp. Or a trigger based on a zwave button to do the same. If my lamp breaks, I fix it in the action flow, and both trigger flows work just fine as they are bound to the flow and not to the device. I think this has been one of the best improvements in recent releases.
  • woei said:
    I have already separated my devices from my flows, by defining a ttrigger and action flow for each trigger or action. This way I can have multiple triggers for one action. For example, a trigger based on time of day to switch on a lamp. Or a trigger based on a zwave button to do the same. If my lamp breaks, I fix it in the action flow, and both trigger flows work just fine as they are bound to the flow and not to the device. I think this has been one of the best improvements in recent releases.
    i do the same but in my case i do it with Better logic. 
  • woei said:
    I have already separated my devices from my flows, by defining a ttrigger and action flow for each trigger or action. This way I can have multiple triggers for one action. For example, a trigger based on time of day to switch on a lamp. Or a trigger based on a zwave button to do the same. If my lamp breaks, I fix it in the action flow, and both trigger flows work just fine as they are bound to the flow and not to the device. I think this has been one of the best improvements in recent releases.
    The way i read this means that you still have to rewrite the flow when you have to replace a device like a switch. Or am i reading this wrong?
  • hen3bosch said:
    woei said:
    I have already separated my devices from my flows, by defining a ttrigger and action flow for each trigger or action. This way I can have multiple triggers for one action. For example, a trigger based on time of day to switch on a lamp. Or a trigger based on a zwave button to do the same. If my lamp breaks, I fix it in the action flow, and both trigger flows work just fine as they are bound to the flow and not to the device. I think this has been one of the best improvements in recent releases.
    The way i read this means that you still have to rewrite the flow when you have to replace a device like a switch. Or am i reading this wrong?
    You are correct, but you only have to fix it in a single flow, rather than "all flows that do something with device x".
  • woei said:
    hen3bosch said:
    woei said:
    I have already separated my devices from my flows, by defining a ttrigger and action flow for each trigger or action. This way I can have multiple triggers for one action. For example, a trigger based on time of day to switch on a lamp. Or a trigger based on a zwave button to do the same. If my lamp breaks, I fix it in the action flow, and both trigger flows work just fine as they are bound to the flow and not to the device. I think this has been one of the best improvements in recent releases.
    The way i read this means that you still have to rewrite the flow when you have to replace a device like a switch. Or am i reading this wrong?
    You are correct, but you only have to fix it in a single flow, rather than "all flows that do something with device x".
    Could you post a screenshot of this setup? I'm wondering what you are using as trigger in the action flows. The action flows, from what i understand, contains the logic to enable / disable a device and the trigger flow containst he actual trigger (time, date, speech etc ) to trigger that 2nd flow?
  • I have an example of this, but not for devices, but for output (Speech, Push Messaging...)


    In the first flow 1 set some variables to say something and to push a message.

    In the second I react on the changed variable to say something.

    I can reuse this in any flow I want, eg, when I want to change the color when something is said, I only have to change it in this flow.

    Also for push messages, when I want to change the push service that I use, I just change it in this one flow.

  • So I have trigger and action flows:


    For example when doorbell is pressed, I trigger multiple action flows:



    Example action flow:



    There are multiple triggers that might turn on a lamp or close the blinds or whatever, but I never have both the trigger and the action in one flow. Because then if I have 2 triggers and set up the 2 flows with light on for example, and I want it to change color as well, I need to go in and change both flows, in stead of only the action flow. I hope this clarifies. 
  • hen3bosch said:
    I think that the devices should be separated from the flows.

    I had a switch broken and had to replace it with another one.
    After the replacement and adding the switch to the devices i had to make every flow i made for the old, broken switch over again for the new switch. This is because the flow can't replace the device.

    If you however make a flow with a device-ID and then connect the switch to that device-ID then you could use this flow with any other switch with the same attributes.

    For example:
    Flow: IF -> "Something was said"  And "Text contains" "Lights On" THEN SwitchA01 -> "Turn On"

    At this point SwitchA01 is not connected to any device but we can now connect a switch-device to this SwitchA01.
    Like: Connect "Lightswitch Livingroom" to "SwitchA01"
    When this "Lightswitch Livingroom" breaks and has to be replaced, then the new one can take it's place by connecting this device to "SwitchA01".

    This would save a lot of time and work because you can reuse the existing flow. Also are the flows exchangeable so people can share their flows with others.

    Hendrie
    I agree. 
    I only use zwave and am not familiar with other devices if they also have a node-id.
    Or is that what you mean with device id? 
  • Gast said:
    hen3bosch said:
    I think that the devices should be separated from the flows.

    I had a switch broken and had to replace it with another one.
    After the replacement and adding the switch to the devices i had to make every flow i made for the old, broken switch over again for the new switch. This is because the flow can't replace the device.

    If you however make a flow with a device-ID and then connect the switch to that device-ID then you could use this flow with any other switch with the same attributes.

    For example:
    Flow: IF -> "Something was said"  And "Text contains" "Lights On" THEN SwitchA01 -> "Turn On"

    At this point SwitchA01 is not connected to any device but we can now connect a switch-device to this SwitchA01.
    Like: Connect "Lightswitch Livingroom" to "SwitchA01"
    When this "Lightswitch Livingroom" breaks and has to be replaced, then the new one can take it's place by connecting this device to "SwitchA01".

    This would save a lot of time and work because you can reuse the existing flow. Also are the flows exchangeable so people can share their flows with others.

    Hendrie
    I agree. 
    I only use zwave and am not familiar with other devices if they also have a node-id.
    Or is that what you mean with device id? 
    No, what i meant with device-ID was a software related ID for the flow on which one can connect a hardware device.
  • hen3boschhen3bosch Member
    edited December 2016
    woei said:
    So I have trigger and action flows:

    For example when doorbell is pressed, I trigger multiple action flows:



    There are multiple triggers that might turn on a lamp or close the blinds or whatever, but I never have both the trigger and the action in one flow. Because then if I have 2 triggers and set up the 2 flows with light on for example, and I want it to change color as well, I need to go in and change both flows, in stead of only the action flow. I hope this clarifies. 
    Here you have 2 flows with "Ganglamp", maybe you have more... When the "Ganglamp"-switch breaks and you have to replace it with another switch then you have to redo every flow that contains "Ganglamp".
    Am i right?

    I would like to prevent that...

    (Still... i like the way you are doing things! :smiley:)

    edit: BTW; could you show the flow "Ganglamp aan"?
  • With the example of Woei, you only have to make 2 flows per device (if it is a device that has just 2 options, like on/off or up/down). So you only have to repair 2 flows if you replace the device. But some devices have a lot more options like Hue lights (dim level, flash, color, etc). In that case you must make more flows

    But an other advantage is that it is simpeler to use multiple triggers for the same flow.

    I want to reorder my flows the same way, I'm just not sure if I do it like Woei or like Glijie with Better Logic variables.
  • The action flow shown is Ganglamp aan. I do indeed have 2 flows with Ganglamp and indeed I would have to fix both flows when I need to replace my Ganglamp. But i believe this is still fairly manageable and quite clear where the devices are in use as well. We are talking about a cornercase scenario when something fails or needs replacing. I understand that with all the updates we have had to re add devices quite a few times which was a hassle, but I haven't experienced this much lately.
This discussion has been closed.