Project: Automated Chicken-House closing lid


(Marc) #1

What i want to document here (if anyone maybe needs it):
Im bored of closing the door of our chickenhouse every day after sunset, so i thought about a way to close it automatic. first i wanted to have an out of the box solution - but after a few research and after i started using OH i decided to build an automated lid.

the trigger will be a light sensor which i will check with an OH-rule, this rule will then control a wemo plug or something (tips welcome)

i will update this thread to cover my progress.

what i have ordered so far:
the closing lid: https://www.amazon.de/gp/product/B01MRZ2ZAR/ref=ppx_yo_dt_b_asin_title_o00__o00_s00?ie=UTF8&psc=1

the motor, which will pull the lid: https://h1.huehnerklappe.de/sondermodell
i chose a “dumb” on/off motor which is built for home automation systems.

i will update this thread to cover my progress.
stey tuned


(Eric Zenz-Matzl) #2

Nice idea.

I think you don’t need a light sensor, cause OH has a really nice Astro Binding for Sunset and Sunrise.
Also you should check if the door is not blocked by a chicken.

Can you be 100% sure that all chickens are inside when you want to close the door?

I found something similar on Kickstarter some days ago :sweat_smile:
Maybe it will help you with your project.

chicken door


(Vincent Regaud) #3

I can imagine each chicken with a small back pack and GPS tracker!!!

Joke apart, this is an interesting question. A stray chicken will be stuck outside for the night and the fox might get it.
Depending on how much hardware you are fitting inside this chicken coop, how are you going to count your chickens?


(Eric Zenz-Matzl) #4

Love this idea :rofl::rofl:


(Rich Koshak) #5

Since we are brain storming, an IR RaspiCam and some relatively simple OpenCV code should do it. Of course with the camera you can just check the feed manually.

Isn’t it fun how a simple DIY automation project explodes into a big complex job. :smiley:


(Marc) #6

haha guys, like your thoughts - thanks for the ideas :smiley:
the kickstarter project is quite similar - but only available in north america.

basically i only thougt about entry at the moment, but when we are at it,… a friend of mine has a company that does NFC entry systems, i could ask him to produce me kind of “nfc beacon” for the chickoes.
then i would only need 1) the hardware reader that checks the entry, 2) a simple db or flatfile that holds the id´s of the chicks (00: chickoletta, 01: brownie …)
question is: how near (or far) can the chicks pass the NFC receiver.

ad camera - i have an old raspi 1, anyone an idea how to best make a OH capable webcam out of it? old webcam over usb? a camera module?

other ideas atm: heatable water-desposer, small IR or other heating system, automated over a senser to OH…


(Rich Koshak) #7

I’d do one of the Infrared RaspiCams. They are inexpensive and can see in the dark using an IR LED to illuminate the space. So you can see in the coop without turning on a light and disturbing the girls. I think one can convert a USB camera to an IR camera if you take it apart and physically remove the IR filter. But where it is and what it looks like will depend on the make and model of the camera.

For software I think MotionEye is the most popular software to use to stream and record.


(Marc) #8

yea i thought about something like this:
https://electronics.semaf.at/Raspberry-Pi-5MP-Camera-with-Fisheye-Lens-and-Night-Vision
ill put the raspi in a bigger case including the cam, orso … have to dig a bit deeper into this, but first the entry ;D


(Marc) #9

ok, for the power on/off ill tempted to go with a sonoff: https://electronics.semaf.at/Sonoff-Basic-WiFi-Wireless-Smart-Switch
has anyone experience with this kind of switch? according to some forum posts you have to flash them in order to make them work correct, fe: Sonoff Binding without tasmota


(SiHui) #10

Yes, you will need MQTT support to connect it to openHAB;

Note that with the new MQTT2 binding the setup has changed!


(Marc) #11

okay thanks @sihui - maybe ill try an other smartplug for outdoor purposes
my WEMO does a good job with my coffemaker indoors


(Eric Zenz-Matzl) #12

There are also waterproof cases for the sonoff basic on ali (normally also on amazon but for a higher price).

I have two of them outside and had no problems since a year with them.


(Marc) #13

hm what do you guys think of a shelly? https://www.amazon.de/Shelly-Schalter-Wireless-Hausautomation-Anwendung/dp/B07G33LNDY/ref=sr_1_1?s=diy&ie=UTF8&qid=1548716115&sr=1-1&keywords=shelly+1

that could be an elegant solotion, the next z-wave device is like 6-7mtrs away, that should work


(Vincent Regaud) #14

Shellies are WiFi devices not ZWave


(Maurits) #15

Instead of counting bees you could be counting chickens (and/or eggs):


(Marc) #16

update: the motor and the lid arrived- next step: mounting the necessary electricity


(Marc) #17

ok now i ordered a sonoff (they were cheap over there at gearbest) and a shelly.
lets see which one i will use here.


(Marc) #18

thinking about the daylight sensor, can you guys give me some hints which sensors i should look after?
available nets: wlan, z-wave, zigbee


(Vincent Regaud) #19

You could attach one to your Sonoff