First Run Information

Posted on
Mon Apr 16, 2012 4:46 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

First Run Information

Hey Robert - just got my RFXrec433 and thought I'd share my initial experience. Here's the log (after plugging the RFXrec in and double-clicking on your plugin):

Code: Select all
Apr 16, 2012 5:22:57 PM
  Installing and enabling plugin "RFX TRX By RdK" v1.0.0
  Loading plugin "RFX TRX By RdK 1.0.0"
  Starting plugin "RFX TRX By RdK 1.0.0" (pid 25467)
  Plugin "RFX TRX By RdK" connected
  Plugin "RFX TRX By RdK 1.0.0" started
  RFX TRX By RdK Debug            RFXTRX startup called
  RFX TRX By RdK Debug            startup called
  RFX TRX By RdK Debug            runConcurrentThread called
  RFX TRX By RdK Debug            startComm called
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            Reinitialize
  RFX TRX By RdK Error            Error in plugin execution UiAction:

Traceback (most recent call last):
  File "plugin.py", line 233, in inptest
  File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/RFXTRX_RDK.indigoPlugin/Contents/Server Plugin/RFXTRX.py", line 781, in inptest
<type 'exceptions.KeyError'>: key tstValue not found in dict

  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK Debug            Error reading plugin configuration. (happens on very first launch)
  RFX TRX By RdK Debug            validating Prefs called
  RFX TRX By RdK Debug            getConfiguration start
  RFX TRX By RdK                  Initializing communication on port /dev/cu.usbserial-A4VCXOCG at speed 38400


