Anyone have an idea on how to setup the Templinc1625 (PowerLinc 1132B) to use in Indigo2021.1? I upgraded to the new Indigo and can't seem to use the AppleScript which needs to be converted to Python?
Mike
property tempLincNameHouseCodeMap : {¬
{"garageTemperature", "G"} ¬
}
<key>CFBundleDisplayName</key>
<string>My TempLinc</string>
<key>CFBundleIdentifier</key>
<string>com.pxzel.indigoplugin.templinc</string>
def x10CommandReceived(self, cmd):
self.debugLog(u"x10CommandReceived: \n" + str(cmd))
if cmd.cmdType == "x10" and cmd.x10Func == "preset dim":
houseCode = cmd.address[0]
deviceCode = int(cmd.address[1:])
presetVal = int(cmd.x10PresetVal)
varName = None
if houseCode == "A":
varName = u"homeTemperature"
elif houseCode == "B":
varName = u"mikeroomTemperature"
if varName is not None and deviceCode >= 11 and deviceCode <= 16:
varObj = indigo.variables[varName]
tempVal = -60 + 32 * (deviceCode - 11) + presetVal
indigo.variable.updateValue(varObj, str(tempVal))
indigo.server.log(u"received temp {} for {}".format(tempVal,varName))
pxzel wrote:Also I noticed in the code you sent.... is there a typo? ... "elif"?
indigo.x10.sendStatusRequest("A1")
indigo.x10.sendStatusRequest("B1")
Aug 21, 2021 at 12:33:09 PM
Schedule TempLinc Call
Sent X10 A1 status request
My TempLinc Debug x10CommandSent:
address : A1
avFunc : None
cmdSuccess : True
cmdType : x10
secCodeId : None
secFunc : None
x10DimBrightenVal : None
x10ExtendedData : None
x10Func : status request
x10PresetVal : None
Error timeout waiting for device Status Response
Sent X10 B1 status request
My TempLinc Debug x10CommandSent:
address : B1
avFunc : None
cmdSuccess : True
cmdType : x10
secCodeId : None
secFunc : None
x10DimBrightenVal : None
x10ExtendedData : None
x10Func : status request
x10PresetVal : None
Received X10 B15 preset dim val of 10
My TempLinc Debug x10CommandReceived:
address : B15
avFunc : None
cmdSuccess : True
cmdType : x10
secCodeId : None
secFunc : None
x10DimBrightenVal : None
x10ExtendedData : None
x10Func : preset dim
x10PresetVal : 10
My TempLinc received temp 78 for mikeroomTemperature
Error timeout waiting for device Status Response
# set the modules address (must send 3 times within 1 minute after unplugging and plugging back in):
indigo.x10.sendAddress("A1")
indigo.x10.sendAddress("A1")
indigo.x10.sendAddress("A1")
# set the modules operational mode:
indigo.x10.sendAddress("A1") # "Report on Change in Fahrenheit"
def x10CommandSent(self, cmd):
self.debugLog(u"x10CommandSent: \n" + str(cmd))
Users browsing this forum: No registered users and 7 guests