Rule Machine is no longer available.
thanks I think you still need parends
how would you do
(a or b) and c
two separate rules I suppose
a and c
b and c
This is cool!! Great job!
One suggestion. This would be great as a parent/child relational smartapp.
But seriously dude, good work!
Nicely done, BruceâŠThis is awesome use of smart app.
That would be a single rule, just as you wrote: (a OR b) AND c. You would just define conditions a, b, and c, and then define the rule as you wrote it.
The app does allow parenthesized sub-rules to any depth.
Outstanding work @bravenel!
Top notch, Bruce! Canât wait to try this out.
Bruce, quick question, not sure if itâs just me, but submitOnChange for howMany doesnât seem to do its job. If I input a number, it doesnât refresh to display the âsub-sectionsâ. Not sure how to get around it, thoughâŠIf I click âdoneâ, I get the ânot authorizedâ error, but then if I go back in the âSelect Conditions,â the howMany sub-sections are displayedâŠ
Thatâs weird! It works fine for me. It should throw up the number of conditions you specify. Which mobile app are you using? Iâm testing on iOS, and I donât have an Android to test on.
Turn on Live Logging and see if itâs throwing an error.
Ah, thatâs the problem. Things are different between platforms. I ran into this several of times lately, where code works smooth on IOS but fails on AndroidâŠ
I didâŠ:
error:
java.lang.NullPointerException: Cannot get property âvalueâ on null object @ line 466
Line 466
if(thisCapab.value == âTime of dayâ) result = "Time between " + timeIntervalLabel()
It would throw that error if you didnât define any Conditions, which you couldnât do if you didnât have the fields to input conditions into.
If you canât get past the Number of Conditions input, my suggestion would be to uninstall that instance of the app, and try again. If that still fails, then we need to understand why Android canât process submitOnChange properly.
@slagle, have you seen this before? This being Android mobile app not handling submitOnChange: true
?
Yup, did it several times. It gets even worse if you try to modify the number of conditions. I tried to change from 2 to 3 and the app got stuck running circles. The only way to delete it was to go in IDEâŠ
So, it would appear that this doesnât work at all on Android? Very odd, and disappointing. The app is totally dependent on submitOnChange: true
working, because everything it does is dynamically built, especially the rule itself. The app uses recursion both to build the rule and to evaluate it.
No, no, it works! But not as smooth, so people may assume it doesnât, if they are greeted with errors
Did you get the input fields for the Conditions?
Very nice!
Just in case anyone stumbles on this and hasnât used custom code in SmartThings before, hereâs the FAQ for how you go about installing something like this to your own account:
Submit on change should work on android. This would be new if it doesnât
Iâm seeing this behavior on Android as well, but it can be worked around by deleting/recreating the rules. Sub-optimal, but doable at this point.
Great stuff @bravenel! Now, my only other feature request would be âtimer conditionsâ, so that I could replace some of the Smart Lighting app conditions for âwait x minutes after motion stopsâ before firing the lights off rule.
Thanks for doing this app - it getâs closer to what I want to do with my system, and seems to be more stable in execution than some of the stock apps right now.