Iris Pusbutton Webcore vs Rule machine


#1

I have added a Hubitat Hub in my shop which has mostly Iris V1 devices. I have been using something else but its development is moving to slow so I have started to move over to Hubitat.

I wanted to try and use Rule Machine as much as possible as that runs locally as I understand it. So I have a relatively simple task of wanting to have a Iris V1 pusbutton turn on a bank of 5 switches. These 5 switches turn on several banks of lights on my shop floor.

I got it to work but it does it too quickly, at least that is what seems to be happening. I press the button and it will fly through the 5 switches but about every other push one of the switches will not get toggled. Then they are out of sync. I see no way to slow it down and I would like to check the status of the lights and if only one or two banks are on then I don’t want it to toggle I want it to turn them off. So I I decided I needed to move to Webcore.

My problem here is I have the Push button added but when I select the push button attribute I only get one trigger ‘gets’ but the only value I can assign to it is an integer. See below. I will not be able to test it until tomorrow and sorry if there is a thread somewhere about this, but I couldn’t find it if there was. Does 1 mean one push?

Should I use string variable set to ‘pushed’ and compare to that?


#2

Do note that webCoRE on HE runs locally on HE…

  • there is a lot of mis-information on webCoRE on HE, such as webCoRE causes crashes (proven to not be true) or rule machine is faster (no data ever presented to prove this claim in last 6+ months, and webCoRE is the only app that provides tracing information)

Hubitat buttons work slightly differently than smart things.

the attributes are pushed, held, etc, and the value is which button was pushed.

You can see the attribute values your device provides by looking at the device handler ‘events’ for the device in question as you push or hold different buttons.

See specifically the section

  • Buttons operate differently in HE than ST, so when importing pistons from ST, these portions will need to be adjusted to the HE button devices and attributes.
    • Hubitat’s button implementation
      • This is a simple edit to use holdablebutton, pushablebutton as the attribute vs. button after import.
    • Some users have found they needed to recreate the if statement for a button if ST import brought in a device subIndex.

#3

Okay so that is the button that is pushed so since these are a one button device I should be good.


#4

This was about to drive me crazy. I spent way to long on getting this to work. I was just about to report there was a problem with Webcore or Hubitat. My piston would work whenever the lights were all on or off, but if I manually turned one or more banks off, the lights would toggle state. I had gone through I don’t how many logs and had come to the conclusion that Hubitat was saying it wasn’t changing the light but it was.

It finally dawned on me that I had forgotten my quick try with Rule machine. Webcore was turning things off and on but then my rule machine action would trigger and screw things up.


#5

So im trying to understand this… I have a samsung pushbutton. The driver shows push,hold,doubletap. Ive read over the documentation previously mentioned. It leads me to believe that all thee buttons equate to 1. If I go to the device dasboard and pres it there I see 1 as a result in current state. I also see I can paste a value of 2 for held and press it in the dashboard and it produces 2.

NOW MY PROBLEM. Im trying to configure my button in webcore to be held to activate code. It WC code is set for “button gets 2” and I press the hold in dashboard nothing happens(expected). If I set button held as a value 2 in dashboard and it works.(expected). So one would deduce that if WC is set to “button gets 1” and I press hold in the dashboard with no value, it should work as it results as a 1 in the dashboard current state. But it doesnt. So what am I missing?


#6

The code in webCoRE on HE will say

if button’s pushed gets 1
then do stuff

If button’s held gets 1
the do stuff

so button is the device, held, pushed, doubleTapped are the attribute, and the value of the attribute is the specific button that someone pushed, held, etc for the button device

if you import from ST, you may need to recreate the if statement to ensure it is written/saved correctly by webCoRE.


#7

yes, I finally figured it out. Thanks for the follow up.