Announcement

Collapse
No announcement yet.

TRÅDFRI Button

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

    #31
    Originally posted by rge View Post
    with a scene associated with the button:

    Code:
    [1308] TRADFRI SHORTCUT Button: {"9001":"TRADFRI SHORTCUT Button","9003":65559,"5750":0,"3":{"0":"IKEA of Sweden","1":"TRADFRI SHORTCUT Button","6":3,"2":"","3":"2.3.080","7":4550,"9":87},"9054":0 ,"9002":1639160130,"9020":1639235396,"9019":1,"15009":[{"9003":0}],"15019":{"9039":196629,"9250":[{"9251":1,"9252":[{"9253":1,"9254":1,"9255":196629},{"9253":2,"9254":0,"925 5": 0},{"9253":3,"9254":1,"9255":196630}]}]}}
    Unfortunately short, double and long press all give the same log message.
    Are you sure the message is exactly the same?

    Comment


      #32
      Originally posted by alexbk66 View Post

      Are you sure the message is exactly the same?
      Yes I checked again and confirmed all three types of click give the same log entry.

      Comment


        #33
        Hi!
        I bougth 2 TRADFRI shortcut button and added it easily with JowiHue and Conbee II. Detected as a switch and a battery.
        I've created events that toggle the table lamp near the bed of the kids. They can switch on and off the lamp plugged in a z-wave smart outlet. It work great!

        I'm able to get 3 types of status with the button :
        • Short press : On short (1001)
        • Hold long press : On holding (1002)
        • Long press released : On released long (1003)

        I configured two events :
        • Event1 (Turn the lamp ON) : If device had its value set to « On short » and the lamp is OFF, Set the lamp to ON.
        • Event2 (Turn the lamp OFF) : If device had its value set to « On short » and the lamp is ON, Set the lamp to OFF.

        A lot of possibility, for 9.99$ in Canada, cant find anything cheaper!
        ​​

        Comment


          #34
          Originally posted by flaplante99 View Post
          Hi!
          I bougth 2 TRADFRI shortcut button and added it easily with JowiHue and Conbee II. Detected as a switch and a battery.
          I've created events that toggle the table lamp near the bed of the kids. They can switch on and off the lamp plugged in a z-wave smart outlet. It work great!

          I'm able to get 3 types of status with the button :
          • Short press : On short (1001)
          • Hold long press : On holding (1002)
          • Long press released : On released long (1003)

          I configured two events :
          • Event1 (Turn the lamp ON) : If device had its value set to « On short » and the lamp is OFF, Set the lamp to ON.
          • Event2 (Turn the lamp OFF) : If device had its value set to « On short » and the lamp is ON, Set the lamp to OFF.

          A lot of possibility, for 9.99$ in Canada, cant find anything cheaper!
          ​​
          So the battery died on this within a week.

          I just put a new battery in and will wait and see how long it lasts.

          Comment


            #35
            How would a virtual device accomplish toggling?

            Comment


              #36
              Originally posted by dmagerl View Post
              How would a virtual device accomplish toggling?
              What exactly do you mean?

              Comment


                #37
                Oops. I made two mistakes here.
                1. I didnt see that the post is a year old
                2. I'm still figuring out how to quote someone.

                I'm still interested in an answer though.

                I've been wrestling with how to do a toggle function for some time now. I normally use two events but its kind of kludgey.

                This is what I was replying to.
                Originally posted by AshaiRey View Post

                You can use a virtual device to toggle it's state.
                Or create a timer that starts running at the 1e press and counts the number of presses in say 2 seconds. An event then triggers based on the number of key presses detected and registered in the counter.
                I use just one button to turn my alarm on or off (double presses) or turn the lights off when there is just one press detected.

                Comment


                  #38
                  Originally posted by dmagerl View Post
                  Oops. I made two mistakes here.
                  1. I didnt see that the post is a year old
                  2. I'm still figuring out how to quote someone.

                  I'm still interested in an answer though.

                  I've been wrestling with how to do a toggle function for some time now. I normally use two events but its kind of kludgey.

                  This is what I was replying to.

                  Just build it based off conditions.

                  if device is set or changed
                  And if device is short press
                  and light is off

                  turn on


                  then do the same but
                  and light is on
                  turn off

                  Comment


                    #39
                    Originally posted by mik3 View Post

                    Just build it based off conditions.

                    if device is set or changed
                    And if device is short press
                    and light is off

                    turn on


                    then do the same but
                    and light is on
                    turn off
                    Thats how I'm doing it now.

                    When I ran HS3 I used a script command to do toggling:
                    Code:
                    &sdvRef = hs.GetDeviceRefByName("device name here") :
                    if hs.ison(dvRef) then
                       hs.CAPIControlHandler(hs.CAPIGetSingleControl(dvRef, True, "off", False, True))
                    Else
                       hs.CAPIControlHandler(hs.CAPIGetSingleControl(dvRef, True, "on", False, True))
                    end if
                    In HS3 it ran perfectly.

                    In HS4 it seems to get triggered twice, the second time it errors out. It still works though.

                    In HS4pi its seems to error out immediately and never runs.

                    Since I'm now running HS4pi, I guess I'll keep doing what I'm doing now with the two events for each device needing to toggle.

                    Comment


                      #40
                      Originally posted by dmagerl View Post
                      Oops. I made two mistakes here.
                      1. I didnt see that the post is a year old
                      2. I'm still figuring out how to quote someone.

                      I'm still interested in an answer though.

                      I've been wrestling with how to do a toggle function for some time now. I normally use two events but its kind of kludgey.

                      This is what I was replying to.
                      BTW, you can try AKSmartDevice plugin https://forums.homeseer.com/forum/hs...n-for-homeseer

                      Click image for larger version

