- Allow two sets of actions after a logicblock: Positive and Negative (IF… THEN… ELSE)
- Allow more complex logic operators for conditions (for example, NOT operator)
- Update a variable from a logicblock
- Invoke a logicblock from a logicblock
- Allow Smart Life actions to switch on/off a specific switch within a device (conditions allow selecting the switch, actions do not allow selecting the switch)
- Allow longer names for variables, conditions, logicblocks, etc. for clarity purposes
- Allow adding a custom description text to an element (variable, logicblock, etc.)
- New type of variable (date) and conditions (comparing two variable dates, comparing NOW vs. variable date)
- See historical values of variables for debug purposes
Hello @teknofilo
These sound great, I think some of them we already support, so we might be able to help improve your home logic already!:
Allow two sets of actions after a logicblock: Positive and Negative (IF… THEN… ELSE)
We currently support this: you will see in your Logicblock that you have the positive and negative action chains. When the Logicblock is evaluated, the condition (or conditions involved) are checked and if the result is true, then the positive chain of actions is executed. If the result is false, then the negative chain of actions is executed.
Allow more complex logic operators for conditions (for example, NOT operator)
This is currently not in the complex conditions as it is very easy to setup the opposite condition to the one you currently have. If you need to use the condition twice I agree is not very elegant to have to duplicate them, but definitely you can get around this with a second condition that matches the other one but is true when the variable is false for example.
Update a variable from a logicblock
Yes, this is a big request I’m analysing the ideas at the moment, so it would be really helpful if you could share your specific use today: can you give me an example where you are updating a variable in a Logicblock (going through IFTTT today, of course)
Invoke a logicblock from a logicblock
Please if you can, add your example for this case to this thread as well:
Allow Smart Life actions to switch on/off a specific switch within a device (conditions allow selecting the switch, actions do not allow selecting the switch)
Thanks for raising! Yes, this is indeed something that we’ll look into a bit further, we’ll keep you posted. Some devices also don’t allow specific actions, it depends on how the hardware vendor has done their integration with Tuya, so we have already found cases where devices could not be controlled properly simply because the vendor didn’t have the actions enabled.
Allow longer names for variables, conditions, logicblocks, etc. for clarity purposes
I think this request complements the next one beautifully: I think a little description would help keep variable names smaller actually Would you agree?
Allow adding a custom description text to an element (variable, logicblock, etc.)
I like this idea We just need to convince @DanT and @pebneter
New type of variable (date) and conditions (comparing two variable dates, comparing NOW vs. variable date)
Could you give me an example of how you would use this? You can create time conditions in Apilio already, and they will only be true at the specific time you have setup.
Have a look here:
And maybe here:
See historical values of variables for debug purposes
Have you tried downloading your logs as a CSV? You can then filter out any data that you are not interested in to have a look at the events that have changed it.
We do have some ideas to keep improving logs, so thanks for mentioning this. Let me know if you give the CSV download a go and if it helps you with the debuggin!
Let me know if I understood all the features correctly, thanks so much! This is fantastic feedback
Love this @teknofilo, it’s very clear we need to do more, faster! Thanks so much for the feedback.
With regards to being able to update a variable from a Logicblock, I have a complex use case.
I would like to trigger an action (open the garage gate) when I am very close to my house. I am thinking about an Apilio variable that keeps the zone where you are:
- Zone 1: <100 m from home
- Zone 2: <1000 m from home
- Zone 3: >1000 m from home
I would like the action “open garage gate” to be triggered only when I move from Zone 3 to Zone 2, and then from Zone 2 to Zone 1 (Z3 -> Z2 -> Z1). … other combinations (like going out for a walk, Z1 -> Z2 -> Z1) should not trigger the action.
in order to do that I would set up 2 geofences with IFTTT (100m and 1000m) and update variables in Apilio (numeric variable CurrentZone and boolean ComingHome) depending on logicblock evaluations taking into consideration how I move between zones.
@Anna, another use case for a LB being able to update a variable: I want to create an automation for my robot vacuum I can say “Alexa, clean the house today when I leave home”.
That phrase would trigger an IFTTT routine that would set a boolean variable (CleanHouseWhenAway) to “True”.
Once I leave home, another IFTTT routine would trigger a Logicblock that would check if CleanHouseWhenAway is TRUE. If so, that logicblock would set the variable to FALSE and trigger an IFTTT routine to clean the house.
For example, let’s say I want to vacuum robot to clean the house once a day when I leave home (but not twice a day if I leave home twice during the same day). I would create an IFTTT routine that, when I leave home, updates an Apilio “date” variable (“LastTimeCleaningTookPlace”) with current date/time.
If current date/time > (LastTimeCleaningTookPace + 24 hours), then the Logicblock would ask the robot to clean (via IFTTT). Otherwise, it would not do anything because cleaning already took place.
Yes, but you need to review the full log. It would be easier if you open a variable and see a history:
- 2/26/21 13:45 Variable was updated from false to true by IFTTT
- 2/26/21 13:40 Variable was updated from true to false by IFTTT
- 2/26/21 13:34 Variable was updated from false to true by IFTTT
- 2/26/21 13:25 Variable was updated from true to false by IFTTT
Yes, you are right… I am stupid
Interesting idea, thanks for sharing!!
I would probably implement this by using a boolean that gets set to false every day at midnight or something like this. Once the vacuum robot has cleaned the house, set the boolean to true, and check this boolean as part of your conditions to decide if it’s the right situation to run the robot vacuum cleaner.
Doing a 24h reset of the variable will achieve the same operation you describe
Yes, we like this idea too!! We have some ideas to help with this analysis, still working on all the details
Awesome inputs - thanks! Looks like you got a copy of our backlog .
I think you should be able to tick most of them off before summer arrives!
stupid is a bit strong, that’s normally reserved for me!
I think the garage-open scenario with two different zones should be possible with a good location tracking app and a timeout restriction.
There would be a condition “zone_2_entered_recently” that is updated to “true” when you enter it. Then you apply a timeout restriction that is a bit more then the duration you typically need to reach home from the moment you entered Zone 2. So if time to drive is 20 minutes, maybe set the timeout to 30 minutes.
The effect would be that “zone_2_entered_recently” is only true if it was updated 30 minutes ago max. So if you stay longer in Zone 2, it would not be true if you come close to your home again.
I finally implemented it with variables which are updated via IFTTT, which is not very clean and makes it difficult to debug.
I like your approach (timeout) as well, although I’d rather implement it with variables being updated from logicblocks to avoid, for example, the scenario you described (staying longer than the timeout period in Zone 2).
This is now solved You’ll find your variable events in the variable “show” view, the event log here is only showing the events relevant to the variable
These two can be supported now with the new Webhook actions: add a webhook action to your Logicblock that calls the webhook URL or a variable, to update it, or the URL of a Logicblock evaluation to launch it This will definitely save a few trips to IFTTT!