So, I needed to find a better solution to move away from my Qi chargers for night and quiet and take a step into the unknown.
I found this tutorial and and decided to dive in. I am posting my write up here because that one was quite advanced and I think think it might scare off the new users. This is a project that Markus and I did in an interim we found over the weekend.
GitHub - eoncire/HA_bed_presence: HomeAssitant / ESPHome / NodeRed bed presence and automations
After I read this, I was like YES! That!
I didn’t have components lying around, so I had to start from scratch.
If you’re ordering up your ESP32 make sure it works with Tasmota. This project is Tasmota driven.
Here is a list of what I bought:
The kit I ordered contained a breadboard, which you’ll need. 5k Ohm Resistors. Markus used 4k7. And solid jumpers.
I ordered stranded wire, and I regretted it because I had to tin the ends with solder when I wanted to cut to length. My soldering skills need work, be we won’t talk about that
So, let’s get a bit more granular than the github walkthrough. I want to note that Markus helped me with this. I wouldn’t have been able to make heads or tails from this.
With your breadboard in front of you do the resistors first. We laid ours out differently as seen below.
I placed the resistors spanning F6 to C9 And F8 to C9 (They can be together,… I’m told.) Notice the pin holes on the tops of the terminal block connectors. They need to line up with the resistor.
The block connectors are staggered. One is in the + 1&3 and the other is in J6&8.
(The wire I ordered was 14 gauge and it was a bit of a chore to get them into the block connectors. Keep that in mind. Might go with a larger gage wire. I had to tip the stranded wires so that I could press them into the breadboard)
I cut one wire and tinned from B9 to F27. Run this one first. Then cut two different wires to length (had to tin the ends) and plugged one in G6 and ran that to D19 and the other From G8 to D20
Last, we used a red wire for power. That one went from the 28 in the plus to H28.
Next attach the ESP32 and make sure that the 3V3 pin is aligned with row 28. We put it in 28i so that it would protect the wires and so that the board doesn’t stick past the breadboard. Keeps things nicely buttoned up.
Next, Cut the wires for the strips. I cut each 5’ long. You don’t want to strain these wires. You should plan out where you’re going to mount the strips and plan accordingly. You will need a micro-b with a 1 amp power brick. The 1 amp is to make sure that things won’t overheat. Keep that in mind. Next, we’re going to solder the wire to the strip. BE CAREFUL not to overheat these. They are a bit sensitive to heat. Red on one side black to the other. Do this with both strips.
TIP: Tin the wire tip. Then press the soldering iron onto the wire that you tipped to melt the solder to the strip. This will help to prevent overheating. Don’t hold it there any longer than necessary. See photo below.
I had an afterthought and ended up adding some shrink tubing to protect the solder and strengthen the connection.
Now don’t power this up yet. Time to flash some Tasmota.
You need ESP flasher
You need this firmware:
tasmota32.bin from here: Releases · arendst/Tasmota · GitHub
We used version 9.5.0 - To flash this connect a micro-b to the ESP32. Press and hold the boot button (printed by the button)
When plugging in to the computer keep that button pressed for a few seconds
then choose the com port that it populates with after you press refresh. Choose your file and flash it.
Refer to the Tasmota documention to configure for wifi. It will boot into access point mode. You can connect to that and configure your wifi.
After you get it connected, use your browser to connect to the ESP and click
Configuration
Set MQTT
Change topic
Then put the room in full topic %prefix%/ROOM/%topic%/ (enter the room where it says ROOM. Change that)
After clicking save, go back to configuration and choose Configure Other
Change the DEVICE NAME only here. click save
Then go back to main menu
Click Consoles
Click Console
Enter these commands separately, press enter after each one
Rule1 ON analog#a1div10 DO status 10; ENDON
Rule1 1
Rule2 ON analog#a2div10 DO status 10; ENDON
Rule2 1
The command below is one line, although it appears on two here. copy the entire command.
backlog module 0; template {"NAME":"ESP32-Pressure","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,0,1,1,0,0,0,0,4704,4705,1,1,1,0,0,1],"FLAG":0,"BASE":1};
Next is to attach the wires to the brick Connectors. Red from both strips into the brick in the + lin 1&3 and connect the two blacks (1 from each strip) into the brick in row J. Make sure they are well secured.
Now you’re ready to install. I used some wide painter’s tape to secure it to the bed. I had to drill a hole through the base (Platform bed) to the back where I mounted the breadboard. Connected power from there. Notice The sensors are placed in the upper 3rd of the bed.
Markus has a bed with storage, so his install was a bit easier (sans the Christmas tree)
He fastened his strips with velcro.
The breadboard is fastened under the boards in the storage area
The flow was a bit more complicated for me as each use case is different. Ultimately, I ended up with a flow that works for my use. I’m happy to help with setting this up. You only need to ask.
Thank you for putting up with me on yet another tutorial. I’ll go back to my corner now and work on CORE.