• 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


GRUNDIG QH-831A Doorbell
#1
Hello everybody.

I am a newbie, but I really want to dive into implementing new protocols for all of us. So please help me to start. Thank you so much.
To keep it short and simple, your time is precious...

Equipement:
Raspberry Pi3, pilight 7, Attiny45 Filter v3.0, Antennas

Aim: to recognize my GRUNDIG QH-831A doorbell via pilight-receive and pilight_ctrl in FHEM

Done:
1. Read out RAW_LENGHT and PULSE_LENGHT(min/max/average) via pilght-debug
2. Copied existing protocol-files to /433.92/grundig.c and grundig.h
3. Adjusted PULSE_LENGHTHs and RAW_LENGHT in grundig.c (and replaced the protocol's name of course everywhere)
The rest I left "as it is"
4. Replaced the protocol's name in grunding.h
5. 433.92/protocol_header.h -> #include "grundig.h"
6. 433.92/protocol_init.h -> grundigInit();
7. service pilight -> stop -> start

Problem:
1. pilight-receive: no reaction
2. typing "pilight-send -p grundig" -> ERROR: this protocol is not supported or doesn't support sending

Question:
1. What do I have to do that the new protocol is recognized/implemented?
2. It would be sufficient to me to say:
if(RAW_LEN==36 AND 173<PULSE_LEN<176) --> send Message "Recieved"
What to do?

Dear communitiy, dear reader: thank you so much for any advice!
 
Reply
#2
(03-21-2017, 12:49 AM)malte Wrote: 4. Replaced the protocol's name in grunding.h
5. 433.92/protocol_header.h -> #include "grundig.h"
6. 433.92/protocol_init.h -> grundigInit();
7. service pilight -> stop -> start

Problem:
1. pilight-receive: no reaction
2. typing "pilight-send -p grundig" -> ERROR: this protocol is not supported or doesn't support sending

Question:
1. What do I have to do that the new protocol is recognized/implemented?

Wait, did you recompile all of pilight and reinstall it? I'm just looking at this for the first time, but it looks like all the protocols are compiled in to the binary.
 
Reply
#3
TinkerBearNZ - thanks a lot. No, i did not. I'll have to find out how to "recompile all of pilight and reinstall it".
 
Reply
#4
(03-21-2017, 10:18 AM)malte Wrote: TinkerBearNZ - thanks a lot. No, i did not. I'll have to find out how to "recompile all of pilight and reinstall it".

Yea, I would be more helpful... but I don't actually know how to do that myself. Unsure

I just gave it a quick try, and I clearly have not been using unix in a while.

You've got the source tree (since you've been editing it), so you've got that taken care of. "make install" isn't going to work, so I tried running "setup.sh" in the pilight source directory.

Ah, needs "cmake". "sudo apt-get install cmake". Now it needs "dialog" - it would have been nice if it said that earlier... "sudo apt-get install dialog"

Now if fails at "Looking for libpcap - not found". "sudo apt-get install libpcap" doesn't work, so something more subtle is needed... and I'm going to bed. I'll look at it tomorrow.
 
Reply
#5
Read the section in the manual there is a step by step instruction for all packages required.


Gesendet von iPhone mit Tapatalk
 
Reply
#6
Here's the mentioned section of the manual:
https://manual.pilight.org/en/installation (Page 3 : Manually Compiled Version)

I'll have to find out in which files of the sources one has to insert a line for a new protocol beeing compiled, and then I'll give it a try.
 
Reply
#7
The only other file you do need to edit is CMakeConfig.txt.
This file is the base for the user interface of Setup.sh to select a protocol or to disable it.

Most protocols are repeated several times, between the repetition is a gap of predetermined length, either caused by a header or a footer.
The first step is to determine the length of your protocol (e.q. the number of raw pulses including the footer pulses).
The second step is to determine the gap length between two footer value.
Once you have mastered this, the pilight-daemon will call the two callback functions validate and parsecode.
validate performs additional tests of the protocol, parsecode converts the raw pulses into binary and calls the function createMessage. createMessage saves the decoded data in JSON elements.

