Start HACS Add on via Automation

I would like to be able to start a HACS automation every morning as it stops overnight when the battery dies.

I see there is a start automation configuration option, but I don’t see the HACS add on in that list, is this something that is possible?

I have no idea what you are talking about. we need way more information.

First off HACS is not an add-on. it’s an integration.

what HACS automation are you referring to?

What are you referring to as “it”? when what’s battery dies?

2 Likes

I"m running the Davis Weather Station (Vantage Pro to MQTT) Add On / HACS integration. I would like to be able to restart that integration via an automation. The device is a Davis Weather Station that has a battery which doesn’t keep a charge through the night, and thus when the battery dies the weather station stops sending data, and the integration shuts down and has to be restarted every morning when the battery is recharged from the sun.
This Davis Weather Station integration sends binary data from the device into HA so that it can be recorded and charted and saved

Sorry to nitpick but the things that HACS provides are not add-ons. Everything in HACS is an integration, frontend thing or things like AppDaemon Apps or Python scripts.

People are always confused about that distinction. And so much so that the author of HACS baked in an acknowledgement when you install HACS that it doesn’t provide Add-Ons - at all.

that said I’m not aware of any service call that can reload an integration directly.

there is this service call:

homeassistant.reload_config_entry

but you’ll need to do some work to find the info for that integration.

Or I think you might be able to just use an entity_id that is provided by that integration and it reloads the integration.

see this thread:

1 Like

Sure looks like an add on to me, since in HA I go to add ons to start it when it fails…

I don’t see it in my integrations, only the MQTT broker and the HACS store are on this integrations list…

I think I got it working, will know more tomorrow

- id: '1672168047045'
  alias: Start Vantage2MQTT
  description: Automatically Start Vantage Vue 2 MQTT at 0630 every morning
  trigger:
  - platform: time
    at: 06:30:00
  condition: []
  action:
  - service: hassio.addon_start
    data:
      addon: 030ceba9_vantagepro2mqtt
  mode: single

Yes that is an addon. However your statements:

are not correct. HACS does not supply or use addons. The link in the community tab goes to your normal addons and it was put there because of posts like this. Do not let it confuse you, HACS does not supply addons.

As for your automation, that will restart the addon at 630am provided that the addon slug is correct. It will be listed on the addon’s main page. To me, that doesn’t look correct, I would assume the _ should be a -.

1 Like

What is the “add ons Main Page?” Where do I find that?

Settings → Addons

As for the slug (example, do not use this slug)

1 Like

Thank you.

This is what the automation had for options in starting an add on, however you were correct, it is 030ceba9-vantagepro2mqtt so not sure if I need to manually correct it or let it run with what it found automatically…

If it was an option in a drop-down in the UI, I would trust what it wrote and ignore me

Cool, I’ll give it a shot and see if it does anything…

Checked this morning and the automation did not start the add on, so changing to your hyphen and seeing if that makes a difference

it’s an add-on. Not an integration.

there really is a difference.

Changed it just for you :slight_smile:

Thanks!! I feel WAY better now.

:laughing:

So to make sure I have this right in my head:

The HACS is a stand alone integration that you can download front end things like pre made dashboards and the History Explorer card which can be put into a dashboard via a custom card.

The Davis Weather2MQTT is an Add On and does not have an integration piece to it, everything is controlled through the add on page itself?

There are normal integrations for things like Z Wave and Zigbee that allow you to add devices and all of these devices are contained within the one integration menu to control them?

Trying to figure out what the differences are and why it seems to matter so much when all I really care about is that it works…

The fundamental difference ist that integrations are packages of code that extend the function of home assistant by directly adding code into ha
while add-ons are complete programs that run independently from homeassistent. (Although they are managed from inside ha because it is more comfortable)
Hacs is a bit special here because it is an integration that downloads other integrations

In your case the weather2mqtt add-on communicates with the weather station and puts the data into a mqtt broker/server (presumably another add-on).
Then the mqtt integration from inside homeassistent receives data from the mqtt broker/server add-on and updates the connected entities in homeassistent.

Hope this helps more than it confuses :grinning:

Ps, because I like metaphors: Hacs integrations are aftermarket stuff build into your car’s engine compartment, add-ons are trailers.

1 Like

I love the metaphor, thanks!

Add-ons are external apps that provide external functionalities. those apps don’t need HA to function since they are external to HA.

integrations are apps(-ish) that operate within HA itself and provide an interface between external devices and apps (like add-ons but not just add-ons).

without an integration HA wouldn’t be able to interact with those devices or apps.

an example of this is zwavejs.

there is a zwavejs app (either an add-on or stand-alone docker container or a server that is installed on the host directly) that runs outside of HA. it is completely independent of HA itself (except in the case of the add-on it is controlled by the supervisor - which is also technically outside of HA itself).

then there is the zwavejs integration that provides the interface between the zwavejs app (via the add-on or etc) and HA.

in your case your vantagepro2mqtt add-on provides the interface to your weather station device and converts it to a protocol that HA can use but only by using the MQTT integration to set up that communication.

but you also need to run an MQTT server somewhere too. Which can be an add-on, a docker container or installed directly on the host and again is external to HA.

to interface between the MQTT server (created by the add-on etc) you need to use the MQTT integration which is built-in to HA.

HACS provides a way to add additional (or custom) integrations to HA as if those integrations were a part of HA.

The add-on store provides add-ons (community provided or officially provided by the HA team).

HACS provides integrations (or frontend components)

The way you add the two is also completely different.

integrations are activated from within HA in the devices and services section of the settings menu.

add-ons are installed and configured by the supervisor.

But I will say that the new menu layout does make it harder for the users who don’t understand how this all works to differentiate the two.

But also the headings at the top of the two pages when you finally get to the point of installing them does differentiate between the two pretty effectively. I mean, there is “add-ons” and “integrations” right at the top of the respective pages.

1 Like