What components are you using for the charge controller and the battery?
For the 3dprinted enclosure, what are you planning to do to keep it water tight?
I had a similar project last year but instead of the soil moisture sensor, I was using it to turn the water on/off to water the garden. That one needed a little more juice to trigger the locking solenoid valve so I had to do a 2s 18650 setup.
I see in your notes in the code that smartsleep didn't work for you?
I actually thought smartsleep with home assistant worked pretty well. What did you run in to?
@fsgraz Did some testing Today and my RFM range is over 80 meters node to node, with no long range antenna. That will be my next test, just waiting for a shipment from China to arrive. I did how ever notice an extreme improvement when I connected the gateway through a USB hub and then started to dig through the forum. @AWI once wrote about using an external PSU to power the long range NRF PA/LAN. I'll try that this weekend as connecting it to they USB port of my PI extended the range to 20 meters Node to Node.
@Paul-Scarbro There are multitude of solution, but since we are in MySensors Land, let's do a MySensors solution. You'll quickly see that doing that adds a lot of overhead.
We'll use an Arduino Nano or RF Nano if you're going to go whole hog. It can be run from 3.3V or 5V DC, not AC.
The reed switch would be connected to an input of the Nano and one of the outputs would drive a relay. The relay would drive the chime.
Your C++ program would be something like:
#define inputButton 2; // connect reed switch here
#define outputRelay 4; // connect relay to this pin see MySensors Relay example
#define RELAY_ON 1 // GPIO value to write to turn on attached relay
#define RELAY_OFF 0 // GPIO value to write to turn off attached relay
void setup() {
pinmode(inputButton,INPUT);
pinmode(outputRelay,OUTPUT);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(inputButton) == 0) {
digitalWrite(outputRelay,RELAY_ON);
wait(2000); // wait 2 seconds
digitalWrite(outputRelay,RELAY_OFF);
// now wait for door to close
while(digitalRead(inputButton) == 0) ; //does nothing until reed switch opens
}
}
There are some subtleties that I may have glossed over, but this is the gist.
By looking at the MySensors Relay example, you'll see how to integrate this into a MySensors environment. That's where you'd want to get the RF Nano.
I've made the assumption you're familiar with the Arduino IDE and you've looked into the MySensors environment.