pilight-receive reports the JSON elements and its values to the user.
 
Reply
#8
Hey wo_rasp, thank you so much! your help's great!

Together with that www.pilight.org/modules/protocols/ I am sure I will "make it" ;-)

Thanks a lot for your time and knowledge !!!
 
Reply
#9
Hello, yes, I made it: I compiled my new protocol named grundig!

But now I got REALLY lost again and do not know how to go on.

As I said, I only want this protocol to recognize that the doorbell-button has been pushed and then send a message, which is recieved by pilight-receive (and pilight_ctrl in FHEM).

(a) Message-sending
But I don't get it why no Message is sent. For testing purposes I also inserted a sendMessage(1,1,1) to the grundigInit(void). I thougt now I should recieve this testmessage in pilight-receive on initialisation of the grundig-protocol. But nothing happens.

Here is my current grundig.c (see attachment)


> Why is none of my messages sent? What to do to make it work?

> How can I see if and why not my conditions in "static int validate(void)" are fulfilled?
How can I output (see) the values of let's say
Or how can I see if validate() is even called?

> Where and how can I learn about the state and meaning of the variables and debugging my skript?
Possible to output f.e. grundig->raw[grundig->rawlen-1] or grundig->rawlen ?

(b) Analyzing the signal
Analyzing the signal of the doorbell I get confused about the different results between pilight-debug and pilight-raw.
pilight-raw shows that the doorbell sends 30 and more raw-signals per button-press, and they all seem to be a bit different.
pilight-debug only shows a few of these signals, and the shown raw-code seems to be modified (higher numbers).

But the pulse-length seems always to be between 174 and 175 (footer divided by 34)

I really do not understand how to read and to handle the correlation of the output of pilight-raw and pilight-debug and the footer and why you have to divide it by 34 to get the pulselenght and how to determine the gap length between two footer values (as wo_rasp says). And I do not know what to do with this gap-length.
It seems I don't know anything.
Is there any tutorial for really interested newbies?

© Talking to the bell

The following is, what pilight-debug shows when I press the doorbell button:
Raw code: 1050 525 1050 525 1050 350 1050 525 1050 1225 350 525 1050 1225 350 1225 350 1225 175 1225 350 525 1050 525 1050 1225 350 525 1050 525 1050 525 1050 525 1050 5950

Sending this RAW-code makes the doorbell ring - sometimes. Why only sometimes? Sometimes it works a few times in a row, then sometimes i have to send the code 10 times before the bell rings. I do not understand the logic behind that behavior either.


Can anybody help me to get a bit further with all these questions, this lack of knowledge and curiosity?
Is there any documentation where I could learn more about the basics which I need for developing this recieve-one-button-protocol?


Thanks a BUNCH for every second you give reading my questions and answering!


Attached Files
.txt   pilight_c.txt (Size: 2.31 KB / Downloads: 5)
.txt   grundig_pilight-raw2.txt (Size: 10.79 KB / Downloads: 4)
.txt   grundig_pilight-debug2.txt (Size: 3.67 KB / Downloads: 2)
 
Reply
#10
Too many questions? Just pick one ;-)

Is there ANY tutorial which could help me to learn the basics I need?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  SelectPlus Doorbell Luppie 11 10,608 05-31-2020, 07:46 PM
Last Post: woutput
  Eken Wifi Doorbell (V5) geerttttt 16 8,362 07-26-2019, 07:03 PM
Last Post: michielvv
  Byron SX33T doorbell sfinx 0 1,850 12-30-2017, 09:24 AM
Last Post: sfinx
  SilverCrest Doorbell diman87 29 25,574 05-24-2016, 03:28 PM
Last Post: diman87
  Heidemann HX70830 Doorbell whytitty 0 2,677 07-27-2015, 09:00 PM
Last Post: whytitty

Forum Jump:


Browsing: 1 Guest(s)