Jump to content

Home Automation using Home Assistant


granvillebarker

Recommended Posts

Merry Christmas everyone, I recently read an article on adventurousway about how Matt has automated his RV.   
 

A few hundred dollars later and many hours of learning about esphome.io, I’m getting it all going.   I’m using 4 channel relay models and single channel relays to control all the lights in my dynasty.    All the original switches still work like they always did.  

In  the pic below you can see several 4 channel sonoff relay modules that have been modified and flashed with esphome firmware to make them work for my needs.

I will be putting together some articles on how I did all this to aid others in doing this as well.   I’m also available for consulting should you assistance in automating your RV.   
 

I have also written code for an esphome module to read Bluetooth tank levels from a garnet seelevel and publish them to home assistant.   I will share more on that and the display for the holding tanks I added to the bathroom with an esphome display module.   
 

Once it’s all setup, I will have control of all the lights and a few appliances, temperature monitoring of everything, remote viewing of the cameras, and holding tanks all in my home assistant app.  

Using home assistant you can just make things smarter having home assistant turn on and off devices based on other events.   

42BA214B-1244-4298-AFF9-B8FFBF07520C.thumb.jpeg.dc34993c2593f7b69ba978a66dd2c0ac.jpeg
 

Granville Barker

2005 Dynasty

  • Like 1
Link to comment
Share on other sites

9 hours ago, cbr046 said:

Back in the day we used kids to change channels.  You've come a long way, Pilgrim. 

- bob

Before we had kids, we got a TV that had a remote.  It had an elect motor on the back side of the rotary channel selector.  The remote had a button that struck a tuning fork sending a signal to the tone receiver on the TV. That caused the knob & selector to advance one channel.   Very rudimentary by todays standards, but very HI-TECH for the time, or so I thought, but who could have ever imagined what was to come.

Remember how all those little finger contacts inside the tuner would begin to lose connection, and you would have to get up go rotate the knob back & forth to clear up  the picture for a little while only to soon have to do it again and again?  Spray cleaner would help for a while, but you knew a new tuner as in your future.

Ah, the good old days.  🤣

  • Like 1
Link to comment
Share on other sites

Went to https://esphome.io/index.html and ignited my imagination.  One application would be temp sensors in various parts of the coach.  Wet bay, fridge, HVAC ducts, dashboard ducts . . . building a connection platform and creating a user interface might be fun (NOT!). 

I didn't see anything about language, just the setup configurations.  Lots to learn (if I wanted to).  This could keep me up at night, but it's better than spider solitaire. 

- bob

 

Link to comment
Share on other sites

I use Sonoff thermostatic switches inside my motorhome and in the water bay to turn on electric heaters and prevent things from freezing. They are linked to a cellular wifi hot spot in the motor home so no matter where it is parked I can monitor the temperature and humidity in the motorhome over the internet. I also have a rotating Wyze cam on the windshield hooked to the same hot spot. It serves as a dash cam while we're driving and a security camera when parked. This is not nearly as sophisticated as what Granville is doing but it doesn't take as much knowledge to accomplish. I consider myself a techy but his system may be above my pay grade. 

Link to comment
Share on other sites

17 hours ago, 1nolaguy said:

Very cool. I guess you do not boondock much. Any guess at what all this will require in the way or amps or watts?

I don't boondock much, and when we do it's usually water related issues for us more than power.   The ESP modules don't use much power, but it all does add up.   I'm also on a binge to change all the 12v lights over to LED, I mainly have the bay lights and chassis running lights left to do.  

I've had most of this stuff on my workbench and tested the current draw, I'll make sure I post a table showing the current draw of each component.   I'll also include the before / after LED for the 12v lights as well, and where I down-sized fuses. 

2 hours ago, cbr046 said:

Went to https://esphome.io/index.html and ignited my imagination.  One application would be temp sensors in various parts of the coach.  Wet bay, fridge, HVAC ducts, dashboard ducts . . . building a connection platform and creating a user interface might be fun (NOT!). 

I didn't see anything about language, just the setup configurations.  Lots to learn (if I wanted to).  This could keep me up at night, but it's better than spider solitaire. 

- bob

 

