Plugin Error with RFXtrx315

Posted on
Sat Nov 09, 2013 1:13 pm
tpthaler offline
Posts: 13
Joined: Oct 20, 2013

Plugin Error with RFXtrx315

Hello,

I just received my RFXtrx315 that I will be using for decoding/integrating with my Visonic security system. I temporarily disabled my RFXtrx433 just to make sure there were not any issues due to running both at the same time.

Anyways, when I use RFXCom's manager windows (test) program, I am able to decode and see my sensors just fine. But when I try seeing them in Indigo I get the following error (triggered after a sensor transmits):


Traceback (most recent call last):
File "plugin.py", line 224, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/RFXCOM.indigoPlugin/Contents/Server Plugin/RFXTRX.py", line 1687, in startComm
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/RFXCOM.indigoPlugin/Contents/Server Plugin/RFXTRX.py", line 426, in processPacket
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/RFXCOM.indigoPlugin/Contents/Server Plugin/RFXTRX.py", line 559, in handleSecurity
<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xe2 in position 37: ordinal not in range(128)

RFXCOM Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
RFXCOM Debug runConcurrentThread called
RFXCOM Debug startComm called


I am using the latest version of Indigo (6.0.4) and the latest version of the plugin (1.3.6).

Posted on
Sat Nov 09, 2013 1:56 pm
tpthaler offline
Posts: 13
Joined: Oct 20, 2013

Re: Plugin Error with RFXtrx315

I'm starting to try to debug this problem, and so far I can see that this line of code is causing the issue:

Code: Select all
self.plugin.debugLog(u"Security sensor %d of type %s (%s) has status %s (%s)" % (sensor, subtype, device, status, stattext))


And more specifically, the variable (device) is causing the error...

Posted on
Sat Nov 09, 2013 2:05 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Plugin Error with RFXtrx315

Try this:

Code: Select all
self.plugin.debugLog(u"Security sensor %d of type %s (%s) has status %s (%s)" % (sensor, subtype, unicode(device), status, stattext))

Image

Posted on
Sat Nov 09, 2013 2:10 pm
tpthaler offline
Posts: 13
Joined: Oct 20, 2013

Re: Plugin Error with RFXtrx315

Found the bug:

Code: Select all
device="Visonic PowerCode door/window sensor – primary contact (with alive packets)"


You can't have the '-' in the string text... This also shows up in other places in the code that my devices haven't entered yet...

Posted on
Sat Nov 09, 2013 2:11 pm
tpthaler offline
Posts: 13
Joined: Oct 20, 2013

Re: Plugin Error with RFXtrx315

matt (support) wrote:
Try this:

Code: Select all
self.plugin.debugLog(u"Security sensor %d of type %s (%s) has status %s (%s)" % (sensor, subtype, unicode(device), status, stattext))


That didn't work, but if I changed the device set to a '-' using my keyboard and re-saving it also worked...

Sorry, I have never programmed in python before, so when I think I "fix" things, I really don't know what I am doing other than using my 20+ years of java / other coding experience as a crutch.
Last edited by tpthaler on Sat Nov 09, 2013 2:15 pm, edited 1 time in total.

Posted on
Sat Nov 09, 2013 2:13 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Plugin Error with RFXtrx315

Note a traditional minus character shouldn't cause the error, so it is probably a special hyphen or dash character.

Image

Posted on
Sat Nov 09, 2013 2:16 pm
tpthaler offline
Posts: 13
Joined: Oct 20, 2013

Re: Plugin Error with RFXtrx315

matt (support) wrote:
Note a traditional minus character shouldn't cause the error, so it is probably a special hyphen or dash character.


see above (must have been a euro '-' key or something)...

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests