Announcement

Collapse
No announcement yet.

How do you activate a pushable button from an event

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do you activate a pushable button from an event

    I want to activate pushable button #1 on a device from hubitat from an event. How does one go about doing that? I don't see any reference in the device controls. Thanks.

    Click image for larger version

Name:	Screen Shot 2021-05-29 at 9.40.17 AM.png
Views:	53
Size:	31.9 KB
ID:	1476950
    Attached Files

    #2
    The button should come over in the maker if not create a VD in Hubitat bring that over in the maker and make a simple rule in Hubitat to turn on/off that button when switch is triggered. Control it then in HS.

    Comment


      #3
      I see the family of buttons were created as status only with range of values of 1 to 5. They seems to be able to be commanded as [off, on, hold, push, doubleTap]. I added this in 3.4.4.0. The button device(s) need to be recreated so first need to be delete from HS any button of interest.

      If a hubitat device reports pushable, holdable, and releasable capability then Central Scene is created for the buttons, otherwise the individual devices are created and a single button added to each. I'm guessing at what needs to be reported to Hubitat when a button is activated from HS. This information should be available on the Hubitat Device page for the commands. Of particular uncertainty is what is Maker API expecting when a ReleasableButton is activated.

      http://mcsSpriklers.com/mcsHubitat_3_4_4_0.zip

      Comment


        #4
        Bigstevep Thanks for the suggestion with the virtual switch. I have other buttons that show up in the device event options - for some reason this one is not. I am thinking it is because this one is using a custom virtual device handler?

        Comment


          #5
          Originally posted by Michael McSharry View Post
          I see the family of buttons were created as status only with range of values of 1 to 5. They seems to be able to be commanded as [off, on, hold, push, doubleTap]. I added this in 3.4.4.0. The button device(s) need to be recreated so first need to be delete from HS any button of interest.

          If a hubitat device reports pushable, holdable, and releasable capability then Central Scene is created for the buttons, otherwise the individual devices are created and a single button added to each. I'm guessing at what needs to be reported to Hubitat when a button is activated from HS. This information should be available on the Hubitat Device page for the commands. Of particular uncertainty is what is Maker API expecting when a ReleasableButton is activated.

          http://mcsSpriklers.com/mcsHubitat_3_4_4_0.zip
          I tried installing this version. I do now see a Push button in device in HS3. I also see a push option in the device control options in the event. But nothing else. When I push the button in HS3 I get the following error in Hubitat?

          2021-05-29 02:14:03.724 pm errorjava.lang.NumberFormatException: For input string: "null" (push)

          Here is the hubitat device page if this helps? Thanks.

          Click image for larger version

Name:	Screen Shot 2021-05-29 at 2.18.25 PM.png
Views:	53
Size:	92.9 KB
ID:	1476990

          Comment


            #6
            The command is expecting a number. What number should I use for each type of command?

            Does there need to be any indication that the button was unpressed? For example does the number need to be set to 0 sometime after it was set to the desired value?

            Comment


              #7
              I think it is the number of the button. The number of buttons is specified in the device properties - in this case 5. And the number of buttons is specified in the maker output. In hubitat in the device control I have to specify the button number and then click the Double Tap, Hold, Push or Release buttons.

              Comment


                #8
                As an example, "numberOfButtons" is 3. Pushable, DoubleTap and Holdable are the capabilities so three devices created in HS. Now one button is created in HS for each of the three devices. Should there be 3 buttons created with values 1, 2 and 3? Should there continue to be one button created with value = 1 for push, 2 for dbltap, and 3 for hold?

                Comment


                  #9
                  In the example you give, yes, I think there should be three devices, each with a push, double tap and hold. Wouldn't there also be a release button - for a total of four buttons?

                  Comment


                    #10
                    I was just doing an example. Maker API will tell us for each Hubitat device that has buttons. It could be 4 or could be 1.

                    The question still exists. What number do I pass to Maker API for a push button? If Maker API indicates there are 4 buttons do I create 4 pushable buttons or do I create a set of a total of 4 buttons of which one is pushable? Currently numberofbuttons parameter is not used and one oushable is created with values of 1 to 5 accepted.

                    Comment


                      #11
                      In the specific example I was working on I needed a button to trigger an app. For some reason the app only allows this to happen through a button, not a switch. So I created a virtual button. It appears that by default Hubitat created it with number of physical buttons = 5. I actually don't need 5 buttons for this application but I am having trouble adjusting this down to 1 in Hubitat. One device will allow it but the other is greyed out. I will have to figure that out separately.

                      I do not need to push the buttons through the homeseer web interface, although that might be nice. I only need to push them through events.

                      Would the Pico remote implementation be the way to go here? Having one option for pushable, releasable, double tappable, holdable which you then specify the button number for in the event? Although I just noticed that I can use those devices to trigger events, but I cannot push buttons in an event. That makes sense for the Pico remotes, but in this application I need to push the button based on an event.

                      It's starting to look like the suggestion above about creating a virtual switch to push the virtual button through rule machine might be the simplest approach here? Unless others have applications for pushing virtual buttons from Homeseer?

                      Click image for larger version

Name:	Screen Shot 2021-05-30 at 8.04.04 AM.png
Views:	59
Size:	103.3 KB
ID:	1477083

                      Comment


                        #12
                        We are not communicating effectively. Let us try looking at it from the Hubitat perspective. In post #5 you showed a "push" device. What number do you need to put in the text box below it for the push action to be recognized by Hubitat? Same question for one of the other buttons.

                        Comment


                          #13
                          In Hubitat, in order to "push", I have to insert the number of the button in the field. For example, there are 5 buttons, so I have to enter 1, 2, 3, 4, or 5 and then click push. Here is an example:

                          Example pushing buttons - click here

                          Comment


                            #14
                            This seems like you need a selector with values of 1 o 5 or five individual buttons on the HS UI. In the event action it will control a device with value in range 1 to 5. Do I have it correct?

                            Comment


                              #15
                              I think that is it. Thanks.

                              Comment

                              Working...
                              X