Home Assistant - Solar Monitoring and Management

butter_fry

New Member
The IoT world is really wide open these days and I'm surprised I'm not seeing more systems that people have integrated with their solar setups.
So.. I'll start.

I've been building solar setups for years, and have some pretty funky "Solar Generator" boxes that came before the time of LFP and the IoT revolution. They're quaint now... but still work.

A few years ago I bought one of those PVC inflatable hot tubs. I ran it for a 6 months or so and the power bill was eye popping.... so down the rabbit hole I went.

It was a long journey of writing a Hot Tub controller in PHP, then tossing that out for Home Assistant a year or so later. What I ended up with is a Solar Powered, LFP battery run, A/C backed, LPG Heated automatic hot tub system.

The interface is basic, but only limited by my desire to not put too much time into it. I'm always tweaking it, but it's been stable now for a few years.

The Solar parts are the following:

- Victron 75/15 mppt
- Victron Smart battery monitor Bluetooth thingy
- 400w of mix and match panels in a 24v series
- A RPi3 that runs the Victron VenusOS / connected to the MPPT via USB for control/data collection
- A RPi4 that runs home assistant and a ton of other home automation stuff
- I'm using 8x 40a LFP pouch cells in a water tight container, backed by heating pads.
- For a simple transfer switch, Home Assistant monitors pack voltage. When the batteries are drained it flips on a simple IoT switch to a 24v power supply. Not a charger, or anything. Just a simple 300w 24v power supply that runs the system and levels up the batteries till they get charge from the panels in the morning. Super simple and effective.
- A (now) older Daly BMS w/o temp monitoring

The data that HA uses comes via the Modbus interface that the Victron system provides. It's basic, and these days I wouldn't have to go with Victron, but it's been lights out perfect since Installed it. Victron was the only company making anything just a few years ago that I could pull data from and could trust.

I don't attempt to run the OEM heater/pump unit of this small setup. It's upward of 14a with everything going. It only gets used for short bursts when the main LPG gas heater is running. Mostly for pump augmentation and flow. I even hacked the touch panel circuit board, so that a 8 channel IoT switch can interact with the buttons, simulating button presses. All 8 channels are used, and it's hidden inside the heater unit behind the touch panel. That allows me to interact with the unit via home assistant as if I was physically pressing the various buttons in-person.

The rest of the hot tub is all automated with little motorized valves to direct water flow to either the oem "Egg" (as I call it) heater/pump unit. Or when very quick heating is required to the Instant Hot Water camping heater and secondary pump. This will heat the tub from ~90 to 104f in less than an hour. I had to get the flow just right, as to not literally boil the water. The problems arise in the fact that these hot water heaters are designed to heat COLD water. Hot Tub water is already hot, so one of the only ways to regulate heat is to pump as much through it as possible to keep the time in heater down, thus manageably cooler water output.

It also includes a hot water shower as you can see from the photos. There is a servo attached to the gas dial on the heater. When the shower on button is pressed, the system samples water temps and sets it at a nice hot outdoor shower temperature. When the shower is done, the servo flips back over to low-heat mode that the tub uses.

In all, the system idles at 15w or so. When heating it's around 220w. like I said, really basic but this is more about what we can do in monitoring and interacting with the solar controllers and setups these days.

there is a bunch more.. but that is for a different forum. Thought I'd share the solar bits. Ask me anything or if you need advise I've probably crossed that bridge in the Solar > IoT trail in the past few years.
-Butter
 

Attachments

  • ha-main.png
    ha-main.png
    88 KB · Views: 7
  • ha-solar.png
    ha-solar.png
    343.7 KB · Views: 7
Last edited:

svetz

Works in theory! Practice? That's something else
Staff member
Moderator

Open-source home automation that puts local control and privacy first. Runs on a Raspberry Pi or a local server.

How's it do for adding sensors?
For example, a competitor like SmartThings is always adding new sensors, has a large following on GitHub, and has a pretty easy mechanism to add them if they're based on the Zigbee/Zwave HA (home automation) standard. Bluetooth and WiFi based sensors are a bit tougher to add (if not available on GitHub) to something like SmartThings as they require an api.

Has anyone integrated HomeAssistant with the IotaWatt or the Emporia Vue?
Update: https://github.com/magico13/ha-emporia-vue and https://community.home-assistant.io/t/custom-component-iotawatt-energy-monitor-integration/254110
 
Last edited:

butter_fry

New Member
How's it do for adding sensors?
For example, a competitor like SmartThings is always adding new sensors, has a large following on GitHub, and has a pretty easy mechanism to add them if they're based on the Zigbee/Zwave HA (home automation) standard. Bluetooth and WiFi based sensors are a bit tougher to add (if not available on GitHub) to something like SmartThings as they require an api.
There is very very little that Home Assistant doesn't have an integration for.
Sensors? make / or Add any and all the sensors you want. They all work.

SmartThings/Google's Home/all the corporate based Smart Home interfaces are really just a place where you can link things up. Maybe run some basic automation, a single place where a few different types of things can get collated. Home Assistant on the other hand is a top to bottom Automation Platform that is probably best thought about as an Uber Application, It can take on and interact as the main baseline clearing house for all your smart things. You can completely build an application/app within it to run... your hot tub or automate your solar tracking... or monitor and deal with your battery temps. It's really not a good comparison. Home Assistant does more than you can imagine in the Corporate IoT world.
 

