Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

RFXtrx

Questions and comments specific to a particular plugin should go here.
Post Reply
Pallantir
Posts: 41
Joined: Mon May 14, 2012 6:41 pm

Re: RFXtrx

Post by Pallantir »

It's very intermittent. I enabled La Crosse again (because it turned out that my Viking tempreature sensor used that protocoll), and it works now. But when it wasn't working it didn't work in RFXmanager either.
henrock
Posts: 2
Joined: Sun May 27, 2012 10:47 am

Re: RFXtrx

Post by henrock »

This is offtopic but have you received the pm I sent you Walter?
It's still in my Outbox instead of in the Sent messages folder so I'm a bit confused if it has actually been sent or not.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

RFXmeter is currently not (yet) supported
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

Hi,

I have since long become a fan of using websockets. This technology allows us to push information to web pages to update single elements when changes happens instead of having to refresh the whole pages with timers.

I use Pako's excellent Websocket suite for this purpose but until now with a bit of home made configuration setup...

So I decided to see if I could make it easier to use and build in support for it already in the RFXtrx plugin! So I did it.

The new uploaded version allows you to enable websocket support in the RFXtrx plugin. A typical EG configuration with a simple web page is shown in the following pictures.


1) This is my sample configuration with the minimum necessary plugins and sample macros I made for the testing:
Image5.jpg
2) My web server configuration:
Image6.jpg
3) My RFXtrx configuration:
Image1.jpg

to be continued...
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

My Websocket suite configurations:
Image2.jpg
Image3.jpg
Image4.jpg
to be continued...
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

This is then an actual view from my simple web page I made for testing purposes. It shows (websocket) events sent to the web page from EG and it has in addition some simple (working) elements you can play with.

The page has:

- an information field that presents currrent date & time (update via websockets every minute)
- two toggle buttons that sends events to EG when clicked upon
- the toggle buttons also changes states on websockets events sent from EG (when the state is changed from there)
Image7.jpg
Everything is pre-configured to be used in the same PC.

Here is the EG configuration file from the example below:
RFXtrx with websockets.xml
(4.48 KiB) Downloaded 284 times
Here is the simple web page from the example:
Ctrl.zip
(9.07 KiB) Downloaded 321 times
Here is the link to Pako's Websocket suite:
viewtopic.php?f=9&t=3458
jaytee
Posts: 8
Joined: Sun Jun 24, 2012 9:52 am

Re: RFXtrx

Post by jaytee »

Re: RFXtrx
by krambriw ┬╗ Tue Jun 26, 2012 8:12 pm
RFXmeter is currently not (yet) supported
krambriw
Plugin Developer
Any plans for implementing this? I have the telegram specification for RFXmeter (sample VB code included) from Rfxcom available if it helps... I started my self to modify the py-script but I realized how much I suck at Python ;) I took me a few hours to understand the importance of correct indenting, as a first step...

Jaytee
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

Any plans for implementing this?
Is a matter of time availability. Most of us are doing this as a hobby, therefore an exact planning is not really possible, I will however put it as "next to be done". There are no problems from a coding perspective, I have all information needed except for the device, but it would be very helpfull if you could spend some effort in the testing once I have a version available.

Best regards, Walter
jaytee
Posts: 8
Joined: Sun Jun 24, 2012 9:52 am

Re: RFXtrx

Post by jaytee »

I will however put it as "next to be done"
Sounds good to me :) It would be appreciated.
it would be very helpfull if you could spend some effort in the testing once I have a version available
I'm very keen on having this functioning since the RFXtrx433 / RFXmeter combo seems not to be working with XPLMonkey yet. I'll be available for testing once you have the coding part done.

Regards
Jaytee
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

@jaytee

Could you try this first beta version with support for RFXMeter and RFXPower?
__init__.py
(198.96 KiB) Downloaded 289 times
1) Disable the RFXtrx plugin in EG
2) Replace the file
3) Restart EG
4) Open and save RFXtrx configuration
5) Enable the RFXtrx plugin and it should start
6) Save EG configuration

Best regards, Walter
jaytee
Posts: 8
Joined: Sun Jun 24, 2012 9:52 am

Re: RFXtrx

Post by jaytee »

Krambriw:

Thanks for your quick action!

I have tested you script, unfortunately without success. I followed your installations steps. See attachement for log window outputs, in the file also attached what "RFXmngr" dumps to the screen when reading my RFXmeter.

I also attached my own hacked version from last week together with the log output, that's how far my skills brought me :) In my "quick'n'dirty" version I managed to decode the message but stumbled on the formatting of the output values. I still haven't figured out how the "EventTrigger"-stuff works.

Hopefully you can get some help from my code and my logging output in your debugging. If you need further info/data/testing I'll be available for you service!

Regards
Jaytee
Attachments
attachment.zip
(17.3 KiB) Downloaded 244 times
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

Hi Jaytee, something must have gone wrong, maybe you where not successful to upgrade to the latest version since you already made your own version that added a data set to your configuration that then seemed to be compliant but actually was not (I think this messed up the configuration data for the plugin). Best is to delete and add again.

I have simulated using your RFXmeter data package and it looks ok on my side:

I inject:

Code: Select all

  msg = ['0a', '71', '00', '05', '20', 'd0', '00', '07', 'de', '19', '50']
and I get in my EG log:

Code: Select all

08:20:22   RFXtrx.Type: RFXMeter id: 8400 ' Counter: 515609 signal: 5'
Besides, your calculation of the meaured value seems not to be correct, your calculation gives

Code: Select all

08:21:09   2097157.0
RFXmngr also shows the same results as mine:

Code: Select all

0A71000520D00007DE1950
Packettype    = RFXMeter
subtype       = RFXMeter counter
Sequence nbr  = 5
ID            = 8400
Counter       = 515609
if RFXPwr     = 515,609 kWh
Signal level  = 5
Best regards, Walter
jaytee
Posts: 8
Joined: Sun Jun 24, 2012 9:52 am

Re: RFXtrx

Post by jaytee »

krambriw:

I have debugged your script. My conclusion is that there is something wrong with the following part:


#Look for RFXPower device
if self.rfxSensors[dev_id] == firmware_version[0]:
counter = str(counter/1000)+' kWh'
else:
counter = str(counter)


I don't know how it could have worked in your simulation but if I comment it out I can get it working. See my attached version of the file.
Perhaps you can make another version with (temporary) more extensive debugging. What I did was to concatenate the variables into the error message, this gave me a clue of where to start looking.


Another thing: If I force it to be a RFXPower (by commenting the above mentioned code out) it does not show the value with fractions of a kWh. Because the value gets truncated when handled as an "int"? See below:


RFXtrx.Type: RFXMeter id: 8400 ' Counter: 529 kWh signal: 6'
('Debug Info: ', 10, 22, '0a71000e20d0000812c360')



Regards
Jaytee
Attachments
__init__.py
(199.07 KiB) Downloaded 274 times
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

Yes, of course, I see the mistake I made...working on it....

The truncating is also happening because as you say, handling it as an int. I have to make it a float before division with 1000.0

I'll upload a new version asap, just need to fix it and do some testing

Best regards, Walter
Last edited by krambriw on Sun Jul 01, 2012 5:16 pm, edited 1 time in total.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

Hi, this should work now (I hope)
__init__.py
(199.12 KiB) Downloaded 324 times
Best regards, Walter
Post Reply