Announcement

Collapse
No announcement yet.

Hunter Douglas Powerview Integration/PlugIn

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

  • #16
    I got the scenes working fairly reliably in Homeseer.

    I created virtual devices for each room and added buttons for each scene in the rooms. I set up events to run when "has its value set to" for each scene. The events run single script command:
    Code:
    hs.URLACTION("(Your IP)/api/scenes?sceneid=(scene id)","GET", "","")
    I also unchecked "Do not update device last change time
    if device value does not change:" This is in case the shades are not in sync when scene button is pushed to reflect the change.

    PowerView hub has a weak RF signal and despite having a repeater, reliability is sometimes spotty. To counter this, I added wait sec and repeated the URLACTION. I ended up doing three total commands for reliability with one sec pause. I read where some folks did up to ten tries for reliability. Not sure if longer pauses would be better.

    You have to figure out what your scene ids are through the api. You can also get a list of scenes, rooms, shades. Names are in base64

    - PowerView Scenes - http://(Your IP)/api/scenes?
    - PowerView Rooms - http://(Your IP)/api/rooms?
    - PowerView Shades - http://(Your IP)/api/shades?

    To issue scene command use this

    http://(Your IP)/api/scenes?sceneid=(scene id)

    Controling individual shades is more complicated. I have it working using Postman sending JSON commands, but I haven't got it going with HS3 scripting.

    Comment


    • #17
      Please help

      When I put:
      192.168.1.xxx/api/scenes?sceneid=yyyyy
      into my brower, my shades implement the scene.

      When I put:
      hs.urlaction(192.168.1.xxx/api/scenes?sceneid=yyyyy)

      it doesn't work. The log says:

      Error: Running script(1) &hs.URLACTION(192.168.1.223/api/scenes?sceneid=43542), init error: Expected ')'

      Can someone please tell me what I'm doing wrong?

      Thankx!!!

      Comment


      • #18
        inside homeseer you have to put it in this format:

        hs.URLACTION("(Your IP)/api/scenes?sceneid=(scene id)","GET", "","")

        Comment


        • #19
          Originally posted by prsmith777 View Post
          inside homeseer you have to put it in this format:

          hs.URLACTION("(Your IP)/api/scenes?sceneid=(scene id)","GET", "","")
          I tried that. The error I get is:

          Jun-21 5:08:37 PM Error In URLAction GET: Invalid URI: The format of the URI could not be determined.
          Jun-21 5:08:37 PM Event Running script statement immediately: &hs.URLACTION("192.168.1.223/api/scenes?sceneid=43542","GET", "","")
          Jun-21 5:08:37 PM Event Event Trigger "Shades All Closed"
          Jun-21 5:08:37 PM Event Event Shades All Closed triggered by the event page 'Run' button.

          What am I doing wrong?

          Comment


          • #20
            try hs.URLACTION("http://192.168.1.223/api/scenes?sceneid=43542","GET", "","")

            Comment


            • #21
              Originally posted by prsmith777 View Post
              try hs.URLACTION("http://192.168.1.223/api/scenes?sceneid=43542","GET", "","")
              That did it. Thanks a bunch!!!

              Comment


              • #22
                So now I can set a scene via HomeSeer. But it would really be nice to be able to see that status of the shades in HomeSeer. I assume a plugin would do that, but without a plugin, is there a way to get status and show it in HS?

                Comment


                • #23
                  Originally posted by jrjmpls7 View Post
                  So now I can set a scene via HomeSeer. But it would really be nice to be able to see that status of the shades in HomeSeer. I assume a plugin would do that, but without a plugin, is there a way to get status and show it in HS?
                  you can query an individual shade using : "http://<hub ip>/api/shades?shadeid=<shade id>" but unfortunately it isn't very accurate. As far as I can tell the shade position isn't updated unless you use the app to move the shade. If you use scenes or the remote, the position isn't updated.

                  Comment


                  • #24
                    I have had no luck in moving an individual shade using vb.net scripting. I can successfully use Postman to move the shade. I don't have any headers or authorizations when using Postman to get it to work. The proper format to issue a shade movement is using PUT issuing JSON call to:

                    http://<hubip>/api/shades/<shadeID>

                    and in JSON body for my particular shade use

                    {"shade":{"id":<shade id>,"positions":{"posKind1":1,"position1":<shade position>}}}

                    shade position is an integer between 0-65535.

                    I get the proper string returned when the script runs, but nothing happens on the shade. I've tried issuing multiple commands with various pauses and tried issuing the shade query command first, but no shade movement.
                    Code:
                    Imports System.IO
                    Imports System.Net
                    
                       Sub Main(ByVal Parm As Object)
                    
                            Dim httpWebRequest = WebRequest.Create("http://192.168.0.155/api/shades/13403")
                    
                            httpWebRequest.ContentType = "application/json"
                            httpWebRequest.Method = "PUT"
                    
                            Dim json As String = "{""shade"":{""id"":13403,""positions"":{""posKind1"":1,""position1"":36000}}}"
                    
                            Using streamWriter = New StreamWriter(httpWebRequest.GetRequestStream().ToString)
                                streamWriter.Write(json)
                            End Using
                    
                            Using streamWriter = New StreamWriter(httpWebRequest.GetRequestStream().ToString)
                                 streamWriter.Write(json)
                            End Using
                    
                            Dim httpResponse = HttpWebRequest.GetResponse()
                            Using streamReader = New StreamReader(httpResponse.GetResponseStream().ToString)
                                Dim responseText = StreamReader.ReadToEnd()
                                hs.WriteLog("Response", responseText)
                            End Using
                        End Sub

                    Comment


                    • #25
                      anybody made any progress on automating these?

                      Comment


                      • #26
                        I sniffed the Powerview API on a gen 1 hub for another automation project and posted the REST endpoints here: https://github.com/johnvey/smartthin...werview_api.md

                        1) There are a couple ways to force a poll on the current shade position: issue a `?refresh=true` or `?updateBatteryLevel=true` when requesting shade data. This should resolve the above issue. More details are here: https://github.com/johnvey/smartthin...d#single-shade

                        2) Note that there is a gen 2 hub now, that has changed some of the HTTP calls. Gen 1 is a square gray box, Gen 2 is a round white disc.

                        Perhaps a HAB2 hacker can use this info to write up a driver.

                        Comment


                        • #27
                          I've got mine operating through a command line app I wrote, and called from HS3. Not slick like a plug-in but gives me local control direct to hub (gen 1 square box).

                          Sent from my SAMSUNG-SM-N910A using Tapatalk

                          Comment


                          • #28
                            Hi folks - reopening this thread....strongly considering side ring investing in HD blinds since they're the only honeycomb I can find to do motorized top down bottom up and battery. Anyone refined a plug in for hs3 yet?

                            Comment


                            • #29
                              Originally posted by larrywal32 View Post
                              Hi folks - reopening this thread....strongly considering side ring investing in HD blinds since they're the only honeycomb I can find to do motorized top down bottom up and battery. Anyone refined a plug in for hs3 yet?
                              Same that I've found so far... I'd be willing to do command line if I have to.

                              Did you find any non-battery that do top down bottom up?
                              Joe (zimmer62)

                              BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

                              Comment

                              Working...
                              X