Name:	image_100348.jpg
Views:	106
Size:	133.2 KB
ID:	1528613

                      Comment


                        #41
                        Another dead battery, but in a different remote. Just replaced this battery.

                        This pacticular remote is 2 feet from the conbee.

                        Comment


                          #42
                          Originally posted by mik3 View Post
                          Another dead battery, but in a different remote. Just replaced this battery.

                          This pacticular remote is 2 feet from the conbee.
                          My batteries last for a year, but I'm not using IKEA batteries.

                          Comment


                            #43
                            I found a workaround for the buttons not having an actual button status in Homeseer.

                            - buy a dummy device to create scenes on (the cheapest bulb)
                            - for each button, create a scene that controls the dummy device, call them something like B1press, B1double, B1long, B2press, B2double etc
                            - now you can trigger off the value of the Mood device :-)

                            One extra thing is needed - pressing the same button twice doesn't update anything, so I created another scene called "Bnull" which I reset the mood back to using a script triggered off the change:

                            Code:
                            Private Const devMood as Integer = 1082 ' put the device ID of your mood device in here
                            
                            Sub Main(parms As Object)
                              Dim mood as String = hs.CAPIGetStatus(devMood).Status()
                            
                              If Left(mood, 1) = "B" AndAlso Val(Mid(mood, 2, 1)) > 0 Then
                                hs.WriteLog("Ikea, "Mood set to button " & mood)
                            
                                hs.WaitSecs(0.25)
                                CallCAPI(devMood, "Bnull")
                              End If
                            
                            End Sub
                            
                            Function CallCAPI(ByVal intDevRef As Integer, ByVal strDevCmd As String) As CAPIControlResponse
                              CallCAPI = CAPIControlResponse.Indeterminate
                            
                              For Each objCAPIControl As CAPIControl In hs.CAPIGetControl(intDevRef)
                                If LCase(objCAPIControl.Label) = LCase(strDevCmd) Then
                                  CallCAPI = hs.CAPIControlHandler(objCAPIControl)
                                  Exit Function
                                End If
                              Next
                            End Function

                            Comment


                              #44
                              Originally posted by rge View Post

                              One extra thing is needed - pressing the same button twice doesn't update anything, so I created another scene called "Bnull" which I reset the mood back to using a script triggered off the change:
                              That's the reason why I created https://forums.homeseer.com/forum/hs...n-for-homeseer

                              Comment


                                #45
                                These button devices ended up in the trash…

                                Comment

                                Working...
                                X