Do you want a way to leave messages for your loved ones, but you're actively boycotting 3M and can't use Post-it Notes?
Then this is the solution for you!
LuvNoots is a wall-mounted display that shows text messages on a large ePaper screen. It also shows the weather, because IoT.
Any plain SMS text message sent to the device's phone number will show up, so you can give that number to a spouse, family member, or friends and they'll be able to leave messages.
To keep everything free, this requires a complicated chain of software and internet services. Be sure to watch the video so you understand how it works!
You'll need:
- A home server running Home Assistant and an MQTT broker
- Two Gmail accounts, one of which needs to be registered with a phone number for Google Voice
- Zapier and Zapier Email Parser accounts
The hardware is actually pretty simple.
The ESP32 development board connects to the ePaper display's controller board via SPI. The only other hardware connection is the button, which connects to ground and pin 22.
Those fit into the 3D-printed enclosure, which needs 8x M2 heatset inserts (4mm long) 8x M2x4 screws.
ESP32 CodeI programmed the ESP32 using the Arduino IDE. If you want to use it exactly as is, you'll need to install the ArduinoHA library and the GxEPD2 library, along with Adafruit's FreeSans24pt7b font.
Just plug in your WiFi credentials and you MQTT broker's credentials, flash the code, and setup the software chain (described below).
As usual, I have very thoroughly commented my code, so you can understand everything that happens if you read through that.
Software chainFirst watch my video to learn the path a message takes from a sender's smartphone to the LuvNoots device, and why I set it up that way. Once you understand that, you can do the following:
Gmail
Create two Gmail accounts (or use ones you already have). The second shouldn't receive emails from anywhere else, because Home Assistant will attempt to display any emails it sees on that account.
The first account should also be registered with Google Voice so you can get a phone number. Set it up so that it forwards any text messages as an email to your account (the same account).
Then create a filter that takes any emails from Google Voice and forwards them to your Zapier email, which you'll set up using the instructions in the next step.
Zapier
Create a regular Zapier account, then go to the Zapier Email Parser (ZEP) and use those credentials to create an account there, too.
In the ZEP interface, you'll create an email inbox. That is what you'll forward your Google Voice emails to.
You can then train ZEP on which text to extract, which should just be the content of each text message. Send several text messages to reinforce the training.
Then you can create a Zap (in the main Zapier dashboard) that takes the extracted text message and forwards it. You should set it up to forward as an HTML-formatted email to your secondGmail account. I have my setup with the body like this:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“https://www.w3.org/1999/xhtml”>
<head>
<meta http–equiv=“Content-Type” content=“text/html; charset=UTF-8” />
<body>
<p> [ZPE parsed content] </p>
</body>
HomeAssistant
Make sure you have Home Assistant running properly on your home server, then install the IMAP, MQTT, and Open Weather Map integrations.
You will also need an MQTT broker running on your home server—I'm using Mosquitto.
Setup IMAP with your second Gmail account. The idea is that Home Assistant will receive any email sent by Zapier, which will contain justthe plain text of the original SMS text message.
Now create a new automation for sending weather data. Switch to the YAML editor and use this code:
alias: LuvWeather
description: ""
trigger:
- platform: time_pattern
minutes: "30"
condition: []
action:
- service: mqtt.publish
data:
topic: DailyWeather
payload: >-
{{ states('weather.openweathermap'),
state_attr('weather.openweathermap', 'temperature'),
state_attr('weather.openweathermap', 'humidity'),
state_attr('weather.openweathermap', 'wind_speed') }}
mode: single
Now create a second automation for sending the text message content. Switch to the YAML editor and use this code:
alias: LuvNoots
description: ""
trigger:
- platform: event
event_type: imap_content
id: custom_event
condition: []
action:
- service: mqtt.publish
data:
retain: false
topic: LuvNoots
payload: "{{ trigger.event.data['text'] }}"
mode: single
TestIf you're going to be using LuvNoots in exactly the same way I've done, this should be all you need to do.
But I found that ZEP took a bit of training (5-10 messages) before it was reliably extracting the correct text from the email. If some messages aren't going through, that's what you'll want to check.
Home Assistant's MQTT integration also seems to limit messages to around 240 characters and they must be plain text to display properly. If either of those isn't true, the message either won't display at all or will show up garbled.
Enjoy!
Comments