We have moved at community.getvera.com

Author Topic: Plugin for the USB RFXtrx from RFXCOM  (Read 308101 times)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New USB RFXCOM
« Reply #30 on: March 01, 2012, 07:05:38 pm »
I have prepared the minimum lua code to start first tests, meaning initialization of the communication with the RFXtrx + trace of received messages from the RFXtrx.
Remains the XML files to do.
I should be able to make the first tests tomorrow evening.

Offline Quinten

  • Sr. Member
  • ****
  • Posts: 273
  • Karma: +2/-0
Re: New USB RFXCOM
« Reply #31 on: March 02, 2012, 07:52:12 am »
I have prepared the minimum lua code to start first tests, meaning initialization of the communication with the RFXtrx + trace of received messages from the RFXtrx.
Remains the XML files to do.
I should be able to make the first tests tomorrow evening.

You're already one step ahead of me...  Please keep us posted!
VeraLite - UI7 1.7.947 | 8x Fibaro FGD211 | 2x Fibaro FGS221 | 1x Fibaro FGBS321 | 3x Fibaro FGRGBW | 1x Everspring SP814 | 2x Everspring AN157-3 | 2x Heatmiser PRT-TS WiFi | 1x Logitech Harmony Hub | 1x Philips LivingColour

Offline redeyedrob

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: New USB RFXCOM
« Reply #32 on: March 02, 2012, 10:18:24 am »
Good work.

If you are happy with the results then it would be good to post the files, I'll hopefully have some time over the weekend - if you're happy with your files I'll work with them, if not I'll start from scratch.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New USB RFXCOM
« Reply #33 on: March 02, 2012, 12:44:32 pm »
The question I am asking myself is: shall I create directly children device using usual temperature and humidity devices, meaning without the ability to add variables to store additional information (last update for example) ?
Or shall I first create a new child device specific to the plugin used for temperature/humidity that will store some data and then create the usual temperature and/or humidity devices as children of this new device ? We would have a tree with 3 levels instead of 2.

I will probably start with the first approach (because easiest), it is how it is done in the current RFXCOM plugin.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New USB RFXCOM
« Reply #34 on: March 02, 2012, 06:05:23 pm »
It's working 8) Sending and receiving commands.
Until now I only log messages and partially decode temp/hum messages.
Next step is finishing at least the decoding of temperature and humidity messages received and clean my code.
Then I will publish my files (certainly during the weekend).

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New USB RFXCOM
« Reply #35 on: March 03, 2012, 08:37:57 am »
Finally, I took full of code from the original RFXCOM plugin to manage device children.
But it looks like there is a problem when creating several children with the same id. After syncing, some child are lost and mixed up.
Is it a know bug with UI5 (1.5.254) ?
Do we have to always use different ID (altid) ? In this case, I think the original RFXCOM can not work properly because temprature and humidity devices will have the same id for the same sensor.

Offline ninux

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Re: New USB RFXCOM
« Reply #36 on: March 03, 2012, 08:42:23 am »
Hello Lolodomo,

I'm debuging RFXCOM Plugin and I have the same issue with altid who have the same for Temp and Humidity.
I think we need to rewrite the creation of device look at Mochad X10 plugin who have a good implementation.
VeraLite, RFXCOM Lan, IPX800

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New USB RFXCOM
« Reply #37 on: March 03, 2012, 06:35:18 pm »
Here are my files. Of course, it is not finished and enhancements are possible, but it is now working with temperature and humidity sensors.

After uploading the 4 files (the lua file must not be compressed), you have to create a new device using the file D_RFXtrx.xml and setup the serial port for this new device. The serial port must be set to 38400 bauds (not yet verified by the plugin).
To enable the child creation (for creation of temperature and humidity devices), you have to set the variable AutoCreate to 1 in the device advanced settings.

Edit: a new version is available below in this topic
« Last Edit: March 11, 2012, 01:50:48 pm by lolodomo »

