I now have this working but I have had better days at the dentist than trying to sort this out, hats off to those that write these plugin's for us, especially Nick who I borrowed 99% of his plugin from.
CliveS
I am slowly (and possibly very badly) trying to rework the IP9258.plugin by @NickSmith to work with the
Aviosys IP9258S, IP9258HP 4 port switches and the IP9258SD 8 port switch but am stuck
trying to set the PDU Outlet to either 4 or 8 depending on the Power Strip Model.
The python code at present works but I would like to be able to change the 8 for a 4 when the
4 Port switches are chosen.
My grasp of Python is “beginner” but learn by example !!, so any help would be appreciated.
- ########################################
def validateDeviceConfigUi(self, valuesDict, typeId, devId):
# validate supplied values
outletNum = int(valuesDict["outlet"])
if outletNum < 1 or outletNum > 8:
self.errorLog(u"Error: Outlet \"%s\" must be between 1 & 8 " % str(outletNum))
errorDict = indigo.Dict()
errorDict["outlet"] = "The value of this field must be between 1 & 8"
return (False, valuesDict, errorDict)
else:
return True
########################################