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.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

now also supporting sending remote key pressures

I don't understand this
Yes, maybe not so good explained and maybe also not so useful. The thing is that the PC computer now can act as a remote, it can send remote keys via the RFXtrx. If this is useful, I do not know but it is anyway supported by the RFXtrx so I implemented it.

To use it, you can simply create macros like this:
Image2.jpg
Image2.jpg (4.91 KiB) Viewed 9022 times
Image4.jpg
Best regards, Walter
artefact
Posts: 15
Joined: Tue Feb 14, 2012 7:40 pm

Re: RFXtrx

Post by artefact »

OK,

I don't use X10 remote utility, I install it this afternoon for test. My X10 remote is use to send order in eventghost only for the moment.
artefact
Posts: 15
Joined: Tue Feb 14, 2012 7:40 pm

Re: RFXtrx

Post by artefact »

Hi,

Sorry for delay of my response :oops: I managed my motorized blind with Bert in rfxcom and some event at my home ...

I install ati remote wonder software on my computer and assign one touch :

Image

Then I put an event in eventghost and it work fine :

Image

I open Notepad with the ati remote wonder with the rfxcom and ati remote dongle if it was you want to know.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

Excellent, thank you very much for testing. Yes, this was what I meant. If it is useful, I do not know but it is implemented.

I have also uploaded a new version in first post that could be of interest. A-OK RF01, A-OK AC114 and new ByeByeStandBymodels added.

Best regards, Walter
artefact
Posts: 15
Joined: Tue Feb 14, 2012 7:40 pm

Re: RFXtrx

Post by artefact »

Yeahhhhh

You are boss you and Bert ... Thank you very much I test this afternoon.


This morning it was a mushroom burgundy hunt in forest :mrgreen:
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

This morning it was a mushroom burgundy hunt in forest
Nice, this year was a good year for many nice mushrooms also here in my country. We have a lot of chanterelle I think it is called in french.
Image1.jpg
Image1.jpg (11.25 KiB) Viewed 8963 times
artefact
Posts: 15
Joined: Tue Feb 14, 2012 7:40 pm

Re: RFXtrx

Post by artefact »

Yes La Chanterelle is very good, there is too here, but I prefer the "Cèpe de Bordeaux" :D

Image

750 gr the most fat today for 2kg of cleaning mushroom in fridge.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

New version published in first post
artefact
Posts: 15
Joined: Tue Feb 14, 2012 7:40 pm

Re: RFXtrx

Post by artefact »

Thank for your work :wink:
pavlouis
Posts: 5
Joined: Sat Dec 01, 2012 7:47 pm

Re: RFXtrx

Post by pavlouis »

Hello, thanks for all your efforts, but the plug-in appears to work on and off for me. I often get the below error messages:

14:39:26 Plugin: RFXtrx
14:39:26 Debug Info: 0D 00 00 00 00 00 00 00 00 00 00 00 00 00
14:39:28 Debug Info: 0D 00 00 01 02 00 00 00 00 00 00 00 00 00
14:39:28 Debug Info: 0a5201017001003a2f0259
14:39:28 Exception in thread RFXtrxThread:
14:39:28 Traceback (most recent call last):
14:39:28 File "threading.pyc", line 532, in __bootstrap_inner
14:39:28 File "threading.pyc", line 484, in run
14:39:28 File "C:\Program Files\EventGhost\plugins\RFXtrx\__init__.py", line 563, in ReceiveThread
14:39:28 self.PartialMessageHandler(data)
14:39:28 File "C:\Program Files\EventGhost\plugins\RFXtrx\__init__.py", line 528, in PartialMessageHandler
14:39:28 self.HandleChar(self.tmpMessage)
14:39:28 File "C:\Program Files\EventGhost\plugins\RFXtrx\__init__.py", line 763, in HandleChar
14:39:28 if msg[1]== '01' and msg[4]== '02':
14:39:28 IndexError: list index out of range
14:39:28
14:39:29 Message could not be repaired 00

The setup is running inside a KVM and i'm passing through the usb port to the xp virtual machine. The RFXmngr app appears to receive the info without issues (output below), but the plugin appears to not parse something. It appears to work on and off and unfortunately my level knowledge of python is fairly rudimentary, is there anything i can do to fix this?

================================================
Reset receiver/transceiver:0D 00 00 00 00 00 00 00 00 00 00 00 00 00
================================================
Get Status:0D 00 00 01 02 00 00 00 00 00 00 00 00 00
------------------------------------------------
0A52010D7001003A2F0259
Packettype = TEMP_HUM
subtype = TH1 - THGN122/123/132,THGR122/228/238/268
channel 1
Sequence nbr = 13
ID = 28673
Temperature = 5.8 ┬░C
Humidity = 47
Status = Dry
Signal level = 5
Battery = OK
------------------------------------------------
------------------------------------------------
------------------------------------------------ --> changed to undec bits in the manager, hence the 02 03
================================================
Set Mode:0D 00 00 02 03 00 00 80 00 00 00 00 00 00
------------------------------------------------
0A52010A52010D7001003A
Packettype = TEMP_HUM
subtype = TH1 - THGN122/123/132,THGR122/228/238/268
channel 1
Sequence nbr = 10
ID = 20993
Temperature = 344 ┬░C
Humidity = 1
Status = Normal
Signal level = 3
Battery = OK
================================================
Get Status:0D 00 00 03 02 00 00 00 00 00 00 00 00 00
------------------------------------------------
0A52010D7001003A2F0259
Packettype = TEMP_HUM
subtype = TH1 - THGN122/123/132,THGR122/228/238/268
channel 1
Sequence nbr = 13
ID = 28673
Temperature = 5.8 ┬░C
Humidity = 47
Status = Dry
Signal level = 5
Battery = OK
------------------------------------------------

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

