• 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


[Partially Supported] TFA / Conrad Weather
#41
(05-05-2014, 03:45 PM)curlymo Wrote: Can you try to change this function in debug.c:
Code:
int normalize(int i) {
    double x;
    x=(double)i/pulselen;

    return (int)(round(x));
}
To this:
Code:
int normalize(int i) {
    return i;
}
This disables normalization and gives you the raw pulses. Then post a pilight-debug output for all three sensors.

Here it is
Code:
Station 3 (Ch 10)
hardware:       433lirc
pulse:          638
rawlen:         86
binlen:         21
pulselen:       223

Raw code:
140490 415226 141159 422585 147849 412327 146065 411435 138483 420355 152978 402738 143389 415449 155654 405637 145842 412327 141159 861003 147626 412996 144950 839372 138706 842048 143835 416564 152755 406306 140713 841379 141605 841825 149856 411881 136699 424815 148741 832682 142051 419463 148518 832459 135807 427491 144058 836696 139375 846285 142274 423254 142497 839818 140936 421024 134469 848292 143612 837142 150748 413442 146065 415226 143166 838034 142943 421024 147849 836027 141382 415895 135807 419686 139598 419686 137814 422139 145842 414780 144504 837811 141382 422585 142274 1693908

hardware:       433lirc
pulse:          623
rawlen:         86
binlen:         21
pulselen:       223

Raw code:
151863 416118 150748 413442 168588 389358 154316 410320 135584 419017 146734 411435 145619 413219 145396 415003 148741 410097 160114 830006 128894 428160 144058 839149 140936 842271 144727 416787 139598 842494 161452 820194 142274 417233 169480 819302 140267 419463 151863 831344 153201 405637 136922 844724 139152 423700 151194 832236 136476 845839 140713 438418 156323 829560 157215 824208 141828 842048 134692 426376 136922 419686 140713 420578 142274 841156 137368 428606 152532 830229 145619 415003 140267 419909 142497 414557 142051 841602 146734 835135 139821 845393 132016 852752 138929 1695915

hardware:       433lirc
pulse:          669
rawlen:         86
binlen:         21
pulselen:       222

Raw code:
137418 414252 136974 422022 140748 420024 133644 423132 135864 420246 141192 417360 150516 411366 133866 427128 129426 424908 147408 835164 144522 411588 138306 841380 134532 844488 133200 421800 137640 839826 144522 418470 135642 420024 135864 430458 138528 417582 139638 838716 141414 837606 137640 420468 140526 417138 136530 860916 142746 836496 141192 421356 144966 413364 135198 842712 139860 420690 135642 423354 139860 418914 134310 426018 143412 828948 144966 841158 144744 832944 157620 399378 137196 422910 144078 837828 135642 422688 132534 424464 142746 838494 148518 408924 148518 1682316

hardware:       433lirc
pulse:          640
rawlen:         86
binlen:         21
pulselen:       223

Raw code:
151194 405860 141828 419017 138706 436411 147403 413219 139821 420801 143389 418125 147180 415003 142051 416564 136476 426153 134692 853867 141828 416787 138037 845393 142274 840041 154539 408536 141159 840933 145619 838703 136922 424146 143612 843609 136699 421693 151194 836250 154762 829783 136699 424592 145173 416118 139821 845616 135361 845170 148295 416787 140490 421693 131793 848961 132462 852752 138929 420801 140044 420801 144950 416118 138260 846285 135807 851191 140267 844055 142051 415449 156992 406529 140044 844947 136030 422362 141159 845393 136699 426153 138483 843609 142720 1694800


Station 2 (Ch 01)

hardware:       433lirc
pulse:          503
rawlen:         86
binlen:         21
pulselen:       236