Offline Quinten

  • Sr. Member
  • ****
  • Posts: 273
  • Karma: +2/-0
Re: New USB RFXCOM
« Reply #38 on: March 06, 2012, 02:58:52 pm »
I haven't forgetten about this...  I downloaded the files, looked at them in an editor, but then I got distracted again by other stuff, so I haven't actually given them a try.  Have you progressed with them at all?
VeraLite - UI7 1.7.947 | 8x Fibaro FGD211 | 2x Fibaro FGS221 | 1x Fibaro FGBS321 | 3x Fibaro FGRGBW | 1x Everspring SP814 | 2x Everspring AN157-3 | 2x Heatmiser PRT-TS WiFi | 1x Logitech Harmony Hub | 1x Philips LivingColour

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New USB RFXCOM
« Reply #39 on: March 07, 2012, 06:57:18 am »
I haven't forgetten about this...  I downloaded the files, looked at them in an editor, but then I got distracted again by other stuff, so I haven't actually given them a try.  Have you progressed with them at all?

The only changes I made are relative to prefix. There were mismatches, sometimes I used "XX_" sometimes "XX/". But the plugin is working well even with these "errors".
Nevertheless I know my function findChild has to be corrected because it could fail in certain particular cases (depending on the ID of sensors).
I had no time to progress since the beginning of the week.

Here is my current TODO list:
1) correct the function findChild (full matching from position 4 to the end of the string)
2) check at startup the characteristics of the serial connection (bauds, parity, ...)
3) manage the result of "Get Status" command (and store in variables the protocols decoded by the RFXtrx))
4) manage barometer data (new device to display pressure)
5) manage the setup of the RFXtrx through the plugin (manage "Set Mode" command)

Offline Quinten

  • Sr. Member
  • ****
  • Posts: 273
  • Karma: +2/-0
Re: New USB RFXCOM
« Reply #40 on: March 07, 2012, 08:45:34 am »
I actually spend a couple of hours this morning going through the plugin and comparing it to the RFXCOM plugin (so I could get a feel as to how much was changed) and it's looking pretty neat already.  I do not have any temperature sensors, so I can not actually put anything to test yet, but I will try to add some functions for dealing with ByeBye Standby/HomeEasy lighting messages in the same style as yours.  I think for now it is best you maintain the plugin and merge the code in?
VeraLite - UI7 1.7.947 | 8x Fibaro FGD211 | 2x Fibaro FGS221 | 1x Fibaro FGBS321 | 3x Fibaro FGRGBW | 1x Everspring SP814 | 2x Everspring AN157-3 | 2x Heatmiser PRT-TS WiFi | 1x Logitech Harmony Hub | 1x Philips LivingColour

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New USB RFXCOM
« Reply #41 on: March 07, 2012, 10:26:22 am »
I do not have any temperature sensors, so I can not actually put anything to test yet, but I will try to add some functions for dealing with ByeBye Standby/HomeEasy lighting messages in the same style as yours.  I think for now it is best you maintain the plugin and merge the code in?

Ok

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: New USB RFXCOM
« Reply #42 on: March 07, 2012, 10:42:22 am »
Any Idea if either the original plugin or this one supports Oregon Scientific Wind Sensors?
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline ninux

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Re: New USB RFXCOM
« Reply #43 on: March 07, 2012, 04:31:17 pm »
If RFXtrx support your Oregon Wind Sensors we can add the support of this sensors like Rain gauge, we juste need your LuaUPnP.log.
I only know RFXCOM Lan supports the Oregon Wind Senrors.
VeraLite, RFXCOM Lan, IPX800

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New USB RFXCOM
« Reply #44 on: March 07, 2012, 04:40:44 pm »
Here are the wind sensors that are (should be) managed by the RFXtrx:
WIND1 is WTGR800
WIND2 is WGR800
WIND3 is STR918, WGR918
WIND4 is TFA

But wind data are not yet managed by the Vera plugin.