[Beta] Flow Engine - A visual drag and drop rules engine

,

I went back to trying variables now that that rest seems to be working. I created stringTest with value "ABC". I wanted to create a trigger where stringTest = "XYZ" but I can't figure out how to make a variable the trigger. When I select Variable in the Node Editor nothing appears in the Attribute dropdown where I expected to be able to pick stringTest. I also can't figure out how to test a flow using the variable stringTest.

I also can't figure out how to use a variable in a Notification node. I tried these, but it didn't work.


Can you please set up a flow where the trigger will be variable named "stringTest" = "ABC" and a second flow with a Notification where it will say stringTest = (whatever stringTest was set to) {variableValue}

In looking a bit more at the Cmd+Left Click issue this morning I'm thinking the issue may be that I can't Cmd+Left Click on a Set Variable node or a Notification node.

I thought I had to Export a variable to create it. When it didn't show up in the dropdown I tried to Import it, but got this error, File does not contain an array:

I also tried to create a local variable called varTest_Numeric, and it seems to be there, but again, I can't set it as a Trigger as nothing shows up in the Attribute dropdown when I edit the Trigger node and pick Variable as the type:

Ver. 1.0.037 is out - 'Repair'

Using .037
Can you please give us a brief summary of what has changed with each iteration so we know if an issue we have has been addressed, or if something else was changed so we can test that.

I'm still very confused about variables. I wanted to create a local variable, not a global one, so I didn't click on the Export button as it appears in the Global Variable Options section (I think, but I'm not 100% sure as there is a divider between "Global Variable Options" and the Export and Import buttons.). However, there is also no "Save" button for a local variable, and the "normal" Save button didn't turn red. Nevertheless, I tried clicking the Save button, but the Variable Inspector says No variables Set and the variable isn't in the Variables section. When I click on the Show Flow Vars it also shows nothing. When I click that button again (which now says Show Global Vars, my variable named VarTestFlow_Str reappears.

I then clicked the Export button and the Save button did turn red. When I clicked it, it turned green again. I now went to edit the Trigger node. So I see you did make "Attribute" say "Variable Name", so thank you for that, but my variable isn't there. Although it didn't make sense for me to have to import it to this flow, since it was created while I was in this flow, I clicked the Import button and picked my current flow. When I then clicked the Import button from the Pick-a-Flow combobox I got the error message that the File does not contain an array.

So I'd very much appreciate if you could walk us through on how to create a local variable and then use it for a trigger.

I also went to edit the Notification node again, but I don't see a drop down that would let us select the variable that would be used for {variableName} or {variableValue} as set forth in the Wildcards section.

And it is also saying there are no local variables:

ver. 1.0.038 is out.

  • Revamp of Variables
  • Cosmetic stuff
  • See post #2 on Variable how-to

'Repair'

Error Occurred During Installation

An error occurred while installing the package: Failed to upgrade app
bptworld/Hubitat/master/apps/FlowEngine/flowengine_one.groovy

Please notify the package developer.. Be sure the package is not in use with devices.

I'm going to hold off until I see @WarlockWeary is OK

Had the Editor code uploaded in the App codes space. :grin:

Should be good to go

I made sure FE Editor ("FEE") was closed, went to HPM and did a Repair and when I use my bookmark to go back into the FEE it still says .037

sorry, try again

I've always had dilemmas with the label for a toggle button. I like how you made the label Activated/Deactivated to let us know which one it is currently (as opposed to the more traditional one of naming them what they would become i.e, Deactivate/Activate). However, you did the opposite of that for the Show Flow Vars/Show Global Vars. Yes, reading it should have been a tip off (literacy is a gift) but I'd like to see those 2 toggles act the same way. As such, I would ask that you change the 2nd toggle to Showing Flow Vars and Showing Global Vars (and I would make Flow vars the default).

Going to do a Repair now to go to .038

In .038 I created a Flow Var:

I am sure it is a Flow var as the main Save button turned red and then green when I saved it and there was no Export/Import like when I tried to do a global variable.

However, when I tried to edit the Trigger nothing is in the Variable Name dropdown:

I thought maybe I needed to refresh the page and when I did and clicked Show Flow Vars it says there aren't any:

I wanted to be sure the issue wasn't that I was using an underscore so I tried it again.

Entered new variable named "varTestString" with value "ABC", pre-Saved:

Now saved:

Edited Trigger node but varTestString isn't in the Variable Name dropdown (it just says "(none)")

And when I closed the tab and then go back into the FEE it says there are no variables. So it seems the variable isn't getting saved.

Much more minor thing, but I still can't Cmd+Left Click on the Set Variable node or the Notification node to do a multi-select.

The local var thing is kicking my butt, probably going to go dark for a few days and knock this thing out. :eyes:

OK. Thanks for the heads up. Good luck.

Let's see what happens... ver. 1.0.0.40

  • complete rewrite of the way variables are handled
  • tons of under the hood changes
  • more cosmetic changes
  • ctrl-click can still act up but I'll keep working on it
  • Sunset/Sunrise are still kicking my butt - other time features are working great though

Good luck!

Don't ya just love seeing an error as soon as you release something!

ver. 10.0.041 - fix for Modes

'Repair'

On .041.

First time I tried to load my variable flow I got this message:

Then this:

I clicked OK and then clicked the Save button and then it seemed to be OK. I didn't have that come up with any of my other flows.

However, I don't know how to test a var as trigger.
Here is the flow where I tried strVar = "ABC", I also tried strVar = ABC as well as just ABC and "ABC":

I also still don't know how to use a variable in a notification. The example isn't really helpful. It refers to the "Selected variable name" or "Selected variable value" but I don't know how to select the variable that they are supposed to refer to.

This is what I'm putting into the notification:

I'm not sure what issues you are having with Sunrise/Sunset, but at least for my time test where the trigger is that it is after Sunset works when I tried 21:00 and failed the trigger (correctly) when I tried 3:00.

I also made it more complex in that if it did turn on it was to pause for 1 second (1000 milliseconds) and then turn off if it was >= Sunset. It passed that too. However, I noticed the Delay node was not showing the value it was set to. It only says "Delay".

Another I'm trying to figure out the problems I'm having Cmd+Left Click and the Ctrl+Left to select multiple nodes. I think the Cmd+Left Click is having problems if there are 2 Trigger nodes. I can't quite figure out exactly what I'm doing, or not doing, that seems to cause some issues with the Ctrl-Left Click and/or the Cmd+Left Click so I can't give you any more insight on that right now. Naturally, I'll report back here if I can figure out how to repeatedly make it fail.

I also have something strange going on with one flow in that it isn't showing the device status:

Even though one that is identical, but just with a different device is:

But once I edited and picked the Desk Lamp again it started to work fine.

So I'm just wondering that between my time flow saying it wasn't found (and that was the first one I tried to load in .041) and this one not having the status, did something corrupt the JSONs?

Perfect!

See post #2.

It uses the one used in the Flow.

Testing works fine, actual doesn't trigger

Nope, there are checks when the flow is loaded and again when the flow is saved.

Why would that be correct? I didn't get that with any other flow.