• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Lightwave RF
#1
Hey,


Picked up some Lightwave RF gear recently, and am trying to put together a protocol to receive/send in pilight. I think I've managed to reverse engineer the protocol itself with the help of another couple of guys who have done the same thing on an Aduino.

Must reiterate this is my first time trying to put together a protocol - I know now what each bit represents, but haven't populated this in code yet (just want it to recognise that its received this code, without decoding as a first step - as such have hardcoded the id etc that its sending in the message).

I've been working with this from -debug/learn:

Code:
--[RESULTS]--

time:        Sat Jan 17 20:34:02 2015
hardware:    433gpio
pulse:        4
rawlen:        144
binlen:        36
pulselen:    322

Raw code:
322 322 322 322 322 322 322 322 322 322 322 1288 322 322 322 1288 322 322 322 322 322 322 322 322 322 1288 322 322 322 1288 322 322 322 322 322 322 322 322 322 1288 322 322 322 1288 322 322 322 322 322 322 322 1288 322 322 322 322 322 1288 322 1288 322 322 322 1288 322 322 322 322 322 322 322 322 322 322 322 322 322 322 322 1288 322 1288 322 322 322 322 322 322 322 1288 322 322 322 322 322 322 322 322 322 1288 322 322 322 322 322 1288 322 322 322 322 322 1288 322 322 322 322 322 1288 322 322 322 322 322 322 322 1288 322 322 322 322 322 322 322 322 322 1288 322 1288 322 322 322 322 322 10948
Binary code:
001100000110101100010000100100000101

From various runs /button pushes I've got the following:

Code:
LEVEL——-        SUBUNUT    CMD        REM ID
0011    0000     0110        1011        00010000100100000101//1 On
0101    0000     0110        0011        00010000100100000101//1 Off
0011    0000        0010        1011        00010000100100000101//2 On
0101    0000        0010        0011        00010000100100000101//2 Off

and put the following together:

Code:
...
void lwrfDimInit(void) {

    protocol_register(&lwrf_dimmer);
    protocol_set_id(lwrf_dimmer, "lwrf_dimmers");
    protocol_device_add(lwrf_dimmer, "lwrf_dimmer", "LWRF Dimmers");
    protocol_plslen_add(lwrf_dimmer, 322);
    lwrf_dimmer->devtype = DIMMER;
    lwrf_dimmer->hwtype = RF433;
    lwrf_dimmer->pulse = 4;
    lwrf_dimmer->rawlen = 144;
//    lwrf_dimmer->lsb = 3;
    logprintf(LOG_ERR, "lwrf_dimmer: INIT");
    options_add(&lwrf_dimmer->options, 'i', "id", OPTION_HAS_VALUE, CONFIG_ID, JSON_NUMBER, NULL, "^([0-9]{1,})$");

    lwrf_dimmer->parseBinary=&lwrfDimParseBinary;
    lwrf_dimmer->createCode=&lwrfDimCreateCode;
    lwrf_dimmer->printHelp=&lwrfDimPrintHelp;
    //lwrf_dimmer->checkValues=&lwrfDimCheckValues;
}
...


I can get packets reliably via -raw, but never get any of my (fake) messages showing via -receive. Not being familiar with this, i've peppered log prints in the parse / init methods - The module inits, but never tries the parse.

This is my first protocol - I figured I'd try and make things easy by just getting it to detect the presence of the message and return dummy data before diving the decode itself - presumably this should work?

Does anyone have any idea where I may be going wrong here? I seem to have no reception issues with -debug/raw, the codes come back the same every time without fail, and the pluse length rarely drops down to 321.

Thanks in advance!


Attached Files
.txt   lwrf_dimmer.txt (Size: 8.31 KB / Downloads: 3)
 
Reply
#2
First of all, please never develop against the master branch as you are also being warned about on the development pages.

Second, add the following in the init and it will work:
Code:
    lwrf_dimmer->binlen = 35;
 
Reply
#3
Apologies - Just starting out tinkering with this, have switched to development branch now!

Thanks - will give this a go and report back, fingers crossed!
 
Reply
#4
Hi guys, just seen the lightwaverf stuff and searched around but could not find much regarding support in pilight. Any news on this protocol?
 
Reply
#5
I've started on it, but unfortunately haven't had time to continue recently.

What was troubling me was that in every other reference to the proto I could find online, they specify the same codes and the ability to specify dimming levels (specifically this page), however i'm not seeing matching codes in my gear. There were a few statements about changing 0s to 10s which I wasn't seeing either.

I can get individual units to trigger on and off, however don't fully understand what each bit is doing and would rather get it working properly.

If you're interested in having a go I can upload what I've got so far.
 
Reply
#6
If you could share what you have done that would be fantastic!

I need to order some lightwave kit now ;-)
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)