Announcement

Collapse
No announcement yet.

XML HTTP RESTful API for HS3 - Discussion Thread

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

  • codey
    replied
    I've started using this and I think it's awesome, I'm using it to get homeseer information onto my magic Mirror. I would like to read the value of a string of a device by id. Is this possible?

    Leave a comment:


  • davros
    replied
    Anyone know any updates on this?

    Leave a comment:


  • davros
    replied
    Originally posted by arthurmnev View Post
    The problems you describe below are due to buggy code.
    I'm doing a major refresh on this and will publish it in a few days.

    The code that I'll be posting will have much improved error handling, formatting, and major corrections to CAPI handling...
    Did this refresh ever get published?

    Leave a comment:


  • RedTechie
    replied
    Hey everyone!

    Sorry for no posts in a long while! Party to blame is this forum is also terrible at sending email notifications of replies! But to the point! I built this script out of the necessity to fix a problem I was having some years back and have encouraged people to adopt it and fork it if need be (Yes, probably buggy as some users have seen).

    But I just wanted to chime in on another reason I haven't continued development on this recently. HomeSeer now has an official JSON API: http://homeseer.com/support/homeseer..._with_json.htm

    It would be safe to say the new official JSON API is the best course of action for a real workable API for HS3 going forward now.
    Last edited by RedTechie; June 6, 2016, 09:50 PM.

    Leave a comment:


  • amp3d
    replied
    Originally posted by jon00 View Post
    Just interested why you are using Eventghost now you have Homeseer?
    Just thought I'd point out I figured out the JSON control through Eventghost, so I think you solved my problem for me! I appreciate it!

    Well, I'm an old vera user trying to make the transition. One of the the main reasons I purchased the vera years ago was to incorporate into my home theatre. Of course, I'm now starting extending the zwave usage beyond that, but the HTPC was my main goal.

    Vera had plugins that allowed for direct control of devices and events through eventghost. I haven't been able to find a direct HS3 plugin for Eventghost yet.

    I know there are some HS/Kodi plugins from spud which I have tried, but I really wanted the zwave fully integrated with other HTPC apps I may be running. With Eventghost, I can create htpc triggers, whether that be XBMC/KODI actions, or usenet downloads etc...and associate them with the HS3 devices/scenes.

    I must say, until you suggested the JSON option this morning, I was questioning whether or not HS3 was going to be too advanced for me! I'm really excited I got it working now via JSON and Python script!

    Thank you so much!

    If you know of even better ways to control hs3 devices then by all means let me know. But as of right now, this looks pretty streamline to me.

    I might see if I can make a simple EventGhost plugin that will make it even more streamline for others!

    Leave a comment:


  • jon00
    replied
    Just interested why you are using Eventghost now you have Homeseer?

    Leave a comment:


  • amp3d
    replied
    Originally posted by jon00 View Post
    Rather than reinstalling, do you have another PC you can put a trial of HS3 on to prove the concept?

    Also, have you looked at using JSON or ASCII commands which is built into Homeseer?

    http://homeseer.com/support/homeseer..._with_json.htm

    http://homeseer.com/support/homeseer...nk/default.htm
    Wow, I didn't even think of using JSON commands. I gave it a try, and JSON works great from within my web browser...unfortunately, I wasn't able to get it to work through Eventghost? The script in this thread however, seemed to work perfectly when called through a python script within eventghost.

    I'll do as you recommend installing the trial on another pc and go from there.

    You're so full of great ideas! Thanks! lol

    Leave a comment:


  • jon00
    replied
    Rather than reinstalling, do you have another PC you can put a trial of HS3 on to prove the concept?

    Also, have you looked at using JSON or ASCII commands which is built into Homeseer?

    http://homeseer.com/support/homeseer..._with_json.htm

    http://homeseer.com/support/homeseer...nk/default.htm

    Leave a comment:


  • amp3d
    replied
    Originally posted by jon00 View Post
    Are you running HS3 as a service? If so, this is the cause.

    I think I read somewhere that people have got ASPX pages to work as a service if you install HS3 into a drive root directory (i.e C:\HS3) rather than its default (Program Files (x86)\Homeseer HS3).
    Oh dear! I am running it as a service!
    Balls!

    You're right! Removing it as a service fixed the problem! Damn! What's the best way to move to the root? Reinstall?!

    Additionally though, anytime I try to send requests to list anything, such as devices or events, the web browser comes back with a blank screen. No info being displayed.

    I can activate events and devices though, and get the true or false info back...so not sure why I can't list devices this way :/

    Not a big deal, at least I can control them...but it would be nice to list em!
    Last edited by amp3d; January 17, 2016, 03:33 AM.

    Leave a comment:


  • jon00
    replied
    Are you running HS3 as a service? If so, this is the cause.

    I think I read somewhere that people have got ASPX pages to work as a service if you install HS3 into a drive root directory (i.e C:\HS3) rather than its default (Program Files (x86)\Homeseer HS3).

    Leave a comment:


  • amp3d
    replied
    Hey folks,
    I feel really dumb posting this, but I can't seem to get any of this to work on win10 for me.

    After running any command pointed at the aspx file, I get this response:

    Error Processing ASP.NET page: Object reference not set to an instance of an object.

    I'm sure it's something simple. Do I need to install something else on my computer to get this to work?

    Thanks

    Leave a comment:


  • arthurmnev
    replied
    The problems you describe below are due to buggy code.
    I'm doing a major refresh on this and will publish it in a few days.

    The code that I'll be posting will have much improved error handling, formatting, and major corrections to CAPI handling...



    Originally posted by Seer1001 View Post
    I have been working with the VERY COOL RESTful Script for just a few hours.
    My goal is to use tasker on my android phone to submit the get queries.
    For testing I am just using Chrome on a LAN computer.

    I can submit a string to the speaker client. - OK
    I can trigger an event in HS3 - OK
    I can set an INSTEON device by name ON/OFF/TOGGLE - OK

    I have a GlobalCache IR device
    Floor = GlobalCache IR
    Room = UltraGCIR3 Plugin
    Device name = Computer Room AV IR Module 2:2
    Command = POWER TOGGLE

    PHP Code:
    http://nnn.nnn.nnn.nnn:81/Homeseer_REST_API.aspx?function=setdevicebyname&param1=GlobalCache%20IR%20UltraGCIR3%20Plugin%20Computer%20Room%20AV%20IR%20Module%202%3A2&param2=POWER%20TOGGLE 
    Does not work.
    What is really weird is this URL triggers a download of the script???? in chrome.
    Not sure if I am doing something wrong or if the script does not work with
    GlobalCache IR devices.

    I have a virtual device
    Floor = General
    Room = General
    Device name = Car Home
    2 Controls = Car is Away, Car is Home

    PHP Code:
    http://nnn.nnn.nnn.nnn:81/Homeseer_REST_API.aspx?function=setdevicebyname&param1=General%20General%20Car%20Home&param2=Car%20is%20Away 
    This controls the device but returns ALL_Failed in the browser


    PHP Code:
    http://nnn.nnn.nnn.nnn:81/Homeseer_REST_API.aspx?function=setdevicebyname&param1=General%20General%20Car%20Home&param2=Car%20is%20Home 
    This controls the device and returns All_Success in the browser

    Can anyone shed some light on this problem?

    Thanks
    Tom

    Leave a comment:


  • bigbrorpi
    replied
    hmatos - I've experienced the same issue, and it seems to be that the web server running for HS3 on Linux doesn't want to compile C# code for ASP, though VB works fine. Did you ever have any luck with this?

    Leave a comment:


  • Jingoro
    replied
    The RESTful API development might be orphaned; the creator, RedTechie, hasn't been active on these boards since September 2014.

    Leave a comment:


  • hmatos
    replied
    Error on Linux

    Hi,

    I've used this PI on my Win7/HomeSeer system and I'm in the process of migrating to Ubuntu 14.04.2 LTS x64. Is this plugin suppose to work under Linux? I'm getting the following error:

    System.Web.Compilation.CompilationException
    : Unhandled Exception:
    Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
    Details: : Unhandled Exception:
    Error origin: Compiler
    Error source file: /HomeSeer_REST_API.aspx
    Exception stack trace:
    at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] in <filename unknown>:0
    at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0
    at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0
    at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0


    Thanks for your help!

    Leave a comment:

Working...
X