• 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

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Done] Doorbell GPIO input (gpio_switch protocol)

I recently installed pilight. And I really like it!
There's only one small problem with a c-script i wrote myself.

I'm using wiringpi to read a GPIO input and send a curl command.
(doorbell notification via pushover to iphone)
Now with with pillight installed, everytime I switch my lights, i get a message. Could it be that the wiringPi library I had already installed is conflicting with the pilight-wiringPi library?
And is there an easy workaround?

Thanks in advance,
What GPIO ports are you monitoring ?
Currently I'm using GPIO 7 as pilight output and 0 as input.
My doorbell script is using GPIO 2.

Is it possible to use the wiringpi.h from pilight? When I include it, I get the message: "undefined reference to wiringPiSetup"?

I think it would be good to have a new protocol created or the relay protocol extended to read GPIO input state as well to simply show the status at GUI and work at pimatic with it.

Further reading values at i2c bus would be great. This was asked/answered at http://forum.pilight.org/Thread-Done-Int...light=gpio but I don't see and options or I misinterpret what was meant at Thread.

Current workarround could be the external script looking at GPIO ports and using generic_switch protocol to visualize the state at pilight.

Regards Martin
So people are actually using a RPi as a doorbell?
Yes, I've connected the doorbell with a opto-coupler to a gpio pin.
On the Pi there's a script which sends a pushover notification via Curl.
I also detect the doorbell, by i2c bus, and activate then with pilight-send a rf doorbell in the garden.
It would be usefull if there's a protocol which can detect a GPIO input.
settings could be:
- debounce time
- adres GPIO / I2C
- execute script
If I just had time for developing a protocol like this....
(04-16-2014, 04:41 AM)curlymo Wrote: So people are actually using a RPi as a doorbell?

It's easy as there are many houses with the electric cabinet near the front door, or wiring from the doorbell going through the electric cabinet. It's also pretty common to have the rpi in this electric cabinet or am I the only one Wink I like the idea!
What about creating some sort of generic protocols but then for gpio such as:

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Done] generic_label protocol diman87 2 3,474 03-26-2015, 08:15 PM
Last Post: curlymo
  [Done] Presence Detection (ping protocol) atahualpa 3 3,247 01-07-2015, 07:01 PM
Last Post: curlymo
  [Done] Datetime protocol, day of the week Niek 1 2,590 01-05-2015, 08:14 PM
Last Post: curlymo
  [Done] Interacting directly with GPIO (or i2c gpio-devices) keykiller 1 2,623 09-26-2013, 06:18 AM
Last Post: curlymo
  [Done] The generic weather protocol is not generic enough Tweakertje 4 3,815 09-25-2013, 08:16 PM
Last Post: curlymo

Forum Jump:

Browsing: 1 Guest(s)