I wanted to build a very simple skill that tells a user if an item can be added to compost. My hope is that a skill like this encourages others to do more composting (and reduce what is added to landfills). I built the original skill last year, and decided to update it to provide Echo Show/Spot support and add troubleshooting functionality.
What it does
Compost Helper can:
- tell you if an item can (or cannot) be composted
- give you a list of compostable items
- give you tips to fix composting problems (if your compost is too wet, or smelly, or dry)
How I built it
- I created a custom slot called "LIST_OF_ITEMS". This slot contains 100+ household items that a user might inquire about
- I created a JSON list of the items, with the following attributes: Item (oranges), Answer (yes), AddOn (" you add them in small amounts and you open split the fruit").
- I use the Fuse.js library to do "fizzy matching" against the JSON list to find the best match (e.g. napkins = paper napkins = used napkins)
- The JSON attributes are used to construct the reply: "Yes, you can compost oranges if you add them in small amounts and you split open the fruit"
Challenges I ran into
There are a lot of items that can be composted! It took a while to compile the list.
Accomplishments that I'm proud of
My hope is that this helps others that want to get into composting. Plus, I have versions in most English speaking locales (US, Canada, UK, Australia, India).
What's next for Compost Helper
I ultimately want to convert the JSON list into an API that can be used on a website, bot, Alexa, or other devices/technologies. The API would return images (maybe) and additional composting tips (e.g. split avocado pits when composting).