home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.67k stars 30.43k forks source link

Pushover GUI configuration allows only one instance #77852

Closed mdehaas closed 2 years ago

mdehaas commented 2 years ago

The problem

In the new version only one instance of pushover is possible.

I had multiple Pushover applications configured to separate messages in inboxes, one for Home Assistant stuff, one for my Alarmo and one for rescue services notifications. This was my YAML of which only the first entry was automatically migrated. (See example snippet field)

Also I am not able to recreate the 'channels' by adding another instance of Pushover. I get an error stating "Service is already created". It seems as if the contributer has not taken this scenario into account which breaks my notification automations. I hope this will get fixed. If not It at least needs to be an item on the list of breaking changes.

Kind regards, Marcel

What version of Home Assistant Core has the issue?

2022.9.0b4

What was the last working version of Home Assistant Core?

2022.8.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Pushover

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/pushover

Diagnostics information

No response

Example YAML snippet

pushover:
  - name: Pushover
    platform: pushover
    user_key: !secret pushover_userkey
    api_key: !secret pushover_homeassistant_apikey

  - name: Pushover P2000 Brandweer
    platform: pushover
    user_key: !secret pushover_userkey
    api_key: !secret pushover_p2000brandweer_apikey

  - name: Pushover P2000 Ambulance
    platform: pushover
    user_key: !secret pushover_userkey
    api_key: !secret pushover_p2000ambulance_apikey

  - name: Pushover P2000 Politie
    platform: pushover
    user_key: !secret pushover_userkey
    api_key: !secret pushover_p2000politie_apikey

  - name: Pushover Lifeliner
    platform: pushover
    user_key: !secret pushover_userkey
    api_key: !secret pushover_lifeliner_apikey

  - name: Pushover Alarm
    platform: pushover
    user_key: !secret pushover_userkey
    api_key: !secret pushover_alarm_apikey

Anything in the logs that might be useful for us?

No, just the error message in the GUI

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

pushover documentation pushover source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @engrbm87, mind taking a look at this issue as it has been labeled with an integration (pushover) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

engrbm87 commented 2 years ago

Can you please explain the need for configuring multiple notify services for the same user key. What is the purpose of having multiple api keys to be used by Home assistant? What was the difference between these configured services in the previous version of HA?

mdehaas commented 2 years ago

I have multiple applications defined in the pushover interface as each of these create a separate mailbox in the app. This allows me to keep essential Home messaging away from less important Fire&Rescue messages. Also I have my Alarmo messages seperated (No messages here so that is not in the app screenshot), also different apps can have different icons. This functionality was my main reason to switch to Pushover for push notifications. App Screenshot Pushover Applications configuration This functionality worked perfectly in the previous integration and since I'm not that much of an advanced user I think there will be other people who will be impacted by this change.

mdehaas commented 2 years ago

Thanks. I will try it when the next beta is available.

fightingmajor commented 2 years ago

in 2022.9, it won't even allow added 1 user. Says failed to connect on set up every time.

NF8C commented 2 years ago

This is one of the first problems I ran into as well. Thank you!

engrbm87 commented 2 years ago

Hello @fightingmajor , did you have the pushover integration configured before updating to 2022.9? or are you configuring a new instance? Anything showing in the logs that can help identify the issue. Most probably this is a communication issue with pushover api. Perhaps you can try again later and see if it works.

mdehaas commented 2 years ago

in 2022.9, it won't even allow added 1 user. Says failed to connect on set up every time.

I feel this should be a new issue. This seems to be scope-creep from the original issue.

toofewacres commented 2 years ago

I also need multiple instances. I have mine setup to send messages to either myself, my wife, or both of us depending on the need.. With this implementation, that's now broken. Shouldn't have to wait for a "New beta" ..

AlexKay88 commented 2 years ago

Same here. I also miss several pushover applications to be configured by GUI. This breaks my pushover notification channels. Would be great if, once a fix is final, this can be marked as cherry-picked for next release description.

eadamsintel commented 2 years ago