Not sure what that exception is but it looks like it's gone past that - it may be some config value that you're assuming is there but isn't on first run. I don't have my sensors ready to test yet (I'll do that this week) but here are some initial thoughts:

  • The North American version is called the RFXrec433 - so the plugin's name is a bit misleading - maybe "RFXtrx/RFXrec" would be more accurate? I'd be sure and be consistent so that everywhere you refer to it (plugin name, label field at the top of the dialog, etc) it's the same.
  • I'm sure it's on your to do list, but help docs? I have no idea what to do with several of the configuration options. For instance, is the baud rate field really necessary? Isn't that pretty much fixed in the hardware?
  • The "Test" button doesn't appear to do anything - if it's only for internal usage then you might want to at least throw a message in the event log saying as much.
  • Typo: "uknown" should be "unknown" in the second to last checkbox.
  • I have 3 Oregon Scientific sensors (PCR800, THGN801, WGR800) that I'm going to be testing with. When I get ready to do that, what would I enter in the "Sensor:" field when defining those devices? And how would I get the RFXrec to "see" them?

Thanks - I look forward to digging more into it later this week.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Apr 19, 2012 10:53 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: First Run Information

Robert, not sure if you missed the question in the post above, but I'm ready to test the Oregon Scientific sensors I have but I'm unclear what I'm supposed to enter for the "Sensor" field in the device dialog - can you help?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Apr 21, 2012 4:02 am
boekweg offline
Posts: 70
Joined: Oct 02, 2010
Location: Netherlands

Re: First Run Information

Hi Robert,

I have the same experience. I installed the RFXTRX433 and installed the driver on a macmini running Indigo 5 pro.
I have the same log items as Jay. Any ideas ?

21 apr 2012 11:57:40
Enabling plugin "RFX TRX By RdK 1.0.0"
Starting plugin "RFX TRX By RdK 1.0.0" (pid 47726)
Plugin "RFX TRX By RdK" connected
Plugin "RFX TRX By RdK 1.0.0" started
RFX TRX By RdK Debug RFXTRX startup called
RFX TRX By RdK Debug startup called
RFX TRX By RdK Debug runConcurrentThread called
RFX TRX By RdK Debug startComm called
RFX TRX By RdK Debug getConfiguration start
RFX TRX By RdK Debug Error reading plugin configuration. (happens on very first launch)
RFX TRX By RdK Debug getConfiguration start
RFX TRX By RdK Debug Error reading plugin configuration. (happens on very first launch)

Hope to hear from you soon.

Groeten Paul Boekweg

Posted on
Sat Apr 21, 2012 4:57 am
boekweg offline
Posts: 70
Joined: Oct 02, 2010
Location: Netherlands

Re: First Run Information

Ok I found it. I was my fault by having two RF interfaces configured on the same serial bus.
I put the RFXtranceiver on a different serial address and it works well now. I have tested with klikaanklikuit remote and in debug mode (from the RFX plugin enabled) you can see the address in the event log of Indigo.
Use this address to create a new device and your ready to work with this device.

Works great !

Thanks for the plugin Robert, I will now be able to get temp and hum etc into Indigo as well.

regards/groeten Paul Boekweg

Posted on
Sat Apr 21, 2012 8:09 am
RJdeKok offline
Posts: 125
Joined: Mar 27, 2012

Re: First Run Information

Hi Jay,

A little late, but I was on holiday last week...
- I guess the exception occurred because you pressed the test button before saving the configuration.
- I'm going to change the name in the next version.
- to get rid off the message 'Error reading plugin configuration. (happens on very first launch)' you have to set the configuration parameters once.
- You're right, the baud rate is 38400 fixed, it will disappear in the next version.
- Help files are always on my list.... it has to be done but...
- The test button simulates receiving a sensor. You can put a hex string in the field test value. By pressing the test button the plugin receives the string.
one annoying disadvantage: you have to save the configuration before the test button knows the right test value. Do you have a solution for me?
- Uknown is changed in unknown
- If you turn on 'Display unknown sensor as error' in the configuration' you will see something in the log like:
RFX TRX By RdK Debug Processing data 8 80 5 2 91 0 0 110 105 (085005025b00006e69)
RFX TRX By RdK Debug Temp sensor 91 now 11 degrees and 0 humidity.
RFX TRX By RdK Error Unknown device detected (id = 91, type = 80)
So the ID of this oregon sensor is 91 and it knows temperature an no humidity.

I hope this makes it more clear.

Posted on
Sat Apr 21, 2012 11:10 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: First Run Information

RJdeKok wrote:
- The test button simulates receiving a sensor. You can put a hex string in the field test value. By pressing the test button the plugin receives the string.
one annoying disadvantage: you have to save the configuration before the test button knows the right test value. Do you have a solution for me?


Here's what I would do:

  1. Throw an error into the event log when the button can't do what it needs to do because of missing data.
  2. Since we pass all the dialog data to the method that the button calls (regardless of whether it's been saved or validated yet), you might be able to perform the action, right? So the only thing you need to check for is invalid configuration data - in which case you do #1 above.
  3. Last resort hide the button until the config data you need is available.

You have to look at the life cycle of each of the dialogs to make sure that you're handling all the possibilities - specifically, creation and updating since the existing values in each case will likely be different.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Apr 21, 2012 11:20 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: First Run Information

RJdeKok wrote:
- If you turn on 'Display unknown sensor as error' in the configuration' you will see something in the log like:
RFX TRX By RdK Debug Processing data 8 80 5 2 91 0 0 110 105 (085005025b00006e69)
RFX TRX By RdK Debug Temp sensor 91 now 11 degrees and 0 humidity.
RFX TRX By RdK Error Unknown device detected (id = 91, type = 80)
So the ID of this oregon sensor is 91 and it knows temperature an no humidity.


I'm assuming that at some point you'll have documented what the types are - since the user may not be sure of the exact capabilities of the sensor and may not know what type to select.

Here's a thought - what if you provided a menu item that would scan for undefined devices (or maybe you already know about them from the other comm you're doing so you just keep a running list every time you see one) and build an internal list of devices that the RFXCOM has found. Then, in the various device dialogs you put a popup list of devices that the RFXCOM knows about (that haven't been defined yet)? Then the user would just go to the "Temperature Sensor" device creation dialog and it would list all available sensors of that type. No ID's etc. You can have a checkbox that shows/hides the sensor text field in case the device they're expecting doesn't show up and they (somehow) know the ID. This is how the iTunes plugin works - it scans for available iTunes servers, filters out the ones that are already defined, and shows the rest in a popup menu in the device config dialog. There are several other plugins that work like that as well.

I realize that may not work for devices where you have to manually set addresses - but for sensors where the ID isn't visible it would go a long way towards making the plugin much easier for people to use.

I'll try it out with the sensors I have in the next couple of days and report back.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Apr 24, 2012 2:38 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: First Run Information

Ok, just had a go at defining my sensors. Here's some feedback in no particular order:

  1. It's a rather large pain in the butt to have to guess what sensor is what just by the "Unknown device detected" messages. I had to try multiple guesses with the two that were showing up in order to get them right (had to reposition the RFX to see the 3rd). This included getting some errors about states that didn't exist (when I had wind selected for the rain sensor). I think following my suggestion above will significantly improve the user experience of adding sensors.
  2. The Rain Sensor (Oregon Scientific PCR800) is showing interesting values for rainrate and raintotal. raintotal (16.02 inches) is probably since the last time the sensor was reset - but that's wrong. However, the rainrate (9.33) doesn't make any sense. I think it's actually supposed to be 0.0922 inches - I tipped the sensor twice and my weather station is showing .09in. Following that logic, raintotal would be .1602 - but that's not right either so I'm not sure about that number.
  3. Temperature values from my temp sensor (Oregon Scientific THGN801) seem to be whole numbers - it would be nice to get the precision that the sensor supports (which I know is at least tenths of a degree).

We're going to test some other sensors and do a little range testing. Assuming we get the above issues worked out and if the range is good this will be a great solution for people wanting to do temperature/humidity sensing. Looking forward to the next rev.

[EDIT] I seem to be getting this periodically:

Code: Select all
  RFX TRX By RdK Error            Unknown device type detected (type = 3)
  RFX TRX By RdK Error            Unknown device type detected (type = 4)
  RFX TRX By RdK Error            Unknown device type detected (type = 24)


I don't have any other sensors and it's not showing an id anyway - just FYI.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Apr 30, 2012 10:17 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: First Run Information

One other thing - you might want to consider changing the date format that you insert for the lastUpdated state on the devices - that format is harder to parse if someone wanted to use it in a script. Something like "YYYY/MM/DD HH:MM:SS" for instance (using a 24 hour clock) would be a lot more easily parsed but still quite readable.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests