When things stop working...

Forum about Rfxcom home automation Domotica devices.

Moderator: b_weijenberg

Post Reply
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

When things stop working...

Post by Digit »

This topic is not about a question but about sharing an experience i had today that can probably save you hours of searching...
Coming back home today, checking some graphs and events that occured while i was away, i discovered all my X10 RF devices and Oregon Scientific stuff hadn't been received for several hours. I'm using RFXCOM receivers, BTW.

Restarting software, rebooting the PC, switching PC, cables, mood, nothing helped. Visonic data was still being received ok, but for the rest: all RF was garbage. Going back in the logs, i could see that there was a sudden change from 'everything ok' to 'only Visonic ok, rest garbage'.
I received things like:

3000044001C400
30000800410210
3070874ED90000

What's this? 48 bits? What's going on here ???
I could not come to any other conclusion then that the X10/Oregon module must have gone mad...

After an hour or 2, having tried everything i could think of, trying to figure out what to do next, i walked through my office and i happened to see a LED burning where there shouldn't be one burning. Inside this corner of a desk, where i keep a pile of unused stuff like switches, actors, interfaces, remote controls, and so on, i saw an ELRO wireless switch (AB600M to be precise) with a red LED burning... apparently someone (my wife is the primary suspect in this case...) put a box with a new arrived delivery on top of all this other stuff, thereby triggering the push of the 'off' button on the ELRO wireless switch. And guess what, this wireless switch jammed the reception of everything on my RFXCOM X10/Oregon module....

Just keep it in mind...you'll never know...

Regards,
Robert.
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

When things stop working...

Post by Bwired »

[:D] Hi Robert,
Yep that can happen (Shit happens)! [:)] The KAKU or ELRO etc devices are sending the commands many times. If you push once the command is been send a lot of times, just to be sure its arriving. The RFXcom receiver has a large buffer. And you can also think about the way you handle all incoming traffic. What I do is when I receive the same command in a certain time I ignore this command. So this is handling things much faster. It's also important to have event driven software on the comport, so If data comes in the software reacts immediately, this is better then for example pooling the comport every x seconds. In this line there are more things you can do.
But the big question is, will this all help in the situation you encounter. Can you tell me how you handle the above?
Regards Pieter
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

When things stop working...

Post by Digit »

Hi Pieter,

All i can say is i don't i think i missed one single bit the RFXCOM receivers had to offer, if you know what i mean.
I even used RFReceiver as 'garbage-collector' this afternoon to see if it did a better job, but even RFReceiver couldn't understand anything it received. Just all garbage. Suddenly i had wireless 1-Wire and Digimax devices in my house...

Basically i do the same as you. Ignoring duplicates. Although it takes some stages to get to where these duplicates are ignored. It's all done on device-level instead of receiver-level.
There are a few components/layers that take care of managing all incoming data in my DDMC (Domotica Device Monitor and Controller) (didn't want to call it HCS, sounds too much like yours ;-) )

Everything that's incoming, either by means of 1-wire, RFXCOM Standard, Extended or Visonic receiver, Powerline (TI-213), and soon HA7Net, is put into 1 memory-table or buffer as you like.

After new incoming data has arrived, something i call the InterfaceDataHandler distributes this new data to the corresponding object that has the same unique address as the new incoming data was identified to belong to.

So next comes the device itself, which knows it's own previous state and can respond accordingly to this new data: first it ignores duplicates, after that it signals the Eventhandler that a change has occurred, it knows whether it should consider itself to be an event to show on the website, whether to save it's change for history, and so on.
While all this happens, new data can/may/will arrive at the comports. It will be served.

Regards,
Robert.
User avatar
Richard
Member
Member
Posts: 102
Joined: Sat Aug 12, 2006 11:44 am
Location: Netherlands - Alkmaar

When things stop working...

Post by Richard »

Interesting to hear how you guys handle the incoming data. Do you (read: all members in general) have some more nice tips/cavecates to think about?

The reason why I ask this is because i just received my ordered RFXCom materials (Receiver, Transmitter, PowerMeter) and at this moment I'm thinking how to implement and handle all the incoming data. So tips and hints are very welcome. Eventually you're the guys with 'the' experience and I'm the guy who's very curious :-)

Richard
User avatar
b_weijenberg
Forum Moderator
Forum Moderator
Posts: 1744
Joined: Sun May 14, 2006 4:32 pm
Location: Netherlands

When things stop working...

Post by b_weijenberg »

Richard,

You can have a look in the RFreceiver source how I did it.
It is a 100ms timer that checks if data has been received. If data is in the input buffer it loops until the number of bytes to receive (in Variable Mode 1st byte contains number of bits to receive) is done. If a timeout occurs (more then 1 character receive time) during this receive loop then the packet is marked as unusable.

Bert
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

When things stop working...

Post by Digit »

Richard,

Regarding RFXCOM incoming data Bert already gave you the best tip: have a look at RFReceiver. Very educational.

Regards,
Robert.
Post Reply

Return to “Rfxcom Receivers & Transmitters Forum”