espenhogbakk / homeseer-jsonapi Goto Github PK
View Code? Open in Web Editor NEWSimple plugin for HomeSeer HS2 that provides a simple API that returns JSON data.
Simple plugin for HomeSeer HS2 that provides a simple API that returns JSON data.
The ShowRoom method leave a comma after each itteration. Trying to parse this json data from Jquery it fails due to the json not following strict standards.
I fixed it in my local copy by only adding the commas before the ShowDevice(id) call only if it's not the first time through the iteration.
I'm very new to this, but I was wondering if someone knows how to add a command/plugin to SiriProxy to use this jsonapi.asp file to show status of devices?
I would basically just ask "what's the status of the kitchen light" and she would answer back with on or off. I was hoping to use this asp file, but I'm not sure how to send requests or what format they should be in?
I have managed to get SiriProxy working and using another plugin to actually control lights and such. But I would love to be able to get the status.
I have already copied the asp file to my html folder in Homeseer, and when I browse to that I get a blank page, I assume I have to send some extra info like GetDevice(A1) but I'm not sure what format and or punctuation to send that request.
I also have this method working(see link) where I install tenHsServer on Homeseer.
https://github.com/espenhogbakk/siriproxy-homeseer
So I can browse to http://10.10.10.10/tenHsServer/tenHsServer.aspx?t=ab&f=GetDevice&d=K8
it shows this K8:Living room:Living Room Lights:Lamp Module w Status:0:LIGHTS:True:2:100::641::2/26/2013 11.12.44 AM;
Any way to get something similar from your asp file and parse it to return it verbally via Siri?
I have been looking at other files such as the RadioThermostat plugin I am using and I can see what they are doing, but I'm not sure how to implement that using Homeseer.
I also looked at this https://github.com/Deanmv/SiriProxy-GithubStatus/blob/master/lib/siriproxy-Git.rb
And I'm thinking I could do something similar, but instead of Github status, I could get individual device status.
listen_for /The hubs current status/i do
page = HTTParty.get('https://status.github.com/api/status.json').body rescue nil
reply = JSON.parse(page) rescue nil
say "The status of github is currently #{reply["status"]}"
request_completed
end
I know that this is a huge long shot. I was wondering if it was possible to modify this to allow execution of a script with parameters? I still have HS2 running as it talks to my whole house audio system with a lot of custom code that I wrote, and can't be bothered to move over to HS4. So I am have been using this JSONAPI to set values - and it works great. I am assuming there must be some limitation preventing the ability to run a script - or it would have been included originally. But you never know? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.