Is there a way to get via tasker and eventghost to get a notification if battery is low?
I want if the battery of my laptop gets below 15% eventghost sent a massage to my fone and tasker intersept this and gifs me a massage thats the battery is low.
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Low batter laptop notification
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Low batter laptop notification
I do not know how you want to use the tasker.
I would suggest rather Pushbullet.
However, for a monitoring battery you can try the Battery plugin.
Pako
I would suggest rather Pushbullet.
However, for a monitoring battery you can try the Battery plugin.
Pako
-
reinholdkorst
- Posts: 13
- Joined: Fri Feb 20, 2015 8:34 pm
Re: Low batter laptop notification
I want to use tasker in combination with autonotification. If my fone receve a notification tasker puts power on or off.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Low batter laptop notification
MAybe you should better look into the possibilities to configure EG for this purpose by using all available actions and event, possibly also some python scripts. Once you have identified what is missing, it si easier to understand how far you have understood the possibilities with EG itself. Provide also screenshots of the part of your configuration that is not working or what you want to solve.
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
reinholdkorst
- Posts: 13
- Joined: Fri Feb 20, 2015 8:34 pm
Re: Low batter laptop notification
I have a script if i sent a text from the fone EG receve this massage en EG sent the battery level to the fone. But i want that EG sent ony the battery level to the fone whitout i must sent a text from the fone and only if the level is below 15%.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Low batter laptop notification
Publish the script here. If you have some user credentials in the script, please modify / take this out first
Copy - Paste then mark as 'Code'
Copy - Paste then mark as 'Code'
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
reinholdkorst
- Posts: 13
- Joined: Fri Feb 20, 2015 8:34 pm
Re: Low batter laptop notification
The script is not mine i font it on the internet.
http://joaoapps.com/autoremote/eventgho ... nd-tricks/
http://joaoapps.com/autoremote/eventgho ... nd-tricks/
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Low batter laptop notification
You can do it like this example, create two macros.
The python script looks now like this. At start of EG it runs and then schedules a check of the battery level every 60 second. If the level is below the value 'criticalLevel' an event is created. You can set the desired level like 15.0 (percentage) or similar.
When the event happens, it triggers the second macro that sends the alarm to your phone. I do not use Autoremote or tasker, I use NMS and Prowl.
You can put here your own action that will send the alarm to your phone.
BestR
The python script looks now like this. At start of EG it runs and then schedules a check of the battery level every 60 second. If the level is below the value 'criticalLevel' an event is created. You can set the desired level like 15.0 (percentage) or similar.
Code: Select all
from ctypes import windll, byref, Structure, c_ubyte, c_ulong
import eg
class SYSTEM_POWER_STATUS(Structure):
_fields_ = [("ACLineStatus", c_ubyte),
("BatteryFlag", c_ubyte),
("BatteryLifePercent", c_ubyte),
("Reserved1", c_ubyte),
("BatteryLifeTime", c_ulong),
("BatteryFullLifeTime", c_ulong)]
def CheckBattery(cl):
sps = SYSTEM_POWER_STATUS()
windll.kernel32.GetSystemPowerStatus(byref(sps))
eg.result = sps.BatteryLifePercent
#print eg.result, cl
if float(eg.result) < cl:
eg.TriggerEvent(
'BatteryLow',
payload = eg.result,
prefix = 'CheckBattery'
)
eg.scheduler.AddTask(60.0, CheckBattery, criticalLevel)
criticalLevel = 15.0
CheckBattery(criticalLevel)
You can put here your own action that will send the alarm to your phone.
BestR
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
reinholdkorst
- Posts: 13
- Joined: Fri Feb 20, 2015 8:34 pm
Re: Low batter laptop notification
i had 1 macro and i must have a second one thats what i doing rong. Thanks it is working now.
Re: Low batter laptop notification
Thanks for this explanation It will be useful beacause i want to do that to:)