Jump to content

Is there a way to inhibit the REST interface response


Recommended Posts

Posted

So I've ported my old ISY to a new eISY and I can remote operate that through the app so that's all good.

 

I've taken my old ISY994 and installed it at a summer cottage.  I'd like to control it - only locally - through a browser (Chrome) via the REST interface.  I created a bunch of bookmarks that turn devices on and off and that all works great.  The only thing is that every time I make a REST call I get back an XML response.  I don't want that response back.  For myself it doesn't matter but for WAF it does.

Is there a straightforward way to do this?  I've done it in the past by using HTTP Gets on a Java based web page that I wrote for that purpose but I'm currently hosting my home web page where I don't have Java server support.

 

Thanks!

 

  • Like 1
Posted

You don't need Java server. Write a local HTML page with buttons hooked to javacript functions to make the REST calls. The javascript can ignore the reply from the REST calls. Add one bookmark to the local HTML page and just use the buttons on it to control the devices.

  • 1 month later...
Posted

Hi 

So I finally got around to trying this.  I'm in a new home now so the 20 years of tweaking I've done at my last home are a memory :-(

I've got a much smaller place now so I put my 994i in here - the eISY is at the old place.  

I figured I would just use the built in web server on the ISY to make the calls but for the life of me I can't remember the format of the get or post/put command to send a REST interface call.  Could I impose on you (or another kind reader) to remind me?

Thanks

Posted

Well - I've gone through all the SDKs and documentation but can't seem to find what I'm looking for.  Many moons ago I had written a custom web page that sent HTTP Get requests directly to the ISY to turn things on and off.  I fashioned it after some code that I found here (which I can't find now).  I remember I shared it with MWareman way back then too

That code, unfortunately, was on my QNAP which got hit by Qlocker a year or two ago and was lost.  

I gave up programming long ago so what I always have to do is find some working code, study it till I figure out how it works and then integrate it into something that I understand.  Without a starting point these days I'm hopelessly lost. 

Sooooo.... if anyone can show me a snippet of Java code that will make the rest calls for me I would be deeply appreciative.  Once I see the format I can take it from there.

 

TIA

 

  • Like 1
Posted
41 minutes ago, MarkJames said:

I fashioned it after some code that I found here (which I can't find now). 

Try a Google Site Search for old posts. Once they are archived they don’t show up in the forum search results. Just type this in ther search bar (adding your search term to the end):  site: https://forum.universal-devices.com

Might find old posts about it if they were public. 

  • 7 months later...
Posted

@MarkJames

@Goose66

Mark - I, too, couldn't figure out how to make a rest call without the XML response.

With thanks to Goose for sending me down the right path, I created a simple HTML page with javascript - simple, but it took me a month to figure it out (just this morning!).

In the attached (open with Notepad), I'm setting State Variable #23 to either 44 or 29.  I then have a program to run when the number changes.

You will need to insert your own ISY link and Admin Console UserID:Password as appropriate.  The onclick and function must be the same in their respective sections.

This only will work when on your local network; however, a different ISY link probably can be used so it works remotely - I haven't tested it (log into the portal. Select Tool > Information > ISY Information. Copy the long URL.  LONGURL/rest/vars/set/...).  The credentials would be your portal login, not your ISY credentials.

Please let me know if you have any questions,

Ross

Rest Inhibitor.html

Posted

Fantastic work!

 

Thanks for this.

 

I'm away from home for a few weeks but I'll implement this when I get home.  I have some old iPads kicking around that won't run UDMobile but I can at least run the switching in a browser window and get some life out of them.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...