Author |
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: April 24 2021 at 11:05 | IP Logged
|
|
|
For Fire TV Users:
From some other forums, I found a niffty way to send notifications onto your Fire TV (no matter what app the Fire TV is playing at the time). You need the free FireTV app "Notification for Fire TV"
installed. It recieves the message that is sent. You also need cURL, but that is now installed with the latest Win10 updates.
Once the Fire TV app is installed; make note of the Fire TV IP address. That address is used in the cURL command. You will also need to place a small (2-4 Kb) png icon (any icon you want) somewhere. For
the example below, I placed it directly on my "c:" drive.
From a Win10 command line, the command looks like:
curl -v -F type=0 -F title=ALERT-Notification -F msg="Your Message Here! Box will scale to the length of this text" -F duration="4" -F fontsize=0 -F position=0 -F width=0 -F bkgcolor="#607d8b" -F
transparency=1 -F offset=0 -F offsety=0 -F app="Notifications for fire tv" -F force=true -F filename="@C:/icon.png" http://192.168.x.xxx:7676/
From PowerHome, simply wrap it in the ph_run() command:
ph_run('curl -v -F type=0 -F title=ALERT-Notification -F msg="Your Message Here!" -F duration="4" -F fontsize=0 -F position=0 -F width=0 -F bkgcolor="#607d8b" -F transparency=1 -F offset=0 -F
offsety=0 -F app="Notifications for fire tv" -F force=true -F filename="@C:/icon.png" http://192.168.x.xxx:7676/')
You can adjust the Title, Message, and Duration (in seconds). I suspect the fonts and color can also be adjusted.
Question for Dave:
Running the latest PH beta, I have tried to run this with the ph_run1() command so that I don't have a CMD window flashing on the PH screen.
I have tried: ph_run1('XXX',0,4+16) as in your 3rd help example, but no success. Thoughts??
===================================
Update:
Credit to this web page: https://www.home-assistant.io/integrations/nfandroidtv/
Font Size: 0,1,2,3 (small - large)
Transparency; 1,2,3,4,5 (100% solid - 100% clear)
Position: 1,2,3,4,5 (LLeft, URight, ULeft, Center,
LRight).
Width: 1-4 (1 narrow, 4 wide)
Background color: Black=#000000
Update#2: Filename format is now corrected.
Edited by smarty - September 27 2021 at 13:35
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: September 27 2021 at 13:30 | IP Logged
|
|
|
This is what it looks like for ph_run1():
ph_run1("curl.exe",'-F type=0 -F title="ALERT-Notification" -F msg="Your Message Here!" -F duration=5 -F fontsize=0 -F position=0 -F width=0 -F bkgcolor=#CC0066 -F transparency=1 -F offset=0 -F offsety=0 -F app="Notifications for fire tv"
-F force=true -F filename=@c:/icon2.png http://192.168.20.121:7676/',"",0,8)
Edited by smarty - September 27 2021 at 13:32
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
|
|