Omit Certain Insteon Devices When Using All Off command

This forum is for generic questions about devices. Note: if your question is specific to a Z-Wave, INSTEON, Virtual, or X10 device, please use the correct sub forum from the Built-in Interfaces/Technologies section.
Midnightsun
Posts: 44
Joined: Sat May 21, 2011 5:02 am

Omit Certain Insteon Devices When Using All Off command

Post by Midnightsun »

Our wifi router is in a rather inaccessible area and have decided to install an insteon outlet module in order to reboot manually as required however I do not want it to switch the wifi router to off when the all off command is sent.
Is there an easy way of not sending an off command to an insteon wall plug or any other module for that matter when all off is used?
ryanbuckner
Posts: 1108
Joined: Sat Oct 08, 2011 12:33 pm
Location: Northern Virginia
Contact:

Re: Omit Certain Insteon Devices When Using All Off command

Post by ryanbuckner »

The only way I know is with a python script. Cycle through all the Insteon devices and turn them off, but add a clause to skip that one by name or device id.

Here's an example of the script I use to save the on/brightness state for each of the switches and dimmers, which you'll have to modify to turn off instead

Code: Select all

##########################################################################
# Take the snapshot 

import json 

relList = []
dimList = []

# cycle through devices and save the state values of relays and dimmers
for device in indigo.devices.iter("indigo.relay, indigo.dimmer"):
	if device.pluginId != "com.perceptiveautomation.indigoplugin.devicecollection" and device.pluginId != "com.ryanbuckner.indigoplugin.samsungtv" and device.pluginId != "com.flyingdiver.indigoplugin.bondhome" and device.enabled:
		if (isinstance(device, indigo.DimmerDevice)):
			dimList.append({'id': device.id, 'name': device.name, 'brightness': device.brightness })
		else:
			relList.append({'id': device.id, 'name': device.name, 'state': device.onState })

# save the dimmer list to a variable
indigo.variable.updateValue(1322749870, value=json.dumps(dimList))

# save the relay list to a variable
indigo.variable.updateValue(581444171, value=json.dumps(relList))

# log success
indigo.server.log("Snapshot captured")


User avatar
jay (support)
Site Admin
Posts: 18420
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Omit Certain Insteon Devices When Using All Off command

Post by jay (support) »

I think the easiest way of doing this is to create a Device Group (in the Virtual Devices interface) which contain all devices that you want to control all at once. Then just turn that group on/off as necessary.

FYI, the built-in all on/all off actions only work on X10 and Insteon devices so you should use this approach if you have devices using other technologies (i.e. Z-Wave, etc).
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
Midnightsun
Posts: 44
Joined: Sat May 21, 2011 5:02 am

Re: Omit Certain Insteon Devices When Using All Off command

Post by Midnightsun »

I have been using an "Action Group" I created called all/off and putting everything in there that I want turned off and omitting those I want to stay on. This works well but I was hoping I was overlooking something that would be easier. Thanks for the input everyone.
Post Reply

Return to “Devices”