Advanced Version: Beacon-Powered Reminder To Take Out The Trash by Rod U.

HA dashboard

Thanks very much to Rod Urquhart for creating this more advanced version of the basic “take out the trash” project. Lots of cool stuff implemented here that greatly enhance this project, plus these methods can be used on other projects as well. Nice work, Rod!

Here’s Rod’s write-up below:

Bin Project Instructions

Follow the instructions below to install this project into your instance of HA. This was written for the UK in the instance where both black and brown bins are collected on a Wednesday, and the green bin is collected on alternate Wednesdays. If your collection times/days are different, you will need to edit the code to suit the correct ISO week (odd or even) and the correct ISO day (both for the day before and the day after your collection) for EACH beacon on your bins. Should you run into any problems installing this project, then please email me for further help: [email protected]

Note that this code comes with NO guarantees as to it’s functionality on your particular instance of HA, and I will not be held responsible for any issues that arise, or if it results in your instance of HA malfunctioning. Also note that you will also need to have installed “card-mod” via HACS in HA and be running the MQTT broker add on in HA as well.

This project utilizes the following beacon which you will need to purchase direct from Blue Charm at https://bluecharmbeacons.com/product/bluetooth-ble-ibeacon-bc04p-multibeacon-water-resistant-with-motion-sensor/

You will also need the BLE gateway that captures the data the beacons broadcast and sends it via MQTT to your HA instance: https://bluecharmbeacons.com/product/bcg04-ble-gateway-beacon-scanner/

Details on setting these up are available on Blue Charm’s website: https://bluecharmbeacons.com/beacon-powered-reminder-to-take-out-the-trash/

NOTE: This project is an adaptation of the project example you see on their website. However you ONLY need to follow their guidance to set up the beacons and the gateway, then continue as below once you have done that.

Here are the steps you need to install the bin project.

1. Unzip the folder “rubbish-bin-project.zip” (download the zip by clicking here).

2. Copy the following folders and their contents to the root directory of your HA instance binary-sensors
mqtt
sensors
templates

3. Ensure you reference these folders from your main config.yaml file, thus: sensor: !include_dir_merge_list sensors
template: !include_dir_merge_list templates
mqtt: !include_dir_merge_list mqtt
binary_sensor: !include_dir_merge_list binary-sensors

4. In each of these folders you will need to check each file and where indicated, replace the placeholder text (i.e “your-black-bin-beacon-UUID-goes-here”) with your own black-bin beacon’s UUID. Ensure you do this for each beacon and also each beacon’s vibration UUID accordingly.

5. Where indicated replace the Gateway MQTT Publish topic with that of your own

6. Where indicated replace the placeholder text with your own beacon’s MAC address for each bin

7. Copy all the images into the root folder in HA, by placing them in the sub-folder /wwww/backgrounds/

8. In your dashboard, open the raw configuration editor and paste the entire contents of card.yaml into where in your dashboard you want it to appear.

9. You will need to create the following helpers via the UI in HA. Please adhere to the names as shown, changing only the colour to Black, Brown or Green for each helper you create. Type: Input Number
Min Value: 0
Max Value: 3
Name: “Black Bin Emptied Count” Repeat this for your brown and green bins, naming them accordingly Type: Input Number
Min Value: 0
Max Value: 3
Name: “Black Bin Reminder Count” Repeat this for your brown and green bins, naming them accordingly Type: Input Number
Icon: mdi:chart-line-stacked
Min Value: 0
Max Value: 100
Name: “Black Bin Signal Threshold” Repeat this for your brown and green bins, naming them accordingly Type: Input Boolean
Name: “Black Bin Emptied” Repeat this for your brown and green bins, naming them accordingly Type Input Datetime
Name: “Last Black Bin Notification”
Select option: Date & Time Repeat this for your brown and green bins, naming them accordingly

10. Copy and paste each of the Yaml files in the /automations/ folder into HA. You will where appropriate need to change the times used by each automation and/or the names of your mobile devices and Alexa devices accordingly to suit your own.