Announcement

Collapse
No announcement yet.

XML HTTP RESTful API for HS3 - Discussion Thread

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

    #46
    Does anyone have the ability to look at this and fix the ability to get device values into Tasker? Is there any possibility that the HS folks could look at this. Using Tasker to allow android phones to deal with HS must be worth something to the HS folks.
    Red Techie has done most of the work and I would think fixing the issue with non on/off devices (thermostats, switch closure devices, etc) wouldn't be too hard for some of you (unfortunately-not me!).
    Last edited by jrjmpls7; February 3, 2014, 09:38 AM.

    Comment


      #47
      I'm not sure what your guys are trying to do, but the methodology in the following thread still works in HS3. I'm using a POST and not passing information via the URL. Basically using the supplied files in that thread as a foundation and built off of that.
      http://forums.homeseer.com/showthread.php?t=152866
      HS: 2.5.0.60
      Environment: Virtual XP as guest in VMWare Server running under Win 7
      Plug-ins: MLHSPlugin|RCS Serial Thermostat|UltraLog|UltraMon|
      Misc: 303 Devices, 313 Events, 68+ Scripts

      HSeer: 3.0.0.54
      Environment: Virtual XP as guest in VMWare Server running under Win 7
      Plug-ins: BLGData|BLRF|BLRadar|BLRandom|BLSpeech
      UltraM1G3|UltraECM3|UltraMon3|UPBSpud|Z-Wave
      Misc: 148 Devices, 116 Events, 9+ Scripts (so far, still converting)

      Comment


        #48
        Hi,

        same here : white page/empty source code when I try to use any function to get status (at last with id, did not try Full Name).

        Comment


          #49
          Originally posted by webjco View Post
          Hi,

          same here : white page/empty source code when I try to use any function to get status (at last with id, did not try Full Name).
          What type of device are you trying to get status from? I have only tested this with on/off and dimmable lights as that is all I use HomeSeer for currently.

          Comment


            #50
            Oh Ok, that is probably why...
            I am trying to display the temperature of an everpsring st814.
            Just want to get the value.
            On/off works fine with another z-wave device.

            Thank you for your reply.

            Comment


              #51
              RedTechie,

              I also had a bit of trouble interfacing initially - so I made some logging changes and also added an additional command.

              Please take a look a couple edits I made here:
              https://www.dropbox.com/s/c5hyel6r01..._REST_API.aspx

              The commands "GetDeviceStatusValueByName" and "GetDeviceStatusValueByID" should now allow getting and setting of the status of a device which doesn't have defined controls.
              Added the command "setdevicevaluebyid". The arguments are &param1="deviceId as int32"&param2="device value as double".

              Errors now show up for those commands in the HS logging. They are tagged with "RESTful-API".

              Thanks, Geer
              Last edited by gear; March 31, 2014, 09:50 AM.

              Comment


                #52
                and that makes my day !

                thank you to both of you !

                Comment


                  #53
                  Hoping someone has an idea - I can use a URL to unlock a door on my computer - but if I try it in Android, the unlock fails and returns an Indeterminate on the browser? (I did have this working for weeks and lost my Tasker setup.... Now, No luck...)

                  Comment


                    #54
                    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?
                    Nicolai L

                    Comment


                      #55
                      RedTechie

                      Thanks for this, I was really frustrated when upgrading to HS3 broke my own scripts, but yours is exactly what I needed to get my Roomie working again.
                      Noticing that you have the 'get' functionality in there also, I'll try and see if my roomie setup can now poll light status as well. If successful, I'll be sure to post it here.

                      Thanks again!

                      Comment


                        #56
                        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

                        Comment


                          #57
                          Hi All

                          I'm about done with HSTouch, between the bugs, lack of upgrade for HS3, and the resource leaks that causes my server to crawl to a halt every few days (consensus seems to be this happens when you have several HS clients: I only have 2 permanently on Android devices).

                          How feasible is it to built a reasonably rich 100% HTML client for HS. I'm starting to do a lot more with Javascript, bootstraps, etc, and just examining backbone, ember, angular, etc. Ideally, I'd start with this REST api, and if necessary write a new back-end eventually and use an MV* framework.

                          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? I basically want:
                          1. Buttons that will trigger events
                          2. Change device status (e.g. dim a light)
                          3. Display news/weather and status.
                          4. Would be nice to have real-time device status, but I could live with periodic updates for the currently visible pages.


                          I need to make a decision within the next few weeks weather to stay with HS or move to Indigo.

                          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


                            #58
                            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.


                            Originally posted by mark_anderson_us View Post
                            Hi All

                            I'm about done with HSTouch, between the bugs, lack of upgrade for HS3, and the resource leaks that causes my server to crawl to a halt every few days (consensus seems to be this happens when you have several HS clients: I only have 2 permanently on Android devices).

                            How feasible is it to built a reasonably rich 100% HTML client for HS. I'm starting to do a lot more with Javascript, bootstraps, etc, and just examining backbone, ember, angular, etc. Ideally, I'd start with this REST api, and if necessary write a new back-end eventually and use an MV* framework.

                            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? I basically want:
                            1. Buttons that will trigger events
                            2. Change device status (e.g. dim a light)
                            3. Display news/weather and status.
                            4. Would be nice to have real-time device status, but I could live with periodic updates for the currently visible pages.


                            I need to make a decision within the next few weeks weather to stay with HS or move to Indigo.

                            Regards

                            Mark

                            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!

                            Comment


                              #59
                              Originally posted by gear View Post
                              RedTechie,

                              I also had a bit of trouble interfacing initially - so I made some logging changes and also added an additional command.

                              Please take a look a couple edits I made here:
                              https://www.dropbox.com/s/c5hyel6r01..._REST_API.aspx

                              The commands "GetDeviceStatusValueByName" and "GetDeviceStatusValueByID" should now allow getting and setting of the status of a device which doesn't have defined controls.
                              Added the command "setdevicevaluebyid". The arguments are &param1="deviceId as int32"&param2="device value as double".

                              Errors now show up for those commands in the HS logging. They are tagged with "RESTful-API".

                              Thanks, Geer
                              Great! Thanks for digging into the code! I will take a look and add them in the next week or so!

                              Comment


                                #60
                                Originally posted by surovich View Post
                                Hoping someone has an idea - I can use a URL to unlock a door on my computer - but if I try it in Android, the unlock fails and returns an Indeterminate on the browser? (I did have this working for weeks and lost my Tasker setup.... Now, No luck...)
                                There has been no changes recently to the REST API code? Did something change with your z-wave setup? Granted none of the commands I created have been tested with door locks so I can't say for certain how reliable it is when used with that sort of device.

                                Comment

                                Working...
                                X