Raw code:
122248 465628 121540 468932 121304 956508 117056 963116 112336 481204 119652 973972 111628 481676 122012 955328 121068 474596 116348 978928 130036 511412 116348 961936 119180 473888 120124 973972 117292 962408 125080 950372 115168 965712 118236 489936 131452 463032 118000 961464 111392 482384 114460 493948 117528 476012 116112 964768 112336 964532 116348 493004 121068 472236 116820 478136 118000 960048 111156 981524 120360 475540 118708 473888 115168 964532 115404 978220 117528 961936 112100 479788 121540 474360 108796 501028 118236 474596 126024 952024 115876 479080 117528 987424 118708 1897912

hardware:       433lirc
pulse:          486
rawlen:         86
binlen:         21
pulselen:       236

Raw code:
123428 465156 113280 477900 113988 962644 124372 955092 118000 475540 114932 977984 126496 469404 112572 962644 114932 479552 122248 972084 129092 513772 112100 964768 117764 478136 113044 978220 112808 966656 133340 944236 113044 963116 116820 493712 114696 478372 118472 960048 126968 464920 121068 490408 112336 481676 115640 963588 124372 952732 119888 487812 117056 477428 117528 476484 117292 960048 113752 981996 109740 482620 116112 477428 114696 964296 113044 978928 110448 968308 117056 479552 111628 479552 118000 492296 111628 479080 114460 964768 121540 471292 115640 988840 114696 1900980


Station 1 (Ch 00)


hardware:       433lirc
pulse:          584
rawlen:         86
binlen:         21
pulselen:       249

Raw code:
143673 514932 145167 513438 157368 510450 142677 519414 151143 1056009 149898 1075182 141432 1119504 143673 521655 152139 512442 155625 1068459 141930 1067712 139440 523647 140436 521904 147159 535848 150396 1057503 145914 1062234 146412 1060491 152388 528627 148404 515430 140685 1068210 143922 526137 140685 535101 143424 520659 143424 1063230 145914 1061487 149400 532362 144171 1064724 141681 1064973 146910 517422 152139 529125 149151 514932 151143 513189 148902 1059744 148155 532860 138942 1069704 137946 526137 145167 518667 146163 1079664 149649 513687 145167 1063479 142428 522651 142926 548298 145416 2114508

hardware:       433lirc
pulse:          566
rawlen:         86
binlen:         21
pulselen:       250

Raw code:
147250 515500 150750 514500 142750 527750 145500 522750 143000 1072750 143500 1088500 150000 1064250 149750 520000 143750 524250 158000 1073750 147250 523250 149500 1066000 149750 521250 145000 540250 143750 1069250 150500 520750 144250 1071000 145500 541000 147250 522750 147750 1065000 147500 522250 146500 1087750 143750 524250 144250 1071500 150000 1065250 147750 539000 145750 522250 144250 525750 147500 522000 152000 533750 153000 518500 145500 521750 142500 1072750 146500 1087750 145250 1067750 148500 522500 141750 526000 143250 1091250 145500 521750 143750 1071750 143250 1072250 144750 551500 141500 2131000

hardware:       433lirc
pulse:          599
rawlen:         86
binlen:         21
pulselen:       249

Raw code:
158613 504225 173055 488787 173802 492024 138942 526137 140436 1122492 153135 1075929 149649 1058499 162597 502980 157617 511197 137946 1087881 147159 1059744 143922 523398 152886 513936 141681 541077 145167 521655 153135 1056258 158364 507213 140436 544812 137946 528129 149649 1058001 139440 528627 150147 1075929 141183 523149 152637 1059495 144420 1064724 140934 541326 143424 1065969 143922 1065969 145665 518916 162099 523647 142179 522900 141681 525390 133962 1075431 148155 534852 145167 520410 141432 524892 141930 526386 136701 1088379 139689 526884 138195 1071447 137448 1069953 136701 1097841 149151 2111271
 
Reply
#42
I'm following this thread with much interest.
Once a protocol is up and running, I will buy the same set and try to make a thermostat with it Smile (House electrical heating + installation of relays operated with gpio)
 
Reply
#43
Hi knud, i do have the same plan about the thermostat and relays
but first step is to make this station working with pilight

