Announcement

Collapse
No announcement yet.

XML HTTP RESTful API for HS3 - Discussion Thread

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

    #61
    Originally posted by NicolaiL View Post
    Very cool code!

    I'm wanting to update the device string for an HS3 device based on a parameter passed across and then also update the Last Change date.

    I can't see a call for this? Would you be able to add this to the script if it doesn't already exist?
    I will keep these features in mind and do some research on if they are possible from HS3 API calls.

    Comment


      #62
      Originally posted by JohnneyBoy View Post
      Firstly great extension.. works very good..

      I was surprised at the ordering of the Location parameters, in both the set and get functionality.

      I would have expected
      Floor Room Device

      However it seems to be
      Room Floor Device

      Was this intentional?

      John
      I believe this is due to the way you have rooms displayed or set in your HS environment. I know in HS settings you can change the order they are displayed. But if I remember correctly that doesn't effect the order they are referenced in the code. So if you had the setting set to reverse them and started naming your locations a certain way that would be why you are seeing that sort of behavior.

      Comment


        #63
        Originally posted by mark_anderson_us View Post
        Hi All

        My goal would be to develop a single client using a mobile-first, responsive design (probabl, bootstrap3), that would intelligently "scale" from phone to tablet to desktop (altering layout, adding detail--e.g. more news/weather content--higher quality images as the resolution gets higher).

        How far have any of you got with this REST interface? Is it possible to build a somewhat fully featured client?
        Mark, you should be able to do most of what you want without any trouble.

        I ran into a bit of trouble with authentication and security. Were you thinking of using HTTPS?

        I haven't had the server side issues that you mention with HSTouch, but my client takes a long time to reconnect whenever network routing changes. This is a problem for me when I come home and transfer to home WiFi.

        In my current setup I essentially proxy the RESTful API and this makes the control chain quite long.

        I go Tasker -> SSH plugin -> bash (curl) -> HTML.

        Gear

        Comment


          #64
          Originally posted by gear View Post
          Mark, you should be able to do most of what you want without any trouble.

          I ran into a bit of trouble with authentication and security. Were you thinking of using HTTPS?
          I was thinking about HTTP to start and maybe adding HTTPS if it's not too difficult
          ________________________

          Dell Zino HD - HSPRo 2.x
          HSTouch - iPhone 3GS, 4S, iPad2 and iPad 3, 3xKindle Fire (Wall mounted)
          2 x Brultech ECM1240 with UltraECM
          USB UIRT
          Cooper Aspire Z-Wave Switches
          WGL800 w ACRF2 and 3xDS10a (Sump Level/Activity sensing)
          HM ST812-2 Flood Sensor
          HSM100 - Motion Detector with Light and Temperature
          2GIG Thermostat
          BLDSC - Alarm Plug-in
          BLUPS
          UltraLog (SQL2008)
          Jon00 Plugins
          Host XR3 BT and Jon00 BT Proximity
          Global Cache IP2IR
          Foscam FI8918W

          Comment


            #65
            Originally posted by RedTechie View Post
            First let me apologize. For some reason the HS forums don't always send me email updates to my topics. I will double check my settings.





            Count me interested! I have known about HomeSeer for a long time now. I recently switched to it from Vera about 6 or so months ago. That is when I wrote this REST API because I was completely shocked that HS *still* didn't have a native REST API when most of its competitors did.

            I would love to see more modern apps built using angular, MVC methodology and bootstrap!

            In terms of the API's functionality, let me start with support; I offer what support I can (I built it in my spare time) but I still try to answer questions and when I get time, upgrade it with feature requests. I also encourage others to post updates to it as well.

            In terms of the features you mentioned. It should be able to do most of what you want to do besides news/weather. When I built it I built it with controlling lights in mind. So it can dim, turn them on/off, execute events and get status info. Other features would need to be added.

            The one thing I noticed while using it myself in a Adobe Air application running on my desktop is if you send to many requests to it over a long period of time it lags a bit. I dont believe this is a problem with the REST API but more of a problem with the backend HomeSeer control APIs.

            Let me know how you make out!
            I'm just learning Angular and MVC fairly new to (*real* JavaScript: IIFE's, Closures, Higher order functions, etc.) if I embark on this project, it's as much and exercise for my new skills as anything else. I just don't want to wait for a new version of HS3 and very close to switching to Indigo.

            Does sound like we have similar issue with lags. If I leave my server on for several days events are delayed from a few seconds on day 1 to, sometimes, several minutes by day 4 or 5. I used to have a scheduled reboot every week, but it still unusable, so now I'm down to once a day. Real tired of all the error messages about z-wave stats when i don;t even had one: removed it 2 years ago.

            The only things that are stopping me moving to Indigo immediately are:
            • Python scripting. I'm sure it's not hard to learn, but already working with C#, SQL, JavaScript, etc. would prefer not to have to learn another language (unless it's something cool). Would much rather invest my time learning more MV* frameworks, Node.js, front-end dev tools, other ORM's, etc.
            • Indigo Touch (what I would start with) doesn't handle screen swapping based on rotations and there doesn't seem to be a way to restrict layouts to specific devices: so, (it seems) that an iPad retina layout is available to an iPhone and just scaled. While I don't like the idea of scaling, having to maintain 4 different projects for 4 different screen resolutions in HS is a real pain too. Not sure which is worse. (Of course, with a web client, I can deal with all this myself.)
            • I have to build an interface for RS232 message reception so my URC integration works. Couldn't live without that - can't beat setting lighting scenes, etc. from AV remote.


            Indigo is a grand total of 2 people (not sure how many are at HS) but they seem very responsive on forums.

            Will keep you posted

            Regards

            Mark
            ________________________

            Dell Zino HD - HSPRo 2.x
            HSTouch - iPhone 3GS, 4S, iPad2 and iPad 3, 3xKindle Fire (Wall mounted)
            2 x Brultech ECM1240 with UltraECM
            USB UIRT
            Cooper Aspire Z-Wave Switches
            WGL800 w ACRF2 and 3xDS10a (Sump Level/Activity sensing)
            HM ST812-2 Flood Sensor
            HSM100 - Motion Detector with Light and Temperature
            2GIG Thermostat
            BLDSC - Alarm Plug-in
            BLUPS
            UltraLog (SQL2008)
            Jon00 Plugins
            Host XR3 BT and Jon00 BT Proximity
            Global Cache IP2IR
            Foscam FI8918W

            Comment


              #66
              Hi mark.

              What i did do with hs2 is using the ultralog plugin with MySQL. Used that in combination with the plugin hstenserver. I used mysql to get status (ajax did the refreshing of divs containing info). I used hstenserver for toggling etc.

              What I want to do is use the sqlite database from hs3 in combination with this very nice rest api. Because my gut says sending commands won't cause a great lag.(not sure)

              I made a panel with the bootstrap framework so its responsive. I had zero to none experience with php, JavaScript, mysql and a little experience with HTML and CSS.

              It was fun to do. Maybe a option for you?

              Verstuurd vanaf mijn Nexus 5 met Tapatalk

              Comment


                #67
                Originally posted by Phaeton View Post
                Hi mark.

                What i did do with hs2 is using the ultralog plugin with MySQL. Used that in combination with the plugin hstenserver. I used mysql to get status (ajax did the refreshing of divs containing info). I used hstenserver for toggling etc.

                What I want to do is use the sqlite database from hs3 in combination with this very nice rest api. Because my gut says sending commands won't cause a great lag.(not sure)

                I made a panel with the bootstrap framework so its responsive. I had zero to none experience with php, JavaScript, mysql and a little experience with HTML and CSS.

                It was fun to do. Maybe a option for you?

                Verstuurd vanaf mijn Nexus 5 met Tapatalk
                I didn't use mySQl. I uses SQL Server and produced reports using SSRS

                Would be interested to see what you've done BUT not remotely interested in PHP. Gave that up years ago. Been using ASP.NET a lot since, but now trying to stick to as much JavaScript and MV* frameworks as possible
                ________________________

                Dell Zino HD - HSPRo 2.x
                HSTouch - iPhone 3GS, 4S, iPad2 and iPad 3, 3xKindle Fire (Wall mounted)
                2 x Brultech ECM1240 with UltraECM
                USB UIRT
                Cooper Aspire Z-Wave Switches
                WGL800 w ACRF2 and 3xDS10a (Sump Level/Activity sensing)
                HM ST812-2 Flood Sensor
                HSM100 - Motion Detector with Light and Temperature
                2GIG Thermostat
                BLDSC - Alarm Plug-in
                BLUPS
                UltraLog (SQL2008)
                Jon00 Plugins
                Host XR3 BT and Jon00 BT Proximity
                Global Cache IP2IR
                Foscam FI8918W

                Comment


                  #68
                  Hi Guys

                  Did some playing on my proof of concept. Posted message here: http://board.homeseer.com/showpost.p...08&postcount=1

                  Basically the layout is responsive, icons are vector, can be colored with CSS and reflections are done with CSS too

                  Regards

                  Mark
                  ________________________

                  Dell Zino HD - HSPRo 2.x
                  HSTouch - iPhone 3GS, 4S, iPad2 and iPad 3, 3xKindle Fire (Wall mounted)
                  2 x Brultech ECM1240 with UltraECM
                  USB UIRT
                  Cooper Aspire Z-Wave Switches
                  WGL800 w ACRF2 and 3xDS10a (Sump Level/Activity sensing)
                  HM ST812-2 Flood Sensor
                  HSM100 - Motion Detector with Light and Temperature
                  2GIG Thermostat
                  BLDSC - Alarm Plug-in
                  BLUPS
                  UltraLog (SQL2008)
                  Jon00 Plugins
                  Host XR3 BT and Jon00 BT Proximity
                  Global Cache IP2IR
                  Foscam FI8918W

                  Comment


                    #69
                    Any plans to support JSON? Not sure if it's a big effort. (in CherryPy web server--for example--its a simple switch to enable it (alongside XML))
                    Last edited by mark_anderson_us; June 17, 2014, 03:35 PM.
                    ________________________

                    Dell Zino HD - HSPRo 2.x
                    HSTouch - iPhone 3GS, 4S, iPad2 and iPad 3, 3xKindle Fire (Wall mounted)
                    2 x Brultech ECM1240 with UltraECM
                    USB UIRT
                    Cooper Aspire Z-Wave Switches
                    WGL800 w ACRF2 and 3xDS10a (Sump Level/Activity sensing)
                    HM ST812-2 Flood Sensor
                    HSM100 - Motion Detector with Light and Temperature
                    2GIG Thermostat
                    BLDSC - Alarm Plug-in
                    BLUPS
                    UltraLog (SQL2008)
                    Jon00 Plugins
                    Host XR3 BT and Jon00 BT Proximity
                    Global Cache IP2IR
                    Foscam FI8918W

                    Comment


                      #70
                      I would love that

                      Verstuurd vanaf mijn Nexus 5 met Tapatalk

                      Comment


                        #71
                        Me too

                        Comment


                          #72
                          Originally posted by Skinnez View Post
                          Me too
                          too soon to say this is snowballing?
                          ________________________

                          Dell Zino HD - HSPRo 2.x
                          HSTouch - iPhone 3GS, 4S, iPad2 and iPad 3, 3xKindle Fire (Wall mounted)
                          2 x Brultech ECM1240 with UltraECM
                          USB UIRT
                          Cooper Aspire Z-Wave Switches
                          WGL800 w ACRF2 and 3xDS10a (Sump Level/Activity sensing)
                          HM ST812-2 Flood Sensor
                          HSM100 - Motion Detector with Light and Temperature
                          2GIG Thermostat
                          BLDSC - Alarm Plug-in
                          BLUPS
                          UltraLog (SQL2008)
                          Jon00 Plugins
                          Host XR3 BT and Jon00 BT Proximity
                          Global Cache IP2IR
                          Foscam FI8918W

                          Comment


                            #73
                            Lol!

                            Verstuurd vanaf mijn Nexus 5 met Tapatalk

                            Comment


                              #74
                              Toggling Devices with tasker

                              Is there a way to use this to toggle status with tasker? I know it can be used t trigger events and the solution there would be to create two events and then act based on present status then a third to trigger both but that's kind of kludgy.

                              My application is a tablet in the office that doesn't run HSTouch due to aesthetics (have some sound reactive backgrounds and widgets). I really just want a few tasker shortcuts on the bottom of the screen to turn devices on and off but for tasked to accurately report the device status it would need to be able to get the info from homeseer.

                              Might be overzealous, would be great if HSTouch supported widgets on Android.

                              Comment


                                #75
                                Using a zwave thermostat, can get status, set heat/cool/auto mode, fan mode, etc, but when I try to set a temp I get 'indeterminate'. I'm 100% sure I'm using the correct url, but I'm lost, it's the last piece of my puzzle for my Tasker custom remote

                                Comment

                                Working...
                                X