Anyone got a line on this item? Would like to have icons represent the status (on/off), be able to tap them to change the status which would update Homeseer. I can write an event that will run a script to toggle the status so I can get basic on/off functionality now but the status reporting would be good. Would also like to poll variables and display the content.
Announcement
Collapse
No announcement yet.
XML HTTP RESTful API for HS3 - Discussion Thread
Collapse
X
-
Hate to keep posting the question but does anyone have an idea on how to implement the above? My office tablet runs a music visualizer and some widgets which I would hate to lose to have HSTouch running. Also I use Airbubble and would have to give that up for the HSTouch speaking event. I hear there is a way to have an android widget that will display a web page, maybe the answer is that and a custom page to display the items in question but that is exceeding my abilities (might play around with the HS3 Page builder by JON00)
Comment
-
Toggling in Tasker
[QUOTE=kideon;1126273]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.
It appears you've moved past this question to a more complex solution, but I thought I'd share how I got device toggle working in Tasker.
First off, my goal was to create toggles for my entertainment center and a few lights so they could be controlled by my new Android Wear smartwatch. I'm using Trigger on the watch to activate a Tasker task which sends an HTTP Get to the RESTful API to interface with HS3. It's working just as planned after 2-3 hours of tinkering.
I've seen a few posts from people who are taking a more complex approach, but my programming skills being what they are (I generally learn as I go ) I just took a logical approach in Tasker.
Since the latest version of the API adds the option to get current device status using (getdevicestatusvaluebyid), all I needed was an if-else to change the status. If the device is currently off, turn it on. Else turn it off. Easy, right? The problem I ran into was getting the device status into a variable. Tasker documentation claims the return value from an HTTP Get should be stored in HTTPR, but I was having trouble accessing it. So what I did to work around it was to store the return from the getdevicestatusvaluebyid call in an Output file. I then used READ FILE to transfer the value stored there into a variable (%Status in my case).
This introduced another problem, as the data saved in the file includes a trailing carriage return. To fix this, I run Variable Split on the new variable. I then used %Status1 as the test in my If-Else. If %Status1 matches on then turn light off, else turn light on.
As usual, I'm already coming up with ways to improve my work, but so far just the option of controlling things from my Android Wear device is pretty sweet. I hope this if this is no longer helpful to you, then at least someone else can avoid a bunch of trial and error, or having to reinvent the wheel.
WeaslyD
Comment
-
Originally posted by Phaeton View PostI have a problem with the API being in response. Sometimes it takes a second of ten before an event is triggered or a device is toggled. I tried to use jonoo aspx loader. But it doesn't help. Do you guys experience this as well?
Verstuurd vanaf mijn Nexus 5 met Tapatalk
Indeed, I experience the same delay issues. Sometimes the command is executed instantly, other times there is a delay of several seconds before a change occurs. I'm not sure which component to attribute the delay to, so troubleshooting will be a pain.
WeaslyD
Comment
-
Use with Tasker
Hello! I have a pretty straight forward question for you whiz people I currently want to use a post command from Android Tasker for NFC tag use. Could anyone explain how I would go about doing this.
http://User:Pass@MyIP:Port/HomeSeer_...1=56¶m2=on
the above code works perfectly in the browser but i cant figure out how to get it into tasker. the fields available are
SERVER:PORT
PATH
DATA/FILE
COOKIES
USER AGENT
CONTENT TYPE
OUTPUT FILE
Thanks!!!
Comment
-
Originally posted by weaslyd View PostIndeed, I experience the same delay issues. Sometimes the command is executed instantly, other times there is a delay of several seconds before a change occurs. I'm not sure which component to attribute the delay to, so troubleshooting will be a pain.
WeaslyD
Verstuurd vanaf mijn Nexus 5 met Tapatalk
Comment
-
Originally posted by Phaeton View PostI have a problem with the API being in response. Sometimes it takes a second of ten before an event is triggered or a device is toggled. I tried to use jonoo aspx loader. But it doesn't help. Do you guys experience this as well?
Verstuurd vanaf mijn Nexus 5 met Tapatalk
I am not 100% sure at this point what is causing it so rather not point fingers. But I believe it is the backend HS API Controls I am calling. As all my script does is essentially wrap them in a pretty container that makes them accessible via simple URL calls. It could also be something with the embedded IIS server (web core) they are using in HS3, but then again I never really see the HS3 control panel lag....
Comment
-
Version 1.2.0 Released!
Alright! Sorry for the long wait but the additions Gear added have now been released as version 1.2.0 on the official release thread located here: http://board.homeseer.com/showthread.php?t=163200
Version 1.2.0- This version is a community based update with large contributions from the user 'Geer/Gear'
- New Set Device Value by Name (Recommended for non light fixtures)
- New Set Device Value by ID (Recommended for non light fixtures)
- "GetDeviceStatusValueByName" and "GetDeviceStatusValueByID" should now allow getting and setting of the status of a device which doesn't have defined controls
- Additional HS logging added to a few functions
Enjoy!
Comment
-
Originally posted by TechFan View PostThanks for the email as well. I honk I can get the file uploaded to Zee, but it can't be an IIS backend, so we'll see.
Sent from my iPhone using Tapatalk
From the Zee FAQ:
Q: Is ASP.NET supported?
A: No, while it may run, it is too slow to be usable so it is not supported.
Comment
-
Originally posted by RedTechie View PostAlright! Sorry for the long wait but the additions Gear added have now been released as version 1.2.0 on the official release thread located here: http://board.homeseer.com/showthread.php?t=163200
Version 1.2.0- This version is a community based update with large contributions from the user 'Geer/Gear'
- New Set Device Value by Name (Recommended for non light fixtures)
- New Set Device Value by ID (Recommended for non light fixtures)
- "GetDeviceStatusValueByName" and "GetDeviceStatusValueByID" should now allow getting and setting of the status of a device which doesn't have defined controls
- Additional HS logging added to a few functions
Enjoy!
Code:RESTful-API '(virtual virtual gs3 presence)' has no controls. Add some controls or set value directly.
Is there anything we can do to get this to work?
Comment
-
Originally posted by Furious View PostSorry, sent you a PM before reading that I could post in this thread.
Code:RESTful-API '(virtual virtual gs3 presence)' has no controls. Add some controls or set value directly.
Is there anything we can do to get this to work?
The above function doesn't work at all. If I use SetDeviceByID, I can get it to work some of the time.....
Code:Aug-16 22:55:08 RESTful-API Device reference 149 has no controls. Add some controls or set value directly.
foreach (HomeSeerAPI.CAPI.CAPIControl objCAPIControl in hs.CAPIGetControl(deviceRef))
For some reason, this can vary - so either something is not being instantiated right, or the CAPI side is fluctuating for the device.....?
Comment
Comment