- platform: smtp
name: sms_alert
server: smtp.gmail.com
port: 587
sender: MY_GMAIL_EMAIL.com
starttls: 1
username: MY_GMAIL_EMAIL.com
password: secret
recipient: [email protected]
timeout: 20 #delay needed for large images
Ah, youāre using smtp
platform. I donāt know about it.
This thread is about using platform nfandroidtv
for sending notifications to Android/FireTV.
When I try to send the photo to my firestick only the message shows up but the photo comes to my phone via telegram just fine.
Any help would be appreciated. Thank you
- id: '1583604542950'
alias: Send Frontdoor photo on motion
description: ''
trigger:
- entity_id: binary_sensor.motion_frontdoor
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
entity_id: camera.frontdoor
filename: /config/www/frontdoor_{{ now ().year }}_{{ now ().month }}_{{ now
().day }}_{{ now ().hour }}_{{ now ().minute }}.jpg
entity_id: camera.frontdoor
service: camera.snapshot
- delay: '5'
- data:
data:
duration: 10
file:
path: config/www/frontdoor_{{ now ().year }}_{{ now ().month }}_{{ now ().day
}}_{{ now ().hour }}_{{ now ().minute }}.jpg
position: bottom-right
message: Message Text!
title: My Notification
service: notify.livingroom
When I try it like this on an image that already exist in that folder it works fine.
- id: '1583604542950'
alias: Send Frontdoor photo on motion
description: ''
trigger:
- entity_id: binary_sensor.motion_frontdoor
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
entity_id: camera.frontdoor
filename: /config/www/frontdoor_{{ now ().year }}_{{ now ().month }}_{{ now
().day }}_{{ now ().hour }}_{{ now ().minute }}.jpg
entity_id: camera.frontdoor
service: camera.snapshot
- delay: '5'
message: "Message Text!"
title: "My Notification"
data:
duration: 10
position: bottom-right
file:
path: "/config/www/test.jpg"
service: notify.livingroom
I use thisā¦ the date format is irrelevant thats like that for my purposesā¦ but because you are using now() it is different by the time it does the next action and because of your delayā¦ so itās trying to send a file name that isnāt thereā¦
So by using last_triggered from the automation that value is the same throughout the duration of the automation runningā¦
{{ as_timestamp(states.automation.camera_motion_scripted.attributes.last_triggered)|timestamp_custom('%Y_%m_%d__%H_%M_%S-0400') }}.jpg"
As both the file name to save it and file name to send itā¦
with your delay in there the timestamp with now is going to be 5 seconds off no matter what anyway because of the delayā¦
And obviously you will have to change the automation to the name of yoursā¦
I did it like this and it doesnt seem to be working
entity_id: camera.frontdoor
filename: >-
config/www/frontdoor_{{
as_timestamp(states.automation.send_frontdoor_photo_on_motion.attributes.last_triggered)|timestamp_custom('%Y_%m_%d__%H_%M_%S-0400')
}}.jpg
should be /config/.....
your missing the leading /
Thanks I donāt know how I missed that
i installed the custom component to get logos working but cannot fathom the method to use!
logo:
filename: /path/to/sega.png
??
Hi
Did you ever get the icon working again to maybe show the Home Assistant icon on the left when sending a message to the TV ?
If not, what is the location of the file and maybe we can rename it in our installs ?
Thanks
Martyn
No, I havenāt tried that in ages. Back then the HA icon was hardcoded I believe. To get this working you probably have to copy the icon somewhere where it can be accessed, or use an URL thatās always available. Just try with the URL of the Icon from the public Home Assistant website. That should work.
Hi
Thanks for the quick reply. Is there a way to position the icon/url as I see on the app it shows it on the left but the image just seems to be at the top of the notification ?
Thanks
Martyn
Hello in the application it is possible to define to remove the notification with the remote control With interaction mode :enabled and display duration:unlimited, my question is :is it possible to do the same on HA, I tried but without success.
Thanks to you
Is it possible to destroy a message or overwrite it? I have an message for 60 seconds and if something happens in this time it should be overwritten with another message. But until now it wait with the second message until the first one is gone after 60 seconds.
Also looking for a way to do this, did you figure out a solution?
I did see that I can dismiss a notification by using the remote for my android tv, but Iād much rather be able to dismiss from HA
After snapshot u need add the delay timeout for file save, before notify platform will started it own part.
a live camera feed (stream) insāt possible on Android TV - right?
I have one working. I have a camera in HA and cast to a Shield TV with the following service call:
- service: camera.play_stream
data:
entity_id: camera.CAMERANAME
media_player: media_player.CHROMECASTNAME
casting is not the same as the notifications produced by the integration nfandroidtv
Iām trying to set up this integration via GUI, and Iām getting the following error:
Source: components/nfandroidtv/config_flow.py:71
Integration: Notifications for Android TV / Fire TV (documentation, issues)
First occurred: 11:46:31 PM (17 occurrences)
Last logged: 11:48:16 PM
Error connecting to device at 192.168.2.86
The device is a Google Chromecast with Google TV. Iāve installed Notifications for Android TV from the app store, and developer mode is activated.
The IP address is the right one, reserved in my router.