AlertMe API
1 1

11 posts in this topic

For everyone's reference and enrichment, here is the AlertMe API documentation that we have been working off of in the Tasker threads.  This is the document that lwalker originally found and posted on the myeyesoniris forum.

 

While using this document, keep in mind that this is a completely unofficial route to controlling your Iris installation.  Lowe's will not provide support for anything you do with this, and in all likelyhood they will eventually make changes to the API that may break things you have set up and render this document obsolete.  As long as those caveats are acceptable, feel free to dive in and check it out.

IrisApi_v5.zip

Share this post


Link to post
Share on other sites

Question. When sending userid over how do you make it work.

 

Example PUT to: /v5/users/:userId/widgets/alarm/mode

 

if userId is 1234 then would it go to  /v5/users/1234/widgets/alarm/mode

 

I keep getting REQUEST_FORBIDDEN

 

Also, I am sending ApiSession as a cookie. And f course /v5/login works great.

 

Let me know, thanks! I will keep testing.

 

EDIT: After some testing, i found out you need to use the userName and not the userId. not sure why the docs said userId.

Share this post


Link to post
Share on other sites

Does anyone have a more up-to-date set of documentation available? I'm trying to configure the API to control my water shut-off valve, but I haven't been able to figure out the correct way to interface with it, yet. It's a fairly new device for the Iris lineup, so I think it might be supported in the API, just not documented with the file above. I tried going to https://api.irissmarthome.com/v5/docsbut I get an "authentication required" popup. I obviously don't have a username and password to view the document, but am curious if anyone does have that information.

Share this post


Link to post
Share on other sites

Guys, I am building a Ruby Gem to interact with Iris.

 

So far all it does is login :) But new stuff will come.

 

#!/usr/bin/env ruby


require "pp"
require "lowes-iris"


iris = LowesIris.new({
  "username" => "xxxx",
  "password" => "xxxx",
  "debug" => "on"
})

You will eventually be able to do everything the API allows via script.

Share this post


Link to post
Share on other sites

Okay how do I set the cookie after I get the API session key? I am doing this but it isn't working.

        if (http_method =~ /^get$/i)
            req = Net::HTTP::Get.new(uri.request_uri)
            req["Cookie"] = self.session_key if self.session_key

This code says, set the Cookie header to the ApiSession received during login if it exists. But I am getting back 401 Unauthorized.

 

I dumped the request and it looks correct

[Debug] executing method: login
[Debug] fetching https://api.irissmarthome.com/v5/login
[Debug] executing method: user_info
{"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"], "accept"=>["*/*"], "user-agent"=>["Ruby"], "cookie"=>["14edf8a942da07f43f84601a97b042c3"]}
[Debug] fetching https://api.irissmarthome.com/v5/users/:gdanko
non-200 (401) code received from iris: NOT_AUTHORIZED

Share this post


Link to post
Share on other sites

Okay I figured out how to send the ApiSession key as the cookie. I am getting a new error. 404!?

 

[gdanko@SDGL13fe1b94d ~]$ ./iristest.rb
[Debug] executing method: login
[Debug] fetching https://api.irissmarthome.com/v5/login
[Debug] executing method: user_info
{"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"], "accept"=>["*/*"], "user-agent"=>["Ruby"], "cookie"=>["ApiSession=bcf66fb3f8d50b401bc5a82689dc3265"]}
[Debug] fetching https://api.irissmarthome.com/v5/users/:gdanko
{"error"=>{"reason"=>"NON_EXISTENT_CALL_OR_INVALID_VARIABLES_WITHIN_URI"}}
non-200 (404) code received from iris: NON_EXISTENT_CALL_OR_INVALID_VARIABLES_WITHIN_URI

SOLVED. It is /users/<username> not /users/:<username>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

1 1