Re: RFXtrx

Post by krambriw »

14:39:29 Message could not be repaired 00
The above shows that you just received '00' as a complete message. Maybe the timeout is to short. You could try to change the code:

Code: Select all

        #Schedule the new resetting task
        self.pmh = eg.scheduler.AddTask(0.4, self.ClearTempMessage)
and increase the value stepwise like below or similar and see if this improves the situation:

Code: Select all

        #Schedule the new resetting task
        self.pmh = eg.scheduler.AddTask(1.0, self.ClearTempMessage)

BestR Walter
pavlouis
Posts: 5
Joined: Sat Dec 01, 2012 7:47 pm

Re: RFXtrx

Post by pavlouis »

Hmmm tried changing the code in increments up to 2.4, closing and restarting EG, and no change:

12:40:23 Debug Info: 0D 00 00 00 00 00 00 00 00 00 00 00 00 00
12:40:25 Debug Info: 0D 00 00 01 02 00 00 00 00 00 00 00 00 00
12:40:25 Debug Info: 0a52010170010044350259
12:40:25 RFXtrx.Type: THGN122/123, THGN132, THGR122/228/238/268 id: 28673 ' temperature: +6.8 deg C humidity: 53 %RH status: normal signal: 5 battery: 9'
12:40:25 RFXCOM
12:40:25 Update MySQL via URL
12:40:25 http://internal.pavlouis.com/IPPhone/Te ... &battery=9
12:40:25 Exception in thread RFXtrxThread:
12:40:25 Traceback (most recent call last):
12:40:25 File "threading.pyc", line 532, in __bootstrap_inner
12:40:25 File "threading.pyc", line 484, in run
12:40:25 File "C:\Program Files\EventGhost\plugins\RFXtrx\__init__.py", line 563, in ReceiveThread
12:40:25 self.PartialMessageHandler(data)
12:40:25 File "C:\Program Files\EventGhost\plugins\RFXtrx\__init__.py", line 528, in PartialMessageHandler
12:40:25 self.HandleChar(self.tmpMessage)
12:40:25 File "C:\Program Files\EventGhost\plugins\RFXtrx\__init__.py", line 763, in HandleChar
12:40:25 if msg[1]== '01' and msg[4]== '02':
12:40:25 IndexError: list index out of range
12:40:25
12:40:26 Message could not be repaired 00

Is there a way for me to get more verbose debug so I can figure out where that IndexError is coming from?

Cheers and greatly appreciated!
Paul
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

All data is coming in to the function below.

Code: Select all

    def ReceiveThread(self):
        out = ''
        while not self.finished.isSet():
            time.sleep(0.002) #Release CPU
    	    while self.serial.inWaiting() > 0 and not self.hold:
                self.finished.wait(0.01)
    	        buf = self.serial.read(1)
    	        if len(str(out))==0:
                    pl = int('0x'+str(buf.encode('hex')), 0)
                    out += buf
                    out += self.serial.read(pl)
                    data = str(out.encode('hex'))
                    if pl>3 and len(str(out))==pl+1:
                        if self.bDebug:
                            print "Debug Info: ", data
                        self.HandleChar(data)
                    else:
                        self.PartialMessageHandler(data)
                    out = ''
        print self.text.threadStopped
You could try to insert a print statement that prints the data when it gets updated (it might be a lot of log entries). Then you could study what is coming in.

Code: Select all

                    data = str(out.encode('hex'))
                    print data
Maybe this will help.

BestR Walter
pavlouis
Posts: 5
Joined: Sat Dec 01, 2012 7:47 pm

Re: RFXtrx

Post by pavlouis »

Hey Walter, many thanks for all the info as i've come up with a temporary solution that seems to work, I simply added a quick length check to the data variable before it gets passed to the partialmessagehandler (code below):

if pl>3 and len(str(out))==pl+1:
if self.bDebug:
print "Debug Info: ", data
self.HandleChar(data)
else:
if len(data) > 2:
self.PartialMessageHandler(data)
out = '

It looks like there was an extra pair of bits being added after it received the data from the THGN unit, which was causing the thread error and probably could be handled a little more eloquently, full debug below:

18:37:23 Verbose Debug:0a52013070010049390259
18:37:23 Verbose Debug:00

Thanks again and truly appreciate all the hard work you've put into this plug-in as it's people like you who make home brew projects like mine a success!
Paul
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RFXtrx

Post by krambriw »

Dear Paul,
Thanks for your kind words!
Your suggestion is good and I am very happy it helped. I will look into this and if nothing else prevents it, we can make it permanent in the next release.
As with all software coding, creating the function is normally not the most difficult, it is instead the exception handling.

Kindest regards, Walter
Post Reply