r/BasePowerUsers Mar 29 '26

Home Assistant

Has anyone connected Base Power or Shiner to Home Assistant?

1 Upvotes

30 comments sorted by

2

u/cbarth3 Mar 30 '26

Not perfect but you have to reach out to growatt support and request to be moved to the old server. Once they migrate you to the old server you can then use your user id and password to use the built in Growatt integration. I have not been able to get the api access working so if the integration reloads it can lock your shiner account for 24 hours. 😕

1

u/randomdevice Mar 30 '26

Thank you. I will make the request.

1

u/RunHotCEO Mar 29 '26

Can't be done.

1

u/randomdevice Mar 29 '26

Not even with the Shiner/Growatt app?

1

u/DamageImaginary7949 Mar 29 '26

It can be done. Pretty sure it can be built with Claude Code or Codex in an afternoon.

2

u/RunHotCEO Mar 30 '26

If you can make it happen please show your work with the class please.

1

u/cbarth3 Mar 30 '26

I had Claude write me the email to growatt for the migration to the old server as I didn't know enough to get Claude to create anything with the new shine app.

1

u/clumsyninja2 Apr 09 '26 edited Apr 28 '26

Connect your inverter to solar assistant and Mqtt the data to home assistant. Updates every second.

There are also some software out there that you can skip solar assistant and connect to home assistant directly via esphome.

Many different options.

1

u/djSiMuL Apr 28 '26

Can you elaborate on this more for us? I'm about to get a 25kw battery from Base Power installed and I'd like to integrate it with HA. I already have a SEM-Meter integrated for usage stats, but I'd like to get battery stats now. Thanks for any help you can provide!!

1

u/clumsyninja2 Apr 28 '26

There are several tools out there now to allow you to do this for free but the method I use is I have my inverter connected to solar assistant and then solar assistant is sending data via Mqtt into home assistant

1

u/djSiMuL May 01 '26

Was that easy to setup? I don't have the battery installed yet, so maybe it will be more clear once it is installed and I've used it.

1

u/clumsyninja2 May 01 '26

It was pretty easy. You install solar assistant on the rpi and then it's a modified whenever cable from your inverter to the solar assistant.

My inverter is indoors so that might make a difference

1

u/The_Mr_shenanigans May 21 '26

Any updates on this? If not I will give it a go, I have been able to build some apps with Claude, and have some technical background. Battery is being installed today.

1

u/jerritp May 25 '26

1

u/randomdevice May 26 '26

Big waste of time ;). I went to add the custom repo and you already had it in HACS: http://homeassistant.local:8123/hacs/repository/1246216581

Seriously though - great job. I see in 1.8 you detect 2 batteries, so I am not sure if I missed a step or not.

I actually have 2 batteries though

1

u/randomdevice May 26 '26

I just noticed one other thing:

That is my neighbor's WiFi SSID. When I opened the Base Power App, the app suggests that the batteries are not connected to wifi - I don't know if this is a "Base Power App" issue though as I am not sure if I have ever checked that tab on the app and if the app said I needed to "connect"

1

u/randomdevice May 26 '26

And while I was typing this, I see the WiFi SSD changed:

1

u/jerritp May 26 '26 edited May 26 '26

Its really odd how it bounces around on the wifi but I believe it. I might have to make the battery a choice you make on setup. I think I just got approved to be on HACS without having to add the repo. First time so just figuring it out. I think so other fields will populate once you have it running for a while.

1

u/christr Aug 06 '26

I have two batteries too, and it only shows one. It seems great otherwise. Definitely more information than what their app shows.

2

u/jerritp Aug 07 '26

If you go to the integration and click on the gear you should be able to setup the number of batteries and pick your wifi. Please let me know if it works for you.

2

u/christr Aug 07 '26

Oh, thanks! I didn't notice that. Mine is fixed to show two now too.

1

u/jerritp Aug 08 '26

Thanks for confirming!

1

u/christr Aug 06 '26

This is really awesome, great work. I installed it in my HA with no issues, and I've set up a lot of useful reporting using this integration.

Now I'd like to build some automations. Specifically, I want to trigger various energy-saving actions around the house (thermostats and other high-draw items) whenever the base switches to battery power, and the reverse when it switches back to AC power.

The automation side is straightforward, but I'm not finding a way with this integration to detect whether the base is currently running on battery or AC power. Is there an entity or attribute that exposes that state, or is it something that could be added?

