PDA

View Full Version : rfxcom hardware ?


mhwlng
December 26th, 2006, 10:18 AM
I've just ordered an rfxcom receiver and power meter.

I see that the serial\W800RF32.lua already parses data from rfxcom temperature sensors. I believe that reading power is similar.

but I see at the start of the file :


local v = gir.GetGirderVersion ()
if v.Major > 4 then
return
end



so is the w800/rfxcom support disabled in G5 ?

Or do I misunderstand how all this works now ?

Marcel

Promixis
December 26th, 2006, 11:22 AM
I've just ordered an rfxcom receiver and power meter.

I see that the serial\W800RF32.lua already parses data from rfxcom temperature sensors. I believe that reading power is similar.

but I see at the start of the file :


local v = gir.GetGirderVersion ()
if v.Major > 4 then
return
end



so is the w800/rfxcom support disabled in G5 ?

Or do I misunderstand how all this works now ?

Marcel


Its implemented as a component in G5.

mhwlng
December 26th, 2006, 11:24 AM
So, where is the serial parsing code then ?

I can't find it in any other lua file ?

Marcel

Promixis
December 26th, 2006, 11:29 AM
Dan has added it to the component file. I haven't got it from him to include in the standard release.

Dan?

mhwlng
December 26th, 2006, 11:33 AM
ok, then perhaps Dan can add support for the rfxcom power meter device ?

and it would be nice to extend the component to handle 24 bit data from the rfxcom receiver (the w800 only handles 16 bit data, I believe) ?

Marcel

Promixis
December 26th, 2006, 11:35 AM
AFAIK he has it working...

I am hoping the RFXCOM guys will send us some stuff so we can support it better.

Are you using their one wire stuff?

mhwlng
December 26th, 2006, 12:18 PM
AFAIK he has it working...

sounds good...

Are you using their one wire stuff?

No, I only want to use their power meter (it's on order, together with the receiver)
I might electrocute myself, installing it though
so If you don't hear from me again, you'll know what happened.

The only other rf stuff I have (on order) are standard, battery powered, x10 motion detectors.

I do have some regular one-wire stuff from www.hobby-boards.com (http://www.hobby-boards.com) (see one-wire plugin thread)

but I can't run cat5 cabling all through my rented appartment, so the devices (mainly indoor temperature/humidity/pressure) have to be located in my living room where the girder pc is (that's all I need, anyway).

Marcel

danward79
December 26th, 2006, 01:21 PM
If you get electrocuted can I have your power meter?! :)

I want to order one of those to get it working, but am a bit broke at the moment due to xmas... :(

I have an RFXCom receiver, 433 & 868 combined seems to work great. I also have a W800RF32, which is at the moment redundant.

I have updated the W800 code to allow for the parsing of the RFXCom temperature sensors. I have mailed you and Mike the file. I am not sure that I would call it a proper component thou! I have literally dropped my code in there.

The events generated are passed on to the RFXCom Device Manager. Which I guess could be expanded to include the power meter.

With regard to extending it to 24 bit, I was thinking the otherday that perhap it would be a good idea to rework to w800 plugin for the rfxcom receivers?

mhwlng
December 26th, 2006, 01:45 PM
Dan,Mike

the difference between this w800rf32.lua serial file and the one already included in G5 are a few lines, that implement more 1-wire variations :

but the file is disabled in G5 (see above) and mike said :


Its implemented as a component in G5.


so, I'm not sure how to proceed now ?

Marcel

Promixis
December 26th, 2006, 02:04 PM
For now, you can just remove that line in the serial file and use Dan's stuff. Basically, I just removed the parsing for the RFXCOM stuff in the w800 component as I cannot test against it. The serial plugin should still work fine.

danward79
December 26th, 2006, 02:13 PM
The file I sent you works fine for me in G5?

Promixis
December 26th, 2006, 02:26 PM
The file I sent you works fine for me in G5?

Dan did you update the G5 w800 component file?

danward79
December 26th, 2006, 03:05 PM
Nope!

I just pasted my code into your file.

mhwlng
December 29th, 2006, 08:34 AM
ok, I got the rfx stuff, installed it, (and, surprisingly, didn't kill myself in the process)
now, I see some kWh data using the rfxcom supplied test program.

But I can't get Dan's software to work.

Dan's copy of serial\W800RF32.lua also contained the line

local v = gir.GetGirderVersion ()
if v.Major > 4 then
return
end


So I'm not sure how Dan could have tested this file in G5 ?

I commented out that part and added it to the serial plugin.
(I didn't make any changes, to parse the power data yet)

Then I see this :

Timer (pcall): ...gram Files\Promixis\Girder5\/plugins/serial/init.lua:456: attempt to index field `SendQueMutex' (a nil value)
stack traceback:
...gram Files\Promixis\Girder5\/plugins/serial/init.lua:456: in function `QueInsert'
...gram Files\Promixis\Girder5\/plugins/serial/init.lua:425: in function <...gram Files\Promixis\Girder5\/plugins/serial/init.lua:419>
(tail call): ?
...er5\luascript\Classes/DelayedExecutionDispatcher.lua:40: in function <...er5\luascript\Classes/DelayedExecutionDispatcher.lua:38>


I don't know how to proceed ?

I'm also not sure what mode to set the rfx receiver to, to make it behave as a w800 ?
I set it to '32 bit x10' (using the test program).
Dan, Is that what you have to make your 1-wire sensor stuff to work ?

Marcel

Promixis
December 30th, 2006, 01:25 PM
Marcel, I have ordered this hardware.

That being said, the files Dan sent should work using the old w800 serial plugin (afaik).

mhwlng
December 31st, 2006, 02:45 AM
I switched back to the original serial\w800rf32.lua from G5

I removed the G5 check and the parsing code from ReceiveResponse


ReceiveResponse = function ( self, data, code )
serial.Classes.Queued.ReceiveResponse (self,data,code)
end,


and it still doesn't work :


Serial Error: ...luascript\DeviceManager/Providers/ComponentBased.lua:51: Component must provide a function "Subscribe"
stack traceback:
[C]: in function `assert'
...luascript\DeviceManager/Providers/ComponentBased.lua:51: in function `ComponentMustProvide'
...luascript\DeviceManager/Providers/ComponentBased.lua:30: in function `Initialize'
...rder5\luascript\DeviceManager/Providers/W800RF32.lua:47: in function `Initialize'
...\Girder5\luascript\DeviceManager/Providers/Basic.lua:34: in function <...\Girder5\luascript\DeviceManager/Providers/Basic.lua:23>
(tail call): ?
(tail call): ?
(tail call): ?
... Files\Promixis\Girder5\/plugins/serial/W800RF32.lua:224: in function <... Files\Promixis\Girder5\/plugins/serial/W800RF32.lua:179>
(tail call): ?
...gram Files\Promixis\Girder5\/plugins/serial/init.lua:1639: in function `DeviceInitialize'
...gram Files\Promixis\Girder5\/plugins/serial/init.lua:1500: in function <...gram Files\Promixis\Girder5\/plugins/serial/init.lua:1496>




Timer (pcall): ...gram Files\Promixis\Girder5\/plugins/serial/init.lua:456: attempt to index field `SendQueMutex' (a nil value)
stack traceback:
...gram Files\Promixis\Girder5\/plugins/serial/init.lua:456: in function `QueInsert'
...gram Files\Promixis\Girder5\/plugins/serial/init.lua:425: in function <...gram Files\Promixis\Girder5\/plugins/serial/init.lua:419>
(tail call): ?
...er5\luascript\Classes/DelayedExecutionDispatcher.lua:40: in function <...er5\luascript\Classes/DelayedExecutionDispatcher.lua:38>



Marcel

mhwlng
December 31st, 2006, 03:19 AM
ok, I switched off serial\w800rf32 and switched on component\w800rf32 (which I overlooked before and doesn't contain Dan's rfxcom stuff) in component manager

and removed all code from ReceiveResponse

ReceiveResponse = function ( self, data, code )
print ("*********");
serial.Classes.Queued.ReceiveResponse (self,data,code)
end,


now girder always crashes at startup (the 'bug report' screen, I *think* that I sent an example to gbugz).
But, if I select 'continue application' anyway, then I don't see any errors in the console and see *** in the console when messages come in..

removing the component from component manager again, stops the crashing...

Marcel

mhwlng
December 31st, 2006, 04:08 AM
ok, the crashing at startup didn't seem directly related to the w800 component.

I messed around in the component manager screen, added some more components, removed some (all accompanied by a lot of crashes and loss of the enabled components list) and finally ended up in the same situation as above, when it crashed all the time (sunclock+w800 enabled)

now, no more crashes at startup (girder still crashes at shutdown, pretty much every time, but I don't see the 'generate bug report' screen)...

So, something might be up with the component manager screen ?

Marcel

mhwlng
December 31st, 2006, 04:26 AM
after several girder restarts (crashing at every shutdown)
the crashing at startup has come back again...
(I wasn't touching the component manager screen, at any time)

I'm giving up on this, for now

(I've sent another bug report, probably the same as the previous one:
...
exception number : 1
exception class : EClassNotFound
exception message : Class not found.
....
)

Marcel

danward79
December 31st, 2006, 07:53 AM
Hi Chaps,

Sorry for the delay. I have been away, and not had net access.

Marcel. I have my receiver set to 32-bit x10 mode, yes.

Ron
December 31st, 2006, 12:11 PM
The startup bug is caused by (again) the 3rd party docking library. Please follow these instructions:


Delete files in the girder directory:
logstate.bin
varstate.bin
luainterstate.bin

Delete Registry entry:
HKEY_CURRENT_USER\Software\Promixis\Girder\5\ui

Rob H
December 31st, 2006, 12:19 PM
Marcel, I think I may have found the problem. I've been getting a similar problem with a Dr Watson dialog on a script reset.

In the Close method of w800rf32.lua (the component version), add the line

self:SerialCloseDevice()

before the Super.Close(self)

Let me know if this fixes it.

mhwlng
December 31st, 2006, 12:24 PM
yep... that fixes the problem...

I can get used to this lightning fast support :-)

Marcel

Rob H
December 31st, 2006, 12:35 PM
Not bad for a Sunday, and New Year's Eve at that! :)

Ron
December 31st, 2006, 01:07 PM
That's Promixis for you!

mhwlng
January 1st, 2007, 06:19 AM
Hi Guys...

happy new year :-) and another weird one :

I have in component manager :
sunclock/w800rf32

I start/stop girder a lot (because I'm modifying the w800rf32.lua for my power meter)

and after a while (maybe 20 start/stops, the component manager is suddenly empty ??) I had not opened the component manager screen at all during the 20 start/stops....

Marcel

Rob H
January 1st, 2007, 09:30 AM
Any errors shown in the Lua console?

mhwlng
January 1st, 2007, 09:34 AM
I don't think so...

I'll keep an eye out for it, the next time it happens...

but I think it must happen (sometimes) when I stop girder (not crashing)..
so it's unlikely that I would see something.

I assume that it has nothing to do with the :
Girder Core Could not aquire mutex for Device Table
errors I always see ?

Marcel

Rob H
January 1st, 2007, 09:50 AM
For what it's worth, I see those errors too. Not sure what they mean.

Promixis
January 1st, 2007, 01:56 PM
Hi Guys...

happy new year :-) and another weird one :

I have in component manager :
sunclock/w800rf32

I start/stop girder a lot (because I'm modifying the w800rf32.lua for my power meter)

and after a while (maybe 20 start/stops, the component manager is suddenly empty ??) I had not opened the component manager screen at all during the 20 start/stops....

Marcel


The enabled list is empty or everything is empty?

mhwlng
January 1st, 2007, 01:58 PM
when I start girder, occasionally, just the enabled components list is empty.

I can enable the components again and then it works ok...
the w800/rfxcom com port settings are remembered

I do have trouble getting the sunclock settings (interval and resolutions) to 'stick'.
At some point, they always revert to the default settings...

Marcel

Ron
January 1st, 2007, 07:08 PM
[quote]
Girder Core Could not aquire mutex for Device Table
[quote]

this is a non-critical error. I'll see if I can devise a way to make it go away. No need to worry about it.

mhwlng
January 9th, 2007, 03:10 AM
attached some examples of power meter trends...

the rfxcom device returns kWh.

I converted it to Watts and show 3 trend charts :
* last 3 days every 5 minutes
* last 2 months every day (average, min, max)
* last year every month (average, min, max)

I also show the kWh data (which is cumulative!) and convert it to money...
* last 2 months every day (daily sum)
* last year every month (monthly sum)

so, it seems that I spend almost 3 euros a day on electricity.

I do my bit, to cause global warming :-) I'm expecting Al Gore to call any minute now...


Marcel

danward79
January 9th, 2007, 03:19 PM
Nice Stuff Marcel.

I am looking forward to getting one of these so I can play.

Promixis
January 9th, 2007, 07:54 PM
awesome, my stuff should be here end of month.