Posts

Introductions

 At Martlesham Heath in Suffolk, UK, we have a small group of enthusiasts who like to tinker with gadgets and write code to make things work.  We meet most Fridays for a coffee and a chat about our own projects and the progress, or not, that we are making. Our website is https://www.codingforcodgers.co.uk/  This blog shows what I have achieved in 2022 and in the following time period. In 2022, I was given two Raspberry pi model 3Bs and I bought a model 4 starter kit too.  On the model 4, I have installed Home Assistant.  This brings together all information and control of all the home gadgets such as lights, sensors, my weather station, etc. I have posted a page per project to describe what I have done. This links to the next page   Next page

Doorbell notification to phone

 Doorbells are useful in that they let you know when someone wants to come into your house or deliver a parcel.  But what if you are in the garden or away from home?  You can buy expensive doorbells with video and the ability to let you talk to the person at the door via your mobile phone or you can try to do something simpler on the cheap. We had a bell push button linked to a 6 volt battery operated ding-dong chime.  I added a wire from the push button circuit, reduced the voltage to 3 volts, and connected this to a GPIO pin in the Raspberry pi model 4.  It could then sense when the voltage went on/off on a bell button push and, in theory, send a notification to my mobile phone.  It sort of worked but the notifications seldom came through so I guess I had something wrong in the code. We were struggling to hear the ding-dong chime, partly due to increasing age and partly due to the cheap bell push button, which people never seemed to press in the middle so...

Home Assistant

Home Assistant (HA) brings together all my gadget information so that I can see it in one place at any one time - either my PC or my phone.  My phone has the HA app so that HA can trace it, etc. I set up HA on the Raspberry pi model 4.  See here  for instructions on HA. I did try some of the various setup options but settled on the basic one.  HA is an operating system  in itself so I thought that the separate model 3Bs could be independent and send it data.  This seems to work well.

Weather station

Image
 I have a Raspberry pi that collects data from my weather station and transmits the data to Home Assistant and also to the Codgers website. Data includes atmospheric pressure, temperature, humidity and rainfall.  Pressure is measured using a BMP280, the next two variables use a DHT20, and rainfall is collected with a tipping bucket and recorded every 5 minutes. The instruments are housed in a home-made Stevenson screen. In February 2024, I added a DS18B20 temperature sensor, which is waterproof.  This is a "1-wire" connection to the pi and needs a resistor in the circuit (4.7K but I used 10K). I buried the sensor at 10cm depth under the lawn to record soil temperature. In December 2024, the top blew off in a storm and data went a bit haywire so there is a two day gap in data.

Vehicle tracker and boat sensor display (Project Samosa)

Image
Project Samosa The yacht club (APSC) bought a Jeanneau 36i in November 2024 and we thought we could add a few extra sensors and display data on an app using a tablet. MIT App Inventor is quite easy to use and free.  I have bought an ESP32 that gathers the data from the sensors and sends it to a pi Compute 4 (Sail Assist) that also sends boat data to the tablet. More later... Vehicle tracker (not used any more) My "van pi" (thanks Sue H) has various sensors attached. I have an independent leisure battery.  I have to charge this separately, as and when, at the moment.   Battery monitoring: I have an INA219 battery sensor that shows voltage, and current / power being used. I have a DHT20 sensor that measures temperature and humidity in the van (but in a cupboard where the sensor is located). A python program I called vansensors.py collects the data and sends it via MQTT to HA. I have a USB gps unit that lets the pi know where it is.  I have a program, gpsdatatest....

Other sensors

Image
Moisture sensor I want to measure the moisture in soil.  This could be used to switch on watering for plants in pots, for instance.  But I also want to measure actual soil moisture in the field. I bought a cheap i2c capacitive moisture sensor from Cool Components for less than £10 including postage.  I had to get a socket with leads too (a Grove 4 pin) as the standard Dupont cables are slightly too fat to fit in a line together. I just had to snip off a locking tab to make it fit. I tried connecting to a pi that had the Buster o/s but this was too old, so I connected it to the pi with Bullseye o/s, which was fine. To get the libraries and python program code, I followed 'Data 36' on YouTube (checkout data36.com).  You also get temperature in the output. I have an LCD screen attached to this pi, so when I am outdoors with the pi running on a battery pack, I can see the info.  Neat!  Next, I have to calibrate the sensor so I know what the moisture content val...