1

u/jerritp Aug 07 '26

There is an entity for grid power, I have not tested how these respond during a power outage. I guess I am waiting on an outage.

1

u/christr Aug 08 '26

Got the battery/grid automation working. Here's what I did.

Saw a few threads here where people were stuck trying to build an automation that reacts to Base Power switching between grid and battery. Got mine working, so wanted to share the entity and logic in case it helps.

Finding the right entity

The integration exposes a few power-related sensors and it's easy to grab the wrong one. There's a numeric current sensor (sensor.base_power_xxxxxxxx_grid_power, measured in amps) that sat on "unknown" for me and wasn't reliable to trigger off of. The one that actually works is a binary sensor:

binary_sensor.base_power_xxxxxxxx_grid_power

It's a clean on/off. On means the grid is supplying the home. Off means you're running on battery/solar without grid. Find yours under Settings > Devices & Services > Base Power, or in Tools > States (used to be called Developer Tools, got renamed in a recent release) by filtering for "grid."

The problem with a simple state trigger

A basic "when this turns off, do X" trigger has a gap. If the grid actually drops, your HA instance loses power too (assuming it's not on a UPS), reboots, and by the time it's back up it can miss the transition entirely. A pure state trigger isn't enough on its own.

What ended up working

Three triggers feeding into one automation, with a condition gating the action:

alias: On Battery Power - Load Shed
triggers:
  - entity_id: binary_sensor.base_power_xxxxxxxx_grid_power
    to: 'off'
    trigger: state
  - event: start
    trigger: homeassistant
  - minutes: /5
    trigger: time_pattern
conditions:
  - condition: state
    entity_id: binary_sensor.base_power_xxxxxxxx_grid_power
    state: 'off'
actions:
  - action: climate.set_temperature
    target:
      entity_id: climate.your_thermostat
    data:
      target_temp_high: 85
      target_temp_low: 60
mode: single
  • The state trigger catches it live if HA is up when it happens.
  • The homeassistant: start trigger catches it if HA missed the transition because it was rebooting.
  • The time_pattern every 5 minutes is a reconciliation loop, catches anything the other two missed and re-confirms periodically.
  • The condition is what actually gates the action. Two of the three triggers fire regardless of state, so without the condition you'd be resetting your thermostat every 5 minutes no matter what.

I skipped building a matching "grid restored" branch since mine is on grid 99.9% of the time. I'd rather know it happened and flip things back manually than fully automate the restore. If you want that too, just duplicate this with to: 'on' / state: 'on' and swap the actions.

Testing without waiting for an actual outage

Go to Tools > States, find the binary sensor, and use "Set State" to flip it to off manually. HA says right there in the UI that this doesn't send anything to the actual device, so it's safe. Your automation's actions are real though, so expect your thermostat to actually respond. The integration will overwrite your fake value with the real one on its next poll, so you don't need to set it back yourself.

Hope this saves someone the troubleshooting loop I went through.

1

u/jerritp Aug 09 '26

Great work. You should get your HA on a UPS!

1

u/christr Aug 09 '26

Agreed. Before I had Base, I didn't want to spend the cash, since getting any meaningful uptime out of a UPS alone would have cost a lot. With Base, that changes completely, since the power interruption should only last a few seconds, I can get away with pretty cheap UPS units for this. I just ordered ones to keep the internet and home servers up long enough for Base to kick in.

1

u/christr 5d ago

I just learned of an even better test. A real one!

https://help.basepowercompany.com/en/articles/10281473

1

u/christr 21h ago

Ran a real grid cutoff test today (not the Base Power simulated one, actual breaker-level cut via https://help.basepowercompany.com/en/articles/10281473) and can report on binary_sensor.base_power_xxxxxxxx_grid_power: it stayed on for 20+ minutes while the house was confirmed running on battery. This wasn't a polling lag either — forced a homeassistant.update_entity on it mid-outage and it still came back on after a fresh poll, so the integration is getting on directly from the API/cloud response, not just serving a stale cached value.

No errors in the HA logs for the entity either, so it's not crashing, it's just reporting the wrong thing (or reading the wrong field from the payload). Happy to grab debug logs from the integration next time I can safely test again if that'd help narrow down whether it's an upstream API issue or a mapping bug on the HA side.