i want to
turn on the WS2812 LED to green, if stall_klappe_auf is on
turn on the WS2812 LED to red, if stall_klappe_zu is on
turn on the WS2812 LED to yellow, if stall_klappe_auf is off AND stall_klappe_auf is off
flash the LED in blue. if Water-Temp is <=0 degree (keeping the previos state colour)
i am hanging on doing the action, tried something like this but i always get errors, syntax maybe…
(the rainbow-effect is only to test if the led works)
I want to get the esp let take control, not HA, so even WiFi is lost it still runs and open/close the door if getting dark or bright. HA will be used just for monitoring or manual open/close door.
@pedolski:
in my earlier versions of chicken-control i also used a stepper motor, but because it is outside of the house it might get dusty or wet , so i made it with a geared 12v motor and a chain, this is very strong.
I also use 2 switches inseatd of magnetic switches, those had failure some times! @atomicpapa:
what pics you would like to see? Motor/door/house or of the chicken?
i got further today: i can switch on the inside-lights if human-door is opened, stop the motor when up or down position is reached and turn the ws2812 to red when closed, green when opende and yellow when not closed and not opened. also turn on the 230v fan if inside-temp is over 30degree. takes some time to understand esphome…
here my listing from today 18.10.2022:
Waiting for a 12V SMPS, new LDR and new DS18B20 waterproof.
Additional there also comes a little heater, so the water for chickens doesnt freeze.
If everthing is working well, i will make a pcb layout, so everyone can use this.
It is not only for chicken houses, there could be many uses .
If someone finds some errors, bad coding oder has hints for make it better i am thankful for suggestions!
EDIT: how can i turn on ws2812 Rainbow-Effect on boot? (Syntax?)
C:\Users\mega->esphome run D:\Home-Assistant\Huehnerstall2.yaml
←[32mINFO Reading configuration D:\Home-Assistant\Huehnerstall2.yaml...←[0m
←[31mERROR Error while reading config: Invalid YAML syntax:
mapping values are not allowed here
in "D:\Home-Assistant\Huehnerstall2.yaml", line 20, column 18:
effects:
^←[0m
EDIT:
Ah, ok! found it!
but it does not work as aspected: The WS2812 turns on but only bright white, no effect!
on the esphome website i can select the effekt and turn it on by hand, so the effect itself works…
EDIT2:
i found out that the effects even won’t work on other part of code, i’ve tried it at the binary sensor on_release call. it still only turns on full white.
Well, it is not a real must-have feature i need, so i can control it later in HA if i want to.
only thing i assume is: light.turn_on overrides the following effect…
My new LDRs and DS18B20 and the PSU has arrived, i think i find the time on weekend to assmble it into the chicken-house (and make pictures )
First assembly was nearly finished, but i made an mistake and killed my esp…
Now with the new esp it runs as it should!
Some little things i have to do like connecting the inside-light to the relays, assemble 2 power-outlets for Outside Lights and water-heater, but main function works, the little door opens when it gets brighter and closes if it gets dark outside, fan starts if inside-temp is greater than 30 degree (to prevent cooking of the eggs ), turn on little heater if drinking-water gets below 0.1 degree (chicks dont eat ice).
Here 2 Pictures of the chicken and the hoese: (not all chicken visible, 4 of 8 Chickens)
Picture of the door-mechanic and the esp with electronics coming!
BTW: the whole thing runs without mainpower! i’ve got a little MPPT Charger connected to 4 small PV (80W) and a 12V/7Ah SLA Battery with a 5V StepDown Converter. Ther is a 12V PSU coming though just for backup.
The Fan and the heater are running on 230VAC…
One importend thing is to mention: I have the door-up-contact connected to GPIO 0, that switches the esp into flash-mode, when a powerup or reset accours with door open!
At the moment i put a little switch into that line, but i am thinking of a additionel small relays.
Took me some time to find out why the esp didnt started For the future: a firmware update only at night when door is closed
I need to have start a timer wich counts down if light detection has reached a certain level!
I found out if there is a car with high-beam passing by the LDR gets high values, even if it is a short time it reacts and opens the door!
I was looking for a timer in esphome but couldnt find one.
Can someone help?
Something in the lambda maybe?
if have watched the behaivior of the chickens, at a certain level of darkness they all get together, have a small-talk and go all into the house. The Switch-Down level of brighness is about 60min after they went into the house, so there is enough time-out for them.
in over ten years i only had it one time and the chicken was sitting under a rain-cover outside, when its getting dark they cant see anything so it stayed there.
First i thought about RFID-Rings on each chicken on the right leg, so i could count them and could see if they are going in or out, but i cant get a rfid distance of about 20cm, so that idea was for the trash…
But i have a look every evening to say good night