I also would like to be able to have multiple API keys tied to a single user key. On the pushover site you can define different images and sounds that get pushed to your phone depending on which API key is used. If my front door gets unlocked I get a picture of a door knob and a unlocking sound. If someone walks past my room sensor I get a picture of a room with a sound "intruder alert"

genestealer commented 2 years ago

I have the same issue. I see PR https://github.com/home-assistant/core/pull/77904 was submitted to fix this

JCrankWV commented 2 years ago

Multiple instances are still not working in 2022.9.2

mdehaas commented 2 years ago

Multiple instances are still not working in 2022.9.2

That's because the PR is not yet accepted for release....

copywizard commented 2 years ago

i have the same issue and would like to have multiple pushover api keys to be used with one user key.

for now i will just keep the issue to ignore and not update to 2022.11 when it comes out until it is fixed. And for now the old config still works even after setting up the new device/integration.

But please add the option to add multiple keys to one device.

I-G-1-1 commented 2 years ago

hi, same problem here. With Home Assistant 2022.8.7 I was using different pushover apps (api_key) with the same user_key. Today I updated to 2022.9.5 and only the first Pushover Integration was migrated. I tried to manually add the other istances using the Web-UI but it says that "the integration is already configured".

As this break a lot of my automations with pushover notification I'll revert to to 2022.8.

Please let us configure more than 1 "Pushover Notification" as was before.

EDIT: I solved for now manually editing core.config_entries and adding this block for every pushover istance I need:

{
        "entry_id": "**copy the ID of the istance above and change last number or letter (IMPORTANT it must be unique)**",
        "version": 1,
        "domain": "pushover",
        "title": "**put the name you want (use the one you used after notify. in your automation)**",
        "data": {
          "name": "**put the name you want (use the one you used after notify. in your automation)**",
          "api_key": "**put here pushover api_key**",
          "user_key": "**put here pushover user_key**"
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": "**put here pushover user_key**",
        "disabled_by": null
      },
mdehaas commented 2 years ago

hi, same problem here. With Home Assistant 2022.8.7 I was using different pushover apps (api_key) with the same user_key. Today I updated to 2022.9.5 and only the first Pushover Integration was migrated. I tried to manually add the other istances using the Web-UI but it says that "the integration is already configured".

As this break a lot of my automations with pushover notification I'll revert to to 2022.8.

Please let us configure more than 1 "Pushover Notification" as was before.

EDIT: I solved for now manually editing core.config_entries and adding this block for every pushover istance I need:

{
        "entry_id": "**copy the ID of the istance above and change last number or letter (IMPORTANT it must be unique)**",
        "version": 1,
        "domain": "pushover",
        "title": "**put the name you want (use the one you used after notify. in your automation)**",
        "data": {
          "name": "**put the name you want (use the one you used after notify. in your automation)**",
          "api_key": "**put here pushover api_key**",
          "user_key": "**put here pushover user_key**"
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": "**put here pushover user_key**",
        "disabled_by": null
      },

Is this hack persistent over HA restart / Host reboot?

I-G-1-1 commented 2 years ago

Is this hack persistent over HA restart / Host reboot?

yes, but you have to be sure that entry_id is a unique string. I took the entry_id of the first pushover (configured by Web-UI) and changed the last number. After the reboot of HomeAssistant you'll find these manually added "istance" of pushover in the Web-UI.

copywizard commented 2 years ago

thanks for the fix but i will just wait until the developers pick this up

mdehaas commented 2 years ago

That makes sense since the discussion in #77904 is about how to generate a unique ID. At the moment the unique ID is the same as the user key. The CO was not aware of the scenario that people had multiple applications (api_key) configured. The obvious solution would be to add the API key to the unique_id. That however is suboptimal because you can regenerate the token if the key is compromised in any way. Also I just found out you can reset the user key so using this value in the unique_id. So it will be very likely that the logic will change and any 'manual stuff' may create double entries once a PR is accepted.

I-G-1-1 commented 2 years ago

So it will be very likely that the logic will change and any 'manual stuff' may create double entries once a PR is accepted.

thanks for the advice. I'll revert the 'manual stuff' before any future update.