|
|
11-20-2021, 08:58 PM
|
#21
|
Platinum Member
Join Date: Jan 2016
Location: California
Posts: 121
|
Say Avanti - can you share more about your 2D "level" display?
__________________
- Steve
'Blue' 2004 Chevy Roadtrek 190 Popular
|
|
|
11-21-2021, 12:48 AM
|
#22
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Quote:
Originally Posted by rauscs
Say Avanti - can you share more about your 2D "level" display?
|
Sure. Simple enough:
There are all kinds of 3-axis accelerometers that are easy to use and cost almost nothing. Here is a random one (not endorsing it in particular);
https://www.amazon.com/Adafruit-LIS3...rr_306924011_0
If you are conversant with an Arduino (or whatever) and know what SPI or I2C are, there really isn't much to it. I built a little box a long time ago what contained one and also gathered data from my inverter and Trimetric meter about the power system. It also read a couple of temperature sensors in the fridge and freezer.
I coded a little display that showed on the Sprinter's nav screen (pretending to be a backup camera). Only ever got it half done, but it looks like this:
SprinterDIsplay.jpeg
The center pane is the level-meter. It is basically an x/y bubble level (with a square bubble!). When the center square is in the cross-hairs, the van is level.
This was done a long time ago and so is kind of crude. I will certainly replicate this in Home Assistant.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
11-21-2021, 01:20 AM
|
#23
|
Platinum Member
Join Date: Jan 2016
Location: California
Posts: 121
|
Very cool! Thanks.
__________________
- Steve
'Blue' 2004 Chevy Roadtrek 190 Popular
|
|
|
11-26-2021, 06:19 PM
|
#24
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Part 4 -- Sensors
All computing is about gazintas and gazuotas. In Part 3, we covered the gazoutas of Home Assistant. This part is about the gazintas, which in HA are called "sensors". Sensors gather data from the outside world and feeds them into HA, where they can be displayed, manipulated, stored, and used as the input to "automations", i.e., actions to be performed when certain patterns of sensor data occur. A simple example would be an alarm that would go off if the temperature in your freezer goes above some preset value, but only if the fridge is turned on.
The category of sensors is a lot broader than you might think. Obviously it includes things like temperature, humidity, and pressure sensors, tank level sensors, rain sensors, etc. But, so is a GPS receiver on your roof, a SOC meter for your battery, and a bluetooth receiver that can tell whose cell-phones are present in your van. A relay that is wired to close when shore power is present can be used as a (very useful) sensor. Security cameras are also a kind of sensor. Some devices can be both control devices and sensors at the same time. An example is an electronic light switch that can both control the lights and also report when the user turns them on manually and also perhaps the current they are consuming. Finally, some sensor data comes in remotely from websites. Weather forecasts and travel times are an example of this. These latter, of course, will only work when you have a web connection. But this is the exception, not the rule.
The ability to pull many different measurements together and to automatically monitor and track them over time is probably the biggest practical benefit of a project like this. Lots of things that are basically invisible to the user can be made clear, which should help a lot in systems management and troubleshooting. For example, chart the shows refrigerator run-time duty-cycle and outside temperature at the same time could be very interesting.
There are two basic approaches to sensors. The first one is integration with commercial products. Folks have created (and freely share) literally thousands of such integrations, including smart thermostats, integrated weather stations, Victron battery management systems, home security devices, smartphones and many, many others. Using such integrations are for the most part duck soup. Often it is nothing more than entering the IP address of the device and the data magically appear. The HA website lists many of these integrations, and lots of other ones can be found around the Net.
The other approach is a bit more DIY. I have already mentioned the ESP8266 and the ESP32 microprocessors. These are tiny computers with built-in WiFi. Some of them can be had for $3-4 apiece. They look like this:
Since these are raw boards, you need to solder on wires to whatever you want to monitor/control, and you have to deal with some kind of enclosure, so they are a little geeky. But, they are so cheap that you can scatter them around the van almost without thinking. I am especially excited about using these to measure temperatures of all kinds.
There is a sub-project of HA that makes it really easy to configure these things for any given purpose, often without any programming at all. It is called ESPhome. This probably deserves its own section of this thread, but in the mean time you can check it out here:
https://esphome.io
There are so many options under the category of sensors, that it almost isn't worth mentioning too many specifics, except by way of example. Rest assured, though, that if you want to measure something, there is likely to be a way to do it, and it will probably be pretty easy.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
11-26-2021, 09:06 PM
|
#25
|
Platinum Member
Join Date: Feb 2016
Location: Portland, Oregon
Posts: 3,307
|
With my recent issues with the fridge, I purchased two https://www.sensorpush.com/ Great product, either Wi-Fi or Bluetooth. Pairing in seconds. Decent software. I am impressed.
At home I have HomeSeer hub, Z-wave, Arlo and Alexa. Two primary reasons for safety and convenience. All lights with Z-Wave control we control by voice.
I have about 20 years’ experience with home automation as a user, from simple X-10 to current system. I am looking forward to see your progress in a small B-class RV. I am still struggling with rather dumb refrigerator and would pay way more for a fridge with the 21st Century control and troubleshooting.
|
|
|
11-26-2021, 09:35 PM
|
#26
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Quote:
Originally Posted by GeorgeRa
With my recent issues with the fridge, I purchased two https://www.sensorpush.com/ Great product, either Wi-Fi or Bluetooth. Pairing in seconds. Decent software. I am impressed.
|
Apparently there is a community-supported integration in Home Assistant for Sensorpush:
https://community.home-assistant.io/...sensors/105711
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
11-26-2021, 11:02 PM
|
#27
|
Platinum Member
Join Date: Oct 2018
Location: MN
Posts: 520
|
@avanti - I appreciate the work you are putting into this.
Quote:
Originally Posted by avanti
|
With the newer version of the Sensorpush temp sensor, one can read data via BlueTooth directly, without the Sensorpush cloud. A few lines of python is all it takes.
https://github.com/mkjanke/SensorPushPy
RV Whisper is a commercial product that covers some of this space:
https://rvwhisper.com/
Quote:
I am still struggling with rather dumb refrigerator and would pay way more for a fridge with the 21st Century control and troubleshooting.
|
This is a good example of a desirable integration into something like Home Assistant or other RV/Marine control system. If the fridges were not so expensive to replace, I'd be playing around with using a microcontroller and BlueTooth to monitor and control the compressor.
For me, another example would be the vent fan. It's great that the fan lid automatically closes when it rains. It's be even better if I could automatically open it back up when it stops raining. Simple things like this can make a difference.
|
|
|
11-26-2021, 11:12 PM
|
#28
|
Platinum Member
Join Date: Feb 2016
Location: Portland, Oregon
Posts: 3,307
|
Quote:
Originally Posted by @Michael
................
With the newer version of the Sensorpush temp sensor, one can read data via BlueTooth directly, without the Sensorpush cloud. A few lines of python is all it takes.
...........
|
Couldn't be simpler:
- download/install the app
- place the sensor on the screen in 2 seconds its connected.
|
|
|
11-26-2021, 11:26 PM
|
#29
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Quote:
Originally Posted by @Michael
@avanti - I appreciate the work you are putting into this.
|
It is helping me think through my project. I will be getting more specific soon.
Quote:
This is a good example of a desirable integration into something like Home Assistant or other RV/Marine control system. If the fridges were not so expensive to replace, I'd be playing around with using a microcontroller and BlueTooth to monitor and control the compressor.
|
In an HA environment, I think the easiest way would be to use an ESP hardwired to the fridge and communicate between the Pi and the ESP via WiFi. You could just do low-level operations in the esp ("change compressor speed", "read status code", etc) and use the full power of HA automations to do the smart stuff.
Quote:
For me, another example would be the vent fan. It's great that the fan lid automatically closes when it rains. It's be even better if I could automatically open it back up when it stops raining. Simple things like this can make a difference.
|
Yes. On my short list is an experiment to see if I can directly control the vent fan's speed using the Shelly RGBW2 (mentioned In Part 2 above) as a PWM controller. Automated continuous speed control would be slick.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
11-27-2021, 12:38 AM
|
#30
|
Platinum Member
Join Date: Dec 2020
Location: Washington
Posts: 254
|
I have worked in tech for over 30 years. Why do I have a camper van? Is the attraction camping or playing with computers? I make it a point to leave the technology at home and get away from that stuff for awhile. Very refreshing to say the least.
|
|
|
12-04-2021, 11:35 PM
|
#31
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Part 5 -- Automations and Scripts
Even if we limit ourselves to the HA capabilities described above, we will find ourselves with a lot of power. On the input side, we can measure and monitor most any aspect of the van, display the values, and graph changes over time. With outputs, we can bring together a multitude of specialized, inconvenient and inconsistent switches and knobs and make them available in a single, compact, easy to understand touch screen interface.
But, that is just the beginning. Once we have brought together all these data in one place, we write rules of various kinds that use them to make decisions and automatically perform actions. In HA, there are two mechanisms for this: automations and scripts. I will describe both here, but I am going to keep this section brief, both because these concepts are fairly obvious, and because I have not yet gotten to deeply into these mechanisms. Most of the work will involve setting up the inputs and the outputs. Once that is done, creating an ever more elaborate set of safety and convenience rules will be an ongoing and entertaining process.
Automations:
An "automation" is a three-part rule, comprising a "Trigger", zero or more "Conditions" and an "Action". The Trigger is some external event that causes the automation to be invoked. This could be as simple as a button press, but more often it involves some reading from a sensor: Opening a door, a temperature dropping below freezing, etc. A "Condition" places restrictions on whether the automation action occurs. Examples might be "it is nighttime" or "the battery has at least 50% SOC". The action is what happens when the conditions are met. We could turn on a light or a heater, or send a message.
Scripts:
Obviously, you can do a lot with Automation rules, but sometimes situations are too complicated to easily express using so simple a structure. In this case, advanced users can resort to writing a "script", which is a simple computer program. This gives you all the power of general-purpose computing, including very complex conditions and multiple contingent actions.
There is a lot more to say about automations and scripts, but it is usually best to learn as you go, in the context of specific goals. In the mean time, suffice it to say that these mechanisms are pretty much guaranteed to be able to handle anything we might dream up. Once we bring the inputs and outputs together in one place, the sky is the limit.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
12-24-2021, 10:01 PM
|
#32
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Part 6 -- Core Hardware
OK, now we are ready to start building. In my case, I am building a core system on the bench, and have it installed in our new rig during construction. But it would be nearly as easy to retrofit a system piece-by-piece in an existing van. If you are thinking about giving this a try, everything from now on will describe things you can actually build and use. I will try to provide enough detail for anyone to do so. I am also glad to help with any problems anyone runs into. It would be great if a few people were building parallel systems and sharing their experiences.
There are only two pieces of infrastructure that every system needs: (1) A network router; and (2) A Home Assistant host computer. Neither of these is a big deal:
1) Router.
Nothing exotic here. Any device capable of creating a WiFi access point will do. Examples include an old cable modem, a cheap WiFi router, or even a MiFi hotspot. Some kind of WiFi in your van is absolutely necessary so that the various parts of the system can communicate with each other in peer-to-peer fashion. Sometimes hard-wired Ethernet is also useful, but almost never necessary. Note that you DO NOT necessarily need access to the Internet. If you don't have it, you will be giving up a few features such as fetching current weather reports, access to your security cameras back home, etc. But for the basics any kind of WiFi will do.
I am probably going to go for a fairly fancy device that includes the ability to accept a SIM card and connect to a nice G5 MiMo antenna. Something like this:
https://www.milltechmarine.com/Pepwa...ter_p_678.html
but, something much cheaper would be just fine if you don't want fancy 5G connectivity. Something that is designed to run on 12VDC is optimal, otherwise you will need a small inverter or some other kind of power converter.
2) Home Assistant server
This part is a little more complicated. HA can run on many different platforms. The simplest choice would be a PC or a Mac, but this isn't really optimal, since we are going to want to run the server whenever the van is in use, and a full-blown PC is overkill for this purpose. Better to pick a much smaller, simpler single-board computer. Unfortunately, many of these are pretty geeky. However, one choice stands out: the Raspberry Pi (RPI). This is a bar-of-soap sized single board computer that is incredibly versatile and quite inexpensive. Importantly, the HA folks kind of consider it their preferred platform, so the support is especially good. It is still kind of geeky, but most of the hard parts are well-documented and can be performed by rote without deep understanding. This tutorial assumes the use of an RPI.
There are several different RPIs available. You want a Pi 4:
https://www.raspberrypi.com/products...-4-model-b-4gb
You can get them with 2, 4, or 8 GB of memory. For our purposes, 4GB is fine. The raw board normally costs in the $50-60 range from places like this:
https://www.adafruit.com/product/4296
However, due to the global chip shortage, they are hard to find these days. Easier to find are "sets" like this
https://www.amazon.com/CanaKit-Raspb...RFG/ref=sr_1_3
which come with a power supply, a plastic case and other useful stuff. Probably worthwhile, even though you will not use everything they throw in. Be careful: some sets that look like this one don't include the RPI itself.
2.1) External Storage
In order to use the RPI, you need some kind of external storage ("disk" space). The board has a micro SD slot, and it is possible to use a cheap SD card to install the system. This, however, is a very bad idea, primarily because a system running this way is very, very slow. Moreover, the long-term reliability of such a setup is questionable.
What you want instead is a USB SSD flash drive. I bought one of these:
https://www.amazon.com/dp/B01N5IB20Q...roduct_details
You also need a SATA-to-USB adaptor, like this:
https://www.amazon.com/dp/B00XLAZODE...roduct_details
This gives you the equivalent of a 250GB disk, and for $50 it is a no-brainer. Other similar devices should work fine if you happen to have one laying around.
2.2) Power supply
The RPI is powered from a USB-C plug, and requires at least 3A @5VDC (although its steady-state consumption is much less. If you buy one of the complete kits, you will get a wall-wort which you can use for development. For deployment in your van, you will want a DC-DC converter rated at least 3A. There are ones that specifically support the RPI. I got this one:
https://www.amazon.com/dp/B07ZQB6S3L
Putting all this stuff together, we will have a tiny, low-power, headless server that will form the heart of our smart van. It will be driven by 12VDC and will power up whenever the Van is turned on. It doesn't need a screen of any kind, since its purpose is to create a web-server that can be accessed from any browser, such as your PC, phone, or tablet. We will talk about dedicated screens mounted in your rig next time.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
12-24-2021, 11:09 PM
|
#33
|
Platinum Member
Join Date: Feb 2016
Location: Portland, Oregon
Posts: 3,307
|
This project is way over my head but I understand it could a lot of fun for someone who is savvy enough in this field.
When I started my conversion, I thought it would be quick and easy, it was neither. I was used to complexity but had a team of folks, this time I was retired and alone. The biggest challenge I embark on in this conversion was a grandmother test, this conversion had to be logicaly simple and usable by users such my wife with history degree, or at some point a buyer.
Wishing you best.
|
|
|
12-24-2021, 11:31 PM
|
#34
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Quote:
Originally Posted by GeorgeRa
This project is way over my head but I understand it could a lot of fun for someone who is savvy enough in this field.
When I started my conversion, I thought it would be quick and easy, it was neither. I was used to complexity but had a team of folks, this time I was retired and alone. The biggest challenge I embark on in this conversion was a grandmother test, this conversion had to be logicaly simple and usable by users such my wife with history degree, or at some point a buyer.
Wishing you best.
|
Ahh. I guess I haven't been doing a good job making this sound easy... The difference between this and doing your van is that even the first small, simple steps are useful. If you are at all comfortable as a computer user, it will be no big deal. Just a few magic cookbook incantations--the geeky stuff is fully-automated. It will be fun. If you have any interest at all, consider a toe in the water. If you just want to mess around, you could do it on a PC or Mac without buying anything.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
12-25-2021, 06:11 AM
|
#35
|
Platinum Member
Join Date: Jan 2016
Location: California
Posts: 121
|
Say Pete - Thanks for the new installment! Great job explaining things.
Steve
__________________
- Steve
'Blue' 2004 Chevy Roadtrek 190 Popular
|
|
|
12-28-2021, 06:58 PM
|
#36
|
Platinum Member
Join Date: Nov 2017
Location: Michigan
Posts: 268
|
Very interesting . . . we're considering 'following' you in!
Incidentally, we were particularly interested in your Pepwave link. We currently have a 4G version of the Pepwave Max BRI II . . . and damaged our antenna so was considering a 5G upgrade along with the new antenna. But reading Pepwave's literature . . . seems that getting into 5G (at least with Pepwave) is a bit premature . . . they've all but admitted that their current gear is 'stop-gap' while awaiting full maturity of 5G. Any thoughts?
Winston
__________________
2016 159" High Top DIY ProMaster with 500ah Starlight Solar/Elite LiFePo4, 930 watts Hyundai Solar w/MidNite Solar Classic MPPT, Magnum 2812/MMP250-60S Charger/PSW w/remote, Nations 280amp 2nd Alternator with DIY [formerly, Balmar] regulator, NovaCool R4500 12/120v frig, 2 burner TruInduction cookstop, SMEV 8005 sink, FloJet R4426143 pump. No A/C or indoor washroom.
|
|
|
12-28-2021, 08:15 PM
|
#37
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Quote:
Originally Posted by Winston
Very interesting . . . we're considering 'following' you in!
|
Awesome. I am hoping for a few fellow-travelers to keep the conversation more interesting than just me droning on. I promise to help anybody on the list get over the rough patches (there are only a few).
Quote:
reading Pepwave's literature . . . seems that getting into 5G (at least with Pepwave) is a bit premature . . . they've all but admitted that their current gear is 'stop-gap' while awaiting full maturity of 5G. Any thoughts?
|
Yeah, I get the same impression. I noticed that at least one unit was marked "Verizon certification pending", for example.
On the other hand, seems crazy to spend that kind of money and not end up with 5G capability. I guess that means not to rush into that part, which is fine, since my current MiFi hotspot still works. I will probably have our upfitter install a 5G-compatible quad-MiMo antenna on the roof, since that is pretty generic.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
12-28-2021, 09:15 PM
|
#38
|
New Member
Join Date: Aug 2015
Location: Pennsylvania
Posts: 12
|
Thanks for the discussion.
I have HA at home and have contemplated how I might incorporate it into a new build (which may or may not happen!). I 'll be watching for what you will be sensing and controlling.
Have you thought about how much power the system will draw? The hub will probably be on all the time. Some sensors can have their own batteries. Switches will be listening all the time too, I suppose.
__________________
Happily traveling in a 2017 Ocean One from Advanced RV.
|
|
|
12-28-2021, 10:12 PM
|
#39
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Quote:
Originally Posted by TravelingCOWs
Have you thought about how much power the system will draw? The hub will probably be on all the time. Some sensors can have their own batteries. Switches will be listening all the time too, I suppose.
|
I haven't been systematic yet, but I have been measuring the current on a bunch of stuff as I acquire it. Nothing seems to be more than a few tenths of an amp @5V. Even the RPi is mostly dozing. It specifies 3A but I have never seen it close to that. I don't think we are talking about more than a couple of 12V amps max. Pretty much in the noise for the battery I am planning.
In any event, my plan is to have one or more dedicated circuits that are controlled by physical switches, so the van can be put in a "minimal" mode if we ever find ourselves scraping amps.
Finally, when the van is in storage, I plan to have everything shut down except one ESP32 which will monitor the Internet for requests to power the system up for remote access. The current draw of that will be insignificant. Bringing the system up from a cold start looks like it will take less than 30 seconds--probably less with some optimization.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
12-28-2021, 10:16 PM
|
#40
|
Site Team
Join Date: Jul 2013
Posts: 5,428
|
Quote:
Originally Posted by TravelingCOWs
I have HA at home and have contemplated how I might incorporate it into a new build (which may or may not happen!). I 'll be watching for what you will be sensing and controlling.
|
Please chime in with your knowledge and experience. I am still learning.
__________________
Now: 2022 Fully-custom buildout (Ford Transit EcoBoost AWD)
Formerly: 2005 Airstream Interstate (Sprinter 2500 T1N)
2014 Great West Vans Legend SE (Sprinter 3500 NCV3 I4)
|
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Recent Threads |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|