curlymo based on post #41, could you tell me which values should i used for plslen, pulse and rawlen these values are different each time so how to make it generic?
ok can use protocol_plslen_add for that
 
Reply
#44
Hey curlymo

Here is what i have defined
Code:
...
        protocol_plslen_add(threestation, 223);
        protocol_plslen_add(threestation, 224);
        protocol_plslen_add(threestation, 234);
        protocol_plslen_add(threestation, 235);
        protocol_plslen_add(threestation, 244);
        protocol_plslen_add(threestation, 245);
        protocol_plslen_add(threestation, 246);

        protocol_conflict_add(threestation, "alecto");
        protocol_conflict_add(threestation, "teknihall");
        protocol_conflict_add(threestation, "threechan");
        threestation->devtype = WEATHER;
        threestation->hwtype = RF433;
        threestation->pulse = 3;
        threestation->rawlen = 86;
...

Is that correct?

after compilation pilight_receive is not showing the new protocol "threestation" is that normal or i am wrong with values above (threestation.c compile fine of course and i am using binaries generated)?
 
Reply
#45
The pulse length have a range of -5 0 +5 so just define:
Code:
protocol_plslen_add(threestation, 223);
        protocol_plslen_add(threestation, 229);
        protocol_plslen_add(threestation, 235);
        protocol_plslen_add(threestation, 241);

Doesn't it show any other the other three?
 
Reply
#46
Ok so i will just replace by your values (i wasn't aware about the -5 / +5 range). thanks

What i am doing after compilation, i just run
Code:
./pilight-daemon -D 2> pilight-daemon.log
and check in the log if 'station' is displayed
Code:
tail -f pilight-daemon.log | grep -i station

Looking into the log file i can see some rev_switch, clarus_switch, impuls but not *station* (my new protocol)

I am not familiar with git, how can i push changes that i done so far (threestation.c, threestation.h and also include this new protocol into relevant files).
(i of course started from the dev branch).
Can you give me necessary commands to push that on git?
 
Reply
#47
Here you go:
Code:
void threestationParseCode(void) {
    printf("\n\nThreestation\n\n");
}

void threestationInit(void) {
    
    protocol_register(&threestation);
    protocol_set_id(threestation, "threestation");
    protocol_device_add(threestation, "threestation", "Threestation Weather Stations");
    protocol_plslen_add(threestation, 225);
    threestation->devtype = WEATHER;
    threestation->hwtype = RF433;
    threestation->pulse = 10;
    threestation->rawlen = 88;

    threestation->parseCode=&threestationParseCode;
}
Maybe the pulse needs to be a little bit higher or lower.

Code:
pilight-send -p raw -c "594 7631 597 1934 536 1991 548 1944 543 1933 561 3836 557 1962 538 1951 586 3834 564 3845 551 1974 538 1973 523 1961 551 1965 523 1960 665 1882 611 1856 548 1955 729 1804 516 2057 466 1946 552 1961 522 3871 532 1975 611 3764 580 3838 584 1929 632 3816 554 3831 569 1925 564 3830 577 1925 584 1946 555 3820 585 3828 581 1938 578 1902 591 1921 589 1947 541 3830 595 3810 564 3857 549 3840 588 7645"

We should also think of a good name for the protocol Smile
 
Reply
#48
i named it "threestation" like the threechan (as it seems to be not far from this protocol)
 
Reply
#49
Maybe unimart because that is what is on the photo's. Protocol is pretty different.
 
Reply
#50
ok why not, let's do it first :-)

Are you sure about threestation->rawlen = 88; (from pilight-debug it's 86)?

here is what i have in the log after injecting the data
Code:
[May 05 23:59:57:927152] pilight-daemon: DEBUG: socket recv: {"message":"send","code":{"code":"594 7631 597 1934 536 1991 548 1944 543 1933 561 3836 557 1962 538 1951 586 3834 564 3845 551 1974 538 1973 523 1961 551 1965 523 1960 665 1882 611 1856 548 1955 729 1804 516 2057 466 1946 552 1961 522 3871 532 1975 611 3764 580 3838 584 1929 632 3816 554 3831 569 1925 564 3830 577 1925 584 1946 555 3820 585 3828 581 1938 578 1902 591 1921 589 1947 541 3830 595 3810 564 3857 549 3840 588 7645","protocol":[ "raw" ]}}
[May 05 23:59:57:927649] pilight-daemon: DEBUG: client disconnected, ip 192.168.1.11, port 58788
[May 05 23:59:57:937251] pilight-daemon: DEBUG: **** RAW CODE ****
594 7631 597 1934 536 1991 548 1944 543 1933 561 3836 557 1962 538 1951 586 3834 564 3845 551 1974 538 1973 523 1961 551 1965 523 1960 665 1882 611 1856 548 1955 729 1804 516 2057 466 1946 552 1961 522 3871 532 1975 611 3764 580 3838 584 1929 632 3816 554 3831 569 1925 564 3830 577 1925 584 1946 555 3820 585 3828 581 1938 578 1902 591 1921 589 1947 541 3830 595 3810 564 3857 549 3840 588 7645
[May 05 23:59:57:937787] pilight-daemon: DEBUG: **** RAW CODE ****
[May 05 23:59:59:267098] pilight-daemon: DEBUG: successfully send raw code
[May 06 00:00:03:834800] pilight-daemon: DEBUG: socket write succeeded: {"origin":"config","type":3,"uuid":"0000-00-00-01-6995ed","devices":{"RpiTemp":[ "temperature" ]},"values":{"timestamp":1399327203,"temperature":41160}}

[May 06 00:00:03:835477] pilight-daemon: DEBUG: broadcasted: {"origin":"config","type":3,"uuid":"0000-00-00-01-6995ed","devices":{"RpiTemp":[ "temperature" ]},"values":{"timestamp":1399327203,"temperature":41160}}
[May 06 00:00:03:835827] pilight-daemon: DEBUG: broadcasted: {"code":{"id":1,"temperature":41160},"origin":"receiver","protocol":"rpi_temp","uuid":"0000-00-00-01-6995ed"}
[May 06 00:00:10:366037] pilight-daemon: DEBUG: caught minimum # of repeats 1 of x10
[May 06 00:00:10:366321] pilight-daemon: DEBUG: called x10 parseCode()
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
Lightbulb [Fully Supported] Kaku Door sensor (AMST-606) geerttttt 53 24,643 10-19-2019, 06:26 PM
Last Post: curlymo
  Bresser 3Ch weather sensors Harald654 13 4,600 02-15-2019, 01:06 PM
Last Post: saak2820
  [Fully Supported] DHT22 IcedEarth 86 31,953 11-18-2018, 09:33 AM
Last Post: curlymo
  Weather Station Globaltronics GT-WT-01 Prutsky 13 7,135 04-09-2018, 07:34 PM
Last Post: NevelS
  [Fully Supported] Arctech Old Martin 111 35,886 03-27-2018, 04:43 PM
Last Post: genfersee
  [Fully Supported] Clarus Switches Marcin 69 24,841 01-30-2018, 07:10 PM
Last Post: Niek
  [Fully Supported] Remote Control Socket (RC101-U/RC201) Sean 18 10,822 01-04-2018, 06:18 AM
Last Post: ettman8
  [Fully Supported] LM75 and LM76 temperature sensor horst_dieter 64 25,369 11-19-2017, 08:54 PM
Last Post: edepi
  Weather Underground "wunderground" humidity wimThoelke 6 1,536 10-23-2017, 09:44 PM
Last Post: wimThoelke
  [Fully Supported] No-brand temp/humidity sensor (alecto_ws1700) meloen 57 35,531 12-25-2016, 09:53 PM
Last Post: creamers

Forum Jump:


Browsing: 2 Guest(s)