asbril Posted August 6, 2021 Posted August 6, 2021 (edited) Can ISY programs be controlled (Run Then or Run Else) in Home Assistant ? I now added this to my UD Mobile, but as I work more on my computer (browser) than on my Iphone, it would be useful for me if I could control my ISY Programs in HA. Edited August 6, 2021 by asbril
MrBill Posted August 6, 2021 Posted August 6, 2021 2 minutes ago, asbril said: Can ISY programs be controlled (Run Then or Run Else) in Home Assistant ? I now added this to my UD Mobile, but as I work more on my computer (browser) than on my Iphone, it would be useful for me if I could control my ISY Programs in HA. Yes you can. Here's one example using the GUI: Then run_else when a button is tapped, if the same button is long pressed (or held) it runs run_then instead. and the same thing in YAML: type: button name: Barn OHD entity: binary_sensor.barn_ohd icon: mdi:garage tap_action: action: call-service service: isy994.send_program_command service_data: command: run_else name: BarnOHD.reset isy: ISY target: {} hold_action: action: call-service confirmation: text: Are you sure you want to reset counters? service: isy994.send_program_command service_data: command: run_then name: BarnOHD.reset isy: ISY target: {} 1
asbril Posted August 6, 2021 Author Posted August 6, 2021 Thanks MrBill, as you know I am not very tech savy. When you a minute, can you tell me how to do this in HA step-by-step ?
MrBill Posted August 6, 2021 Posted August 6, 2021 (edited) I hoped showing the UI picture would get you there. from any dashboard: three dots upper right > Edit dashboard Add Card Assuming you're wanting more than one let's choose "Grid" then pick Button On the "Entity (optional)" line click the X to remove whatever it put there. Type a name for the button in the Name line, doesn't need to match to anything on ISY Make an Icon If you want one, putting "mdi:check" will give you a simple check mark. the Default "Tap Action" is Toggle, change that to "Call Service". In the "Service" blank type "isy994.send_p" when you get that far there will only be one entry left showing click it... "isy994.send_program_command" is the full name but the blank isn't large enough to see all that. Put a Checkmark next to "Name" and a blank will appear below for the ISY program name, Type the name of the program in that blank space. NOTE: the program name MUST BE unique, that is you can't have another program with the exact same name in another program folder on the ISY.. Case counts. "Command" is a dropdown where you can choose 8 options that will be familiar. Note: "Run (if)" is just Run you don't have multiple ISY's so just leave the last item blank. Now you might be ready to save. OR you could scroll back up, and fill out the Hold_Action column by going back to step 8 and repeating it for that column. In my example in the previous post up above. a simple tap of the button did a run_else, and holding the button or "long press" did a run_then. Then I edited the YAML manually and added confirmation: "Are you sure you want to reset the counters". Now that you've read the step-by-step reading the YAML should look familliar... I put the manual edit in BOLD. type: button name: Barn OHD entity: binary_sensor.barn_ohd icon: mdi:garage tap_action: action: call-service service: isy994.send_program_command service_data: command: run_else name: BarnOHD.reset isy: ISY target: {} hold_action: action: call-service confirmation: text: Are you sure you want to reset counters? service: isy994.send_program_command service_data: command: run_then name: BarnOHD.reset isy: ISY target: {} The reason mine has an "entity" listed where in step 5 I said to erase it, is because the listed entity is actually a door sensor, which will cause the Icon to show if the listed entity is on or off. If you're curious what this example actually does.... the whole grid of buttons looks like the image below, with instructions tap to get the counts (else), and long press to reset them (then). and because we added the confirmation to the YAML manually a long press will yield: before the program actually runs. EDIT to add: here is the ISY program controlled: BarnOHD.reset - [ID 01A1][Parent 01B5][Not Enabled] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Resource 'NotificationNS.DoorTrouble._resetCountersBegin' Wait 1 second Resource 'NotificationNS.DoorTrouble.BarnOHD' Wait 2 seconds $iDoor.BarnOHD.HBmissed = 0 $iDoor.BarnOHD.HBmissed Init To $iDoor.BarnOHD.HBmissed $iDoor.BarnOHD.BatteryDays = 1 $iDoor.BarnOHD.BatteryDays Init To $iDoor.BarnOHD.BatteryDays $iDoor.BarnOHD.TransCount = 1 $iDoor.BarnOHD.TransCount Init To $iDoor.BarnOHD.TransCount Wait 2 seconds Resource 'NotificationNS.DoorTrouble.BarnOHD' Wait 1 second Resource 'NotificationNS.DoorTrouble._resetCountersComplete' Else Resource 'NotificationNS.DoorTrouble.BarnOHD' Edited August 6, 2021 by MrBill 3
asbril Posted August 6, 2021 Author Posted August 6, 2021 You are the best. THANKS, THANKS. I got it to work !!!!!!!!!!!!! 1
asbril Posted August 6, 2021 Author Posted August 6, 2021 @MrBill This really adds a lot for me !!!!!! I don't need to open the Administrative Console as much as I have been doing. I had tried to achieve the same with Google Home or Alexa voice commands, but these fails way too often. Thanks again !
MrBill Posted August 6, 2021 Posted August 6, 2021 1 hour ago, asbril said: @MrBill This really adds a lot for me !!!!!! I don't need to open the Administrative Console as much as I have been doing. I had tried to achieve the same with Google Home or Alexa voice commands, but these fails way too often. Thanks again ! I love the home assistant interface I've built. You can literally do anything needed on the ISY once it's understood how all the "Call Service" routines work. Another thing of all the remote software on the phone we've tried this is the first one my wife likes. She's a user, and doesn't know how to set the dashboards up, but she will open the HA app and use it. 1
Mecheng70 Posted August 16, 2021 Posted August 16, 2021 On 8/6/2021 at 2:14 PM, MrBill said: I love the home assistant interface I've built. You can literally do anything needed on the ISY once it's understood how all the "Call Service" routines work. Another thing of all the remote software on the phone we've tried this is the first one my wife likes. She's a user, and doesn't know how to set the dashboards up, but she will open the HA app and use it. Yep, this here.... the ole WF (Wife Factor).... mine is at 1.0 right now.
Recommended Posts