LAB02-Research / HASS.Agent-Notifier

HASS.Agent Notifier integration. Adds notifications to HASS.Agent - a Windows based client for Home Assistant.
MIT License
67 stars 4 forks source link

I can't install the integration ¯\_(ツ)_/¯ #1

Closed FiftyFour7250 closed 2 years ago

FiftyFour7250 commented 2 years ago

Hello. For some reason I can't install this integration. HACS just doesn't have it. Then I tried to install manually, but it didn't help either, it doesn't appear after restarting HA. What could be the problem?

FiftyFour7250 commented 2 years ago

Oh, I had to add this as a custom integration, through three dots in the upper right corner in HACS, and it worked.

FiftyFour7250 commented 2 years ago

Nah. It still doesn't work. Even though I managed to install the integration, it still doesn't work. This is not in the list of integrations. No new services have appeared. I can't create a notification through this service, because it doesn't exist. Reinstalling via the HACS didn't help((

Here is the video: https://disk.yandex.ru/i/gA5dSrr4s6tbjg

FiftyFour7250 commented 2 years ago

Of course, I don't understand much, but isn't it better to use not a separate service for projecting notifications on Windows, but something that will simply reflect persistent notifications? It would work even without the internet. There would be no need to install integration, configure the port. The persistent notification mirror would work right out of the box.

LAB02-Admin commented 2 years ago

Hi @FiftyFour7250, thank you for the extensive report! You can ignore my reply here, since you already managed to install.

You have to add the notification entity first, as described here:

notify: 
  name: "hass agent test device"
  platform: hass_agent_notifier
  resource: http://{device_ip}:5115/notify

Restart your Home Assistant instance, and afterwards you can add the new entity in your scripts and automatoins. So you don't have to call the integration directly.

Regarding your persistent notifications tip; this method also doesn't require internet. It goes from your Home Assistant instance directly to your machine, no external servers required. But I do plan on making notifications easier to use - now that this version's released, I'll start looking into better ways that don't require tinkering with ports. Thanks!

LAB02-Admin commented 2 years ago

Hi @FiftyFour7250, please remove & reinstall the integration. I noticed Home Assistant didn't like the folder name, so I changed it to be more compliant. After reïnstalling, the snippet I posted will work.

Be sure to change the IP to your device's ip, and open the port in your firewall. You can run the following command from an elevated promt if you want:

netsh advfirewall firewall add rule name="HASS.Agent Notifier" dir=in action=allow protocol=TCP localport=5115

FiftyFour7250 commented 2 years ago

Yea, thanks it worked. For posterity: "device IP" - is the local IP address of your computer To open the port, just run the command prompt as an administrator, and paste the line from the last message

LAB02-Admin commented 2 years ago

Good to hear, thanks for the feedback! I'll have a look at the documentation to see if it can be made more clear.