Oh that’s a bummer, it used to work fine on my wife’s iPhone.
I’ll look into it when I next work on the script!
Oh that’s a bummer, it used to work fine on my wife’s iPhone.
I’ll look into it when I next work on the script!
I just recalled, there’s a known case where timeouts causes a bug in the script that I’ve yet to address.
You can do a check on traces, just in case the script failed silently.
I have a strange issue. It seems if I create a new notification it tends to work. If I make any changes to the script afterwards, it stops working and logs the following:
“The length of [apns-collapse-id] header must not exceed [64] bytes. This message is generated externally to Home Assistant.”
It doesn’t really matter what I then change hereafter, I can strip it of any actions, camera entity, etc. it still fails.
Below is an example notification script. Any idea what I might be doing wrong here? Thanks.
alias: Notify MIC - Garage door opening
use_blueprint:
path: samuelthng/notifications.yaml
input:
notify_device: 09340e0b2a2f10f30fa447f79aa45932
title: Garage
message: Garage door 1 opening
confirm_text: Close garage door 1
confirm_option_mode: action
confirm_action:
- service: cover.close_cover
metadata: {}
data: {}
target:
entity_id: cover.garage_port_1_garage_door
dismiss_action: []
dismiss_enabled: false
attachment_type: camera_entity
attachment_camera_entity: camera.driveway
description: ""```
@mickeynygaard, it might not be due to your configuration. I suspect it might be a compatibility issue with the new collapsible sections feature.
I’ll have a look into this soon, overseas this year for work.
Uh, ok - Thanks for clearing that up. Appreciate your efforts, really a cool blueprint
Thank you so much for this blueprint! Unfortunately, it’s not working in my case. I am using HA 2024.8.2, but I didn’t get any notifications via the mobile app. If I send a custom notification manually, the notification is working fine. Do you have any ideas what could be the issue here? I’d really appreciate your help!
You should include whatever error is in the system log.
Most likely you’re running into the same error as me.
I have two major usecases but I’m not sure if this blueprint can handle it. So any hints are welcome
1:
I want to sent a notification to all mobile apps (of my family) if e.g. the front door is open to long. So someone need to go and close the door.
In this case I want to periodically (re)sent the notification as long as the door is open but let the notifcation disappear on all mobile devices as soon as the door has been closed.
Currently I don’t know how to a) setup the resent part and b) call the script to make the notification disappear (clear).
2:
If e.g. the washing maschine is ready I want to sent a notifcation with an “I took the laundry”-action. As soon as someone pressed this action I want the notification to disappear from all devices.
In this case I don’t know how to make the action sent the clear message.
Hello @Eimeel, The script is primarily focused at sending message to 1 device.
You can achieve the following by calling the script through other automations with helpers.
Since the second use case is simpler, let me use that as an example.
You could have an automation triggered by the washing machine that does the following:
If washing machine is done, trigger all scripts (1 notification script per device)
Save the response of each script into variables (response.result will be set if option selected)
Wait for a timeout
After the timeout, check all of the variables if anyone has responded.
If someone has responded, you may optionally send a clear command to all devices.
If nobody has responded, send the notification again.
You’ll need quite a bit of templating magic to get this to work, but it’s possible to do it without any helpers or python script.
I would like to take this chance to let everyone know, I have been on a haitus due to a really hectic year.
Will need some more time before I can continue with my hobbies.
Apologies for any inconvenience caused.
For #1 you can use this example:
alias: Upstairs Bathroom Door Left Open
description: ""
mode: single
triggers:
- entity_id:
- binary_sensor.upstairs_bathroom_door_contact
from: "off"
to: "on"
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
conditions:
- condition: state
entity_id: binary_sensor.cat_room_door_sensor_contact
state: "on"
actions:
- alias: Repeat the sequence UNTIL true
repeat:
sequence:
- data:
title: Upstairs Bathroom Door Was left Open
message: Rajah might be in the Upstairs Bathroom
data:
push:
sound:
name: default
critical: 0
volume: 1
action: notify.all_ios_devices
- data:
target: media_player.sonos_1_right_side
data:
type: tts
message: Upstairs Bathroom Door is Open
action: notify.alexa_media
- delay:
minutes: 1
until:
- condition: state
entity_id: binary_sensor.upstairs_bathroom_door_contact
state: "off"
Hello, just wanted to say thanks for the great blueprint, it’s ticked all the boxes I needed, and this bit of info was the last little key! My only suggestion would be it took me a while to find this info about accessing the screenshot, so it would be great if this was in the main instructions/documentation as well as for camera applications I feel like this would be common. Thanks again!
Edit: Should have kept reading, I’ve run into the same issue with the token expiring after restart. It would be great to be able to access a larger image from the notification one day.
Is it possible to use a custom sound for iOS notifications?
You can try this branch by pedropaislopes:
Full credits to pedropaislopes. Not merging to main for reasons, I’ve got a few changes stashed that includes this but isn’t ready for production.