svetz

Works in theory! Practice? That's something else
Staff member
Moderator
SmartThings/Google's Home/all the corporate based Smart Home interfaces are really just a place where you can link things up. Maybe run some basic automation, ...It's really not a good comparison. Home Assistant does more than you can imagine in the Corporate IoT world.
I'm not familiar with Home Assistant but have programmed SmartThings for my mother-in-law and the automation part sounds similar. The imagination is the limit for what you can do with SmartThings:
  1. Carpool notifier - let people in your carpool know when you're close
  2. Medication - a reminder to take your meds if a time has passed and you haven't opened the medicine cabinet
  3. Eldar Care - get a notification if someone hasn't returned from the bathroom at night in a set amount of time or if someone hasn't gotten up out of bed by a certain time
  4. Mold alerts - get notified if conditions in the attic are ripe for mold
1funny753.gif
Watching your battery temperatures or automating solar wouldn't be a big deal for SmartThings. Apps can run locally or in the cloud. Anything programmable in Groovy can be done.

But what can be a PITA with SmartThings is hooking up unknown wifi sensors and it doesn't have a great debugging suite when building apps.
 
Last edited:

butter_fry

New Member
svetz,
I guess all i can say is, you're in a corporate garden thinking you're in the forest. Step out into the wild and see what is possible! (without giving everything away to a company to sell and use)
 

svetz

Works in theory! Practice? That's something else
Staff member
Moderator
svetz,
I guess all i can say is, you're in a corporate garden thinking you're in the forest...
Sorry, but labels and innuendo without any facts as to why it's superior don't really swing my decision meter towards a product.
 

butter_fry

New Member
well.. ok then. How about this? sounds like you may have a HIPPA issue if you're writing automations for health care facilities. Home Assistant isn't a product, it's a community based suite of applications that never sends any data outside of your local network (ie: cloud data). It runs on your own hardware and isn't internet connectivity dependent for operation.

you're speaking about basic automation tasks. I'm sure that is well covered by Samsung. I'm familiar with what it can and can't do. I use the Smarthings api to feed devices into Home Assistant myself.

As for temperature sensors, sometimes I use off the shelf Sonoff hardware or sometimes I use custom code on an ESP8266/32 module. It depends on the application and needs. Sometimes all I need is a temp/humidity sensor, others I need a harsh environment DS18B20 water tight probe. There is a project called ESPHome that allows you to literally drag and drop functionality into a raw ESP8266 and make it do anything you want. You might want to look into that for your temperature needs. Publish the temps via MQTT and grab the data for your SmartThings usage (?) I know it can be a pain to jump into a new universe. This guy seems to have run into some of the same issues.

anyhow, my intent here was a bit of wonder that more people aren't using it in this corner of the world. HA is the undisputed king of automation, I'm quite certain of that. I'm just curious as to why we're not seeing more monitoring suites (HA or SmartThings or whatever based) being used is all. Thanks for the lively conversation!
 

svetz

Works in theory! Practice? That's something else
Staff member
Moderator
well.. ok then. How about this? sounds like you may have a HIPPA issue if you're writing automations for health care facilities.
No, the list was just illustrating that I didn't really see a limit as to what could be done with SmartThings in terms of automation. The real-world app I've built is the dew point calculation for mold. (I don't own one, did it for my mother in law who does).

Home Assistant isn't a product, it's a community based suite of applications that never sends any data outside of your local network (ie: cloud data). It runs on your own hardware and isn't internet connectivity dependent for operation.
I've always found open-source to be a mixed bag, some is phenomenal and your nuts not to use it. Sometimes it's the reverse. For example, in my opinion, OpenOffice isn't as good as Microsoft Office, but it's near as good and free so I use it.

...you're speaking about basic automation tasks.
I don't think so. Well, I thought I was listing some non-basic tasks that are done in SmartThings.

SmartThings has two modes, Automation and SmartApps. Automation seems basic and limited, I suspect that's what you're thinking of. SmartApps is anything under the sun you can program in Groovy (it can't be done from the cellphone app AFAIK, you have to use the web interface). What I don't like about SmartThings is debugging smart apps. I was never able to get the simulator to fire events on demand and it could use a better debugger.

As for temperature sensors, sometimes I use off the shelf Sonoff hardware or sometimes I use custom code on an ESP8266/32 module.
Currently, I'm using a SONOFF SNZB-02 temp/humidity sensor in the attic. I have a smart app that calculates the dew point of the surfaces and sends a text alert if conditions are ripe for mold (this is not a simple if RH >50% then panic, the sensors don't know how to calculate the dew point). It will also turn on an outlet for a dehumidifier; but I haven't gone to the trouble to put one up as it might not be needed. Did a second app to export data to Google Spreadsheets to get trendlines so I can see if I'm getting close.
anyhow, my intent here was a bit of wonder that more people aren't using it in this corner of the world.
There's a bit about it here and there, but folks don't seem to talk about HA so much as the "project" and HA is a subset of it. For example, I posted about my SmartThings experiences here talking about the attic, there's some discussion about HA in the Emporia Vue thread, and a few other places.
 
Top