Setup Templinc1625 (PowerLinc 1132B) to use in Indigo2021.1

Posted on
Tue Aug 17, 2021 12:25 pm
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Setup Templinc1625 (PowerLinc 1132B) to use in Indigo2021.1

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

Posted on
Wed Aug 18, 2021 1:51 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

Hi Mike,

So you were using the old templinc attachment.scpt file in the Attachments folder? If so what do these lines look like in the old file?

Code: Select all
property tempLincNameHouseCodeMap : {¬
   {"garageTemperature", "G"} ¬
      }

The two solutions to this would be to either replace the TempLinc with a newer modules (we highly recommend Z-Wave for sensors), or to modify the Example INSTEON/X10 Listener Plugin.indigoPlugin plugin that is included as part of the SDK download. The former would be the more future proof solution (Z-Wave is much more reliable than X10, especially for sensor type modules) but if you'd like to continue using the TempLinc we can help you modify that example plugin to perform the same basic logic as the TempLinc attachment script. If that is what you want to do then go ahead and install that example plugin and answer my question above about the tempLincNameHouseCodeMap values and we can help out.

Image

Posted on
Wed Aug 18, 2021 5:02 pm
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

Thanks for the quick reply. Here is my info for the devices:

property tempLincNameHouseCodeMap : {¬
{"homeTemperature", "A"}, ¬
{"mikeroomTemperature", "B"} ¬
}

Yeah, I have a few Zwave devices with temp settings... but lets see if we can get this to work... hate to toss them if they can work.

Thanks,

Mike

Posted on
Fri Aug 20, 2021 3:53 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

Okay, let's try the following steps:

1) Download the SDK.

2) Duplicate the Example INSTEON/X10 Listener.indigoPlugin, and rename it My TempLinc Plugin.indigoPlugin.

3) Using a raw Text Editor app (BBEdit free version if you don't have one), edit the file Contents/Info.plist by changing these lines:

Code: Select all
   <key>CFBundleDisplayName</key>
   <string>My TempLinc</string>
   <key>CFBundleIdentifier</key>
   <string>com.pxzel.indigoplugin.templinc</string>

4) Then edit the Contents/Server Plugin/plugin.py file by replacing the entire x10CommandReceived method with:

Code: Select all
   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))

5) Save everything (be sure and copy/paste the edits directly in -- the indent formatting is important in Python), then double-click on the plugin to install it into Indigo and enable it.

Image

Posted on
Fri Aug 20, 2021 4:54 pm
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

OK, replaced the code in the plugin and activated it.

What is next?

Will I see some form of action that I can activate after creating a new schedule?

Mike

Posted on
Fri Aug 20, 2021 6:07 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

No, as your TempLinc sends X10 commands it will catch them and update your Indigo variables (homeTemperature and mikeroomTemperature). It works like the AppleScript. It'll log the commands as it sees them (like the AppleScript did).

Image

Posted on
Sat Aug 21, 2021 8:16 am
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

I'm seeing a lot of these in the log from different devices, but nothing from my Templincs:

'2021-08-21 03:52:26.592 Received INSTEON "Front Door" off (heartbeat)
2021-08-21 03:52:26.597 My TempLinc Debug insteonCommandReceived:
ackValue : 0
address : 32.89.3A
cmdBytes : [19, 0]
cmdFunc : off
cmdScene : 4
cmdSuccess : True
cmdValue : None
replyBytes : []

Is there a way to test if my Templincs are even working? How to reset or upload new house codes/variables? Start fresh... without using AppleScript like when I first set them up a few years back?

Also I noticed in the code you sent.... is there a typo?:

varName = None
if houseCode == "A":
varName = u"homeTemperature"
elif houseCode == "B":
varName = u"mikeroomTemperature"

"elif"?

Posted on
Sat Aug 21, 2021 11:20 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

pxzel wrote:
Also I noticed in the code you sent.... is there a typo? ... "elif"?

That is the correct syntax for a Python else if conditional.

You probably have a schedule item or two that is sending the status request to the TempLincs using the old AppleScript (by calling RequestTempLincStatus). Those need to be modified to not use AppleScript. Change the actions on those Schedules to instead execute an embedded Python script by choosing Type of Server Actions->Script and File Actions->Execute Script. The embedded scripts to copy/paste in will look like:

Code: Select all
indigo.x10.sendStatusRequest("A1")

and:

Code: Select all
indigo.x10.sendStatusRequest("B1")


You can manually press the Execute Actions Only button in the Main window for the updated Schedules to see if they work.

Image

Posted on
Sat Aug 21, 2021 11:40 am
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

OK, cool. Its working!

Looks like one of my Templinc devices is not working. I'll have to troubleshoot (the hardware may have failed)

Not sure why I'm getting the "Error - timeout waiting for device Status Response" for the one that is working (bottom line)?:

Code: Select all
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

Posted on
Sat Aug 21, 2021 2:11 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

Yeah, your house code A / homeTemperature TempLinc isn't replying. You can try plugging it into the same outlet / power strip as the PowerLinc to see if it is a signal problem or not.

I looked into the error you are seeing in the Event Log. It is occurring because the TempLinc doesn't reply with an expected "status on" or "status off" message but instead replies with a preset dim response (which gets decoded into a temperature). I'm not sure when we introduced that behavior (the log of the error) but I believe it would have occurred as well with the AppleScript technique. For now just ignore the error since it is benign – from the flow of the code there isn't a way for us to change the Plugin or Script to prevent the error logging. I've modified the Indigo Server so in the next version it will at least be flagged as just a warning instead of an error.

Image

Posted on
Sat Aug 21, 2021 3:11 pm
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

Ok. Testing the unresponsive templinc. Would like to reload my initial setup variables. How would I go about resending them (now that I can’t use AppleScript)

Appreciate all your help!

Posted on
Sat Aug 21, 2021 3:50 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

You'll need to look at the TempLinc manual and figure out what X10 commands to send for the settings you want (see the Programming section of the manual). You can then create an Action Group that executes an embedded python script (similar to your Schedules) to send the sequence of commands you want. It'll look something like:

Code: Select all
#  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"

Image

Posted on
Sat Aug 21, 2021 4:57 pm
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

Unplugged my other known working Templinc from outlet. Plugged in suspect Templinc into same outlet.

Ran this:
# 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"

Log displayed:

Action Group Templinc
Sent X10 address A1
My TempLinc Error Error in plugin execution ReceivedBroadcast:

Traceback (most recent call last):
File "plugin.py", line 62, in x10CommandSent
StandardError: LowLevelBadParameterError -- undefined function code 1000

Sent X10 address A1
My TempLinc Error Error in plugin execution ReceivedBroadcast:

Traceback (most recent call last):
File "plugin.py", line 62, in x10CommandSent
StandardError: LowLevelBadParameterError -- undefined function code 1000

Sent X10 address A1
My TempLinc Error Error in plugin execution ReceivedBroadcast:

Traceback (most recent call last):
File "plugin.py", line 62, in x10CommandSent
StandardError: LowLevelBadParameterError -- undefined function code 1000

Sent X10 address A1
My TempLinc Error Error in plugin execution ReceivedBroadcast:

Traceback (most recent call last):
File "plugin.py", line 62, in x10CommandSent
StandardError: LowLevelBadParameterError -- undefined function code 1000


Does that mean that the suspect Templinc isn't seen within Indigo, therefore non working? Not sure about the meaning of log errors.

Posted on
Sat Aug 21, 2021 5:29 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

That is a buglet in Indigo's ability to log the sent command, which your plugin is trying to do. To get rid of it just delete this method completely from your plugin (it isn't needed):

Code: Select all
   def x10CommandSent(self, cmd):
      self.debugLog(u"x10CommandSent: \n" + str(cmd))

Then restart the plugin.

Note the TempLinc won't respond at all to the commands to program it. So there isn't a way to immediately tell if it is working until you send it a request command (in your Schedule) to see if/how it responds. The entire process is pretty error prone. I cannot recommend Z-Wave multisensors enough over legacy X10 modules. :wink:

Image

Posted on
Sat Aug 21, 2021 6:18 pm
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Setup Templinc1625 (PowerLinc 1132B) to use in Indigo202

Ok. I at least got one of them to work... I think the other Templinc has hardware failure.
Thanks for all your help.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests