Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need help turning insteon device "off" with REST

Featured Replies

Posted

After a very painful process I finally got REST to change a status variable value in ISY

 

Program: c:\program files\internet explorer\iexplore.exe

Parameters: "http://admin:password@192.168.0.xx:9091/rest/vars/set/2/5/0"

 

I'm now trying to turn an insteon device off in ISY using REST

 

Program: c:\program files\internet explorer\iexplore.exe

Parameters: "http://admin:password@192.168.0.xx:9091/rest/nodes/xx xx xx 1/cmd/DOF"

 

Can anyone see why the command line doesn't work ?

I don't know how to directly turn a device off with a REST command.

 

But you can quite easily program the ISY to respond to the change in the variable (executed by REST) by programmatically creating an "off" command.

 

If
       $sTest is "x"

Then
       Set Scene 'Test Light' Off

Else
  - No Actions - (To add one, press 'Action')


  • Author
Without the actual Insteon device address hard to tell. No leading zeros 0A 0B 0C 1, should be A B C 1

 

No leading zeros: 17 A7 73 1

 

It's a insteon 2466S device, and I'm trying to turn the load off.

  • Author
What is the result?

 

What happens if the basic part of the REST command is entered into the IE command line?

 

For example: http://192.168.2.4/rest/nodes/15 B2 6A 1/cmd/DOF

 

<?xml version="1.0" encoding="UTF-8" ?>

-

200

The REST command was accepted. That suggests the issue is not REST but the ability of the ISY to control the specific device. Use the Admin Console to turn the device On and Off. The Admin Console uses the same Insteon commands as the REST DON and DOF requests.

 

Run Tools | Diagnostics | Event Viewer with Level 3 while the Admin Console On and Off commands (or the REST DOF) are being executed. If it is only an Off issue that is generally the load being controlled is generating interference when On to prevent the Off command from being received.

  • Author

Well I did some thinking and came within reach of victory but the ISY reacts oddly to my solution. Explanation is very difficult, but I'll do my best.

 

I use mControl for high level control of ISY. I finally realized that I don't need to create REST commands in mControl macros to turn insteon devices off and on, I can use built-in mControl "ISY Automation" commands. Turning insteon devices off and on now works like a charm. So I've solved my initial problem, but...........

 

I still need to use mControl macros to send REST commands to ISY state variables changing their values between 0 and 1. I use these ISY state variables to control whether or not programs held in ISY folders will run. Unfortunately, the ISY state variables stop being changable by the mControl REST commands if I manually turn a insteon device off, which was on. Strangely if I run the REST command line for changing ISY state variables directly from internet explorer, the ISY state variables change their value as instructed. The only way I've been able to get the mControl macros for changing the ISY state variable values working again is to reboot the computer hosting mControl.

 

I seem to have stumbled into a problem way beyond my expertise. I don't understand why IE command line always works but mControl macro with same command ( "http://admin:password@192.168.0.xx:9091/rest/vars/set/2/5/0") stops working.

Hi satwar,

 

I am so very sorry to hear. I think the problem is definitely in mControl software. Have you tried contacting their tech support?

 

In short - and the answer to your question - there should be no difference between issuing commands from mControl vs. IE or any other browser. Do you get any errors in mControl?

 

With kind regards,

Michel

  • Author

Okay, I finally got something to work.

 

I went back to my original plan of executing the device off command using REST in a mControl macro. It indeed does work :)

 

Also as long as I "manually" toggle the status of the Insteon devices using ISY, I have no problems.

 

Problems with mControl writing to the State Variable only occur if I use the mControl "ISY Automation" macros for "manually" toggling the status of the Insteon device.

 

Conclusion: Strange things can happen when you use mControl "ISY Automation" macros for devices that are also controlled by ISY programs

  • Author

Sorry, I spoke too soon, eventually IE seems to stop writing to the ISY REST interface. Is there an application that specializes in sending http urls to a server, that supports command line usage ?

Not sure what platform you are on but "wget" may be the answer for CLI usage.

 

-Xathros

  • Author
Not sure what platform you are on but "wget" may be the answer for CLI usage.

 

-Xathros

 

Wow, was that a great idea, seems to work well. Wget seems to be robust enough to carry on no matter what I throw at it.

 

Thank you :)

Happy to help.

 

-Xathros.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.