That's the beauty of esphome, you don't really need to know a programming language, it's mostly just config files in a format called yaml.   Home Assistant also uses config files of the same format.   Behind the scenes it's mostly python and c++, but for the most part you don't have to deal with that.    I've had a few late nights with the stuff lately, great fun!!

  • Thanks 1
Link to comment
Share on other sites

11 minutes ago, Tom Wallis said:

I use Sonoff thermostatic switches inside my motorhome and in the water bay to turn on electric heaters and prevent things from freezing. They are linked to a cellular wifi hot spot in the motor home so no matter where it is parked I can monitor the temperature and humidity in the motorhome over the internet. I also have a rotating Wyze cam on the windshield hooked to the same hot spot. It serves as a dash cam while we're driving and a security camera when parked. This is not nearly as sophisticated as what Granville is doing but it doesn't take as much knowledge to accomplish. I consider myself a techy but his system may be above my pay grade. 

Tom, 

Most of the sonoff devices are esp based and can be flashed with esphome.   Which models do you have?   I've been looking at the Wyze cameras, does the one you have support rtsp?

Home Assistant can run on a raspberry pi, and they have an sd image you can put on an sd card, stick it in the pi, and when you plug it in home assistant starts running.   They also sell a box with home assistant on it as well.

 

 

  • Thanks 1
Link to comment
Share on other sites

Here is a link to the switches I use:

https://smile.amazon.com/Sonoff-Temperature-Monitoring-Compatible-Assistant/dp/B07TC2KCGF/ref=sr_1_1_sspa?crid=3I5ZBS77CWSAN&keywords=sonoff+th16+with+temperature+sensor&qid=1640457346&sprefix=Sonoff+TH16+%2Caps%2C217&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzVlc2U09XS044MUsyJmVuY3J5cHRlZElkPUEwOTUyNjE4MjBZQTVHUks3OVU0QiZlbmNyeXB0ZWRBZElkPUEwMDI1NzY4MUw4UThaUkdVRjUxSCZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=

I control all of my sonoff devices with an app called eWeLink on my phone. I have several other sonoff devices around the house. I'm not familiar with esphome.

Here is a link to the Wyze camera I use:

https://smile.amazon.com/gp/product/B07DGR98VQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

I have six more Wyze cams around the house and I can see them all including the motorhome on the Wyze app on my phone. I also access the cameras with an app on my phone called Tiny Cam Pro. Sometimes I use it instead of the Wyze app because it allows me to see all cameras or several cameras live at once which the Wyze app won't do. Both the wifi hot spot and the Wyze cam are powered from 12 volts so no matter where I park the motorhome as long as it has cell service I can check in on it. And because I can rotate the camera from my phone I can look inside and out. It also records motion or sound events so if I mise the action I can see what happened after the fact. The memory card in the camera can record on a continuous loop and therefor facilitates it's use as a dash cam as well. Sorry but I'm also not familiar with RTSP.

 

 

Link to comment
Share on other sites

49 minutes ago, Tom Wallis said:

Nice, the TH16 is supported by esphome.   The advantage to me of esphome, is I don't have to install an app from china (eWeLink ), and replacing the code on the device with open-source code cuts down on the chance someone has a back door into my network.   

49 minutes ago, Tom Wallis said:

Here is a link to the Wyze camera I use:

https://smile.amazon.com/gp/product/B07DGR98VQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

I have six more Wyze cams around the house and I can see them all including the motorhome on the Wyze app on my phone. I also access the cameras with an app on my phone called Tiny Cam Pro. Sometimes I use it instead of the Wyze app because it allows me to see all cameras or several cameras live at once which the Wyze app won't do. Both the wifi hot spot and the Wyze cam are powered from 12 volts so no matter where I park the motorhome as long as it has cell service I can check in on it. And because I can rotate the camera from my phone I can look inside and out. It also records motion or sound events so if I mise the action I can see what happened after the fact. The memory card in the camera can record on a continuous loop and therefor facilitates it's use as a dash cam as well. Sorry but I'm also not familiar with RTSP.

 

 

rtsp (real-time streaming protocol) is a standard that's on allot of cameras.   Home Assistant has a module to display rtsp cameras in their app, but I think they also support Wyze.   I'd prefer rtsp just to keep it all on my own network.   Thanks for the link to the camera, I'm ordering one of those to try out.   That's pretty awesome for the price!

 

Here's a little display module that I've been playing with, this will most likely end up in the bathroom of the RV, cycling through tank levels.   It will be the device that reads the bluetooth levels from the see level and reports them over wifi to home assistant.   It has a 120mah battery that it can run for about an hour on with the display active.   Two buttons can be programmed to do whatever you want.   It has other sensors like and accelerometer and microphone that aren't yet supported by the esphome software.

This little guy was around $40 on amazon, I think.

 

image.png.7c98c6e54843d8caa4fbe2c28b29545b.png

  • Like 1
Link to comment
Share on other sites

5 hours ago, granvillebarker said:

Nice, the TH16 is supported by esphome.   The advantage to me of esphome, is I don't have to install an app from china (eWeLink ), and replacing the code on the device with open-source code cuts down on the chance someone has a back door into my network.   

rtsp (real-time streaming protocol) is a standard that's on allot of cameras.   Home Assistant has a module to display rtsp cameras in their app, but I think they also support Wyze.   I'd prefer rtsp just to keep it all on my own network.   Thanks for the link to the camera, I'm ordering one of those to try out.   That's pretty awesome for the price!

 

Here's a little display module that I've been playing with, this will most likely end up in the bathroom of the RV, cycling through tank levels.   It will be the device that reads the bluetooth levels from the see level and reports them over wifi to home assistant.   It has a 120mah battery that it can run for about an hour on with the display active.   Two buttons can be programmed to do whatever you want.   It has other sensors like and accelerometer and microphone that aren't yet supported by the esphome software.

This little guy was around $40 on amazon, I think.

 

image.png.7c98c6e54843d8caa4fbe2c28b29545b.png

What type of sensors do you have on that tanks?

Link to comment
Share on other sites

19 hours ago, cbr046 said:

2 suits completing 4 of one color then 4 of the other color (personal obsession).  I've done 4 suits but MAN THAT'S HARD!

- b

I also play Spider 2 suits along with 4 other games offered on the menu, Pyramid, Klondike, Grandfather's Clock & Eighteens. The other games are too difficult to play.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I've made much progress in getting home assistant going in the Dynasty.   We moved back into the RV last week, so I'm able get the configuration files finished and everything working.   This is what it all looks like so for, same interface is available on my phone from anywhere.

I'll post a video in a few days of me remote controlling everything.   Ultimately, I'd like to get everything into home assistant that's currently in Aladdin, home assistant will add trend charts to temperatures, holding tanks, and stuff like that.   I'm not as concerned with engine info, but that would be nice.

One of my todo items is upgrade the inverter to pure sine.  I'm down to either Victron or Magnum, Viktron is much cheaper and possibly quieter from what I've read.   I'll get much better power information into home assistant after that upgrade.   I don't think we are seeing updates and innovation in the RV inverter market that we should be seeing.   These things should be smaller, quieter, and more efficient.   The ones I'm seeing look bigger to me.   I'd love to hear from others on this.

In the long run, Aladdin will be turned off, and I'd prefer just to be notified if there's something that needs dealing with rather than looking at any of the data.   In my Tesla a yellow warning triangle with an exclamation point pops up if there's something that needs attention.   So have the RV more like that, let it send me a message when the holding tanks are approaching full, or there's an issue with power or water or whatever.

 

--

Granville Barker

05 Dynasty

Screen Shot 2022-02-01 at 6.26.43 PM.png

  • Like 4
Link to comment
Share on other sites

  • 2 months later...
15 hours ago, Seattleites said:

I am interested in how you are controlling the lights - are they Intellitec Multiplex switches? Are you able to interface with that?  I'd be interested in more details on this.

I am using esp32 based relay modules made by SonOff.   It is their 4Ch Pro.   I modified the relay modules so the existing switches tie to inputs on the modules and the loads being switched are tied to the relays. 
 

With this configuration, the switches work like they always did even if home assistant is not running.

 

With multiplex lights, you would need a different setup.   Possibly just a serial Interface with the master control box and a custom driver so home assistant can talk to it.

 

Granville Barker

05 Dynasty

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...