Jump to content

ISY Programs on Home Assistant ?


Recommended Posts

Posted (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 by asbril
Posted
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.

image.png.c0d7135b930ce4668c81257544af9f47.png

image.png.3621c883a7462d507aaab99682e5044e.png

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: {}

 

  • Thanks 1
Posted

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 ?

Posted (edited)

I hoped showing the UI picture would get you there. 

from any dashboard:

  1. three dots upper right > Edit dashboard
  2. Add Card
  3. Assuming you're wanting more than one let's choose "Grid"
  4. then pick Button
  5. On the "Entity (optional)" line click the X to remove whatever it put there.
  6. Type a name for the button in the Name line, doesn't need to match to anything on ISY
  7.  Make an Icon If you want one, putting "mdi:check" will give you a simple check mark.
  8.  the Default "Tap Action" is Toggle, change that to "Call Service".
  9.  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.
  10. 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.
  11. "Command" is a dropdown where you can choose 8 options that will be familiar.   Note: "Run (if)" is just Run
  12. 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).

image.thumb.png.fed2814057db64e16aa917e15535658b.png

and because we added the confirmation to the YAML manually a long press will yield:

image.png.9d71d138ea05dae4beb07733e4763ac9.png

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 by MrBill
  • Like 3
Posted

@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 !

Posted
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.

  • Like 1
  • 2 weeks later...
Posted
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.  :)

Guest
This topic is now closed to further replies.

×
×
  • Create New...