Windows 10: Custom action once battery level is very low on Windows to use with Webhooks

Discus and support Custom action once battery level is very low on Windows to use with Webhooks in Windows 10 Customization to solve the problem; Good morning dear community. Main objective behind what I am going to ask is to set a trigger once Windows is fullcharged or criticallylow. So in... Discussion in 'Windows 10 Customization' started by leocali33, Sep 25, 2019.

  1. leocali33 Win User

    Custom action once battery level is very low on Windows to use with Webhooks


    Good morning dear community.

    Main objective behind what I am going to ask is to set a trigger once Windows is fullcharged or criticallylow.

    So in both cases I try with this VBScript being executed but don't seem to work in my windows



    set oLocator = CreateObject("WbemScripting.SWbemLocator")
    set oServices = oLocator.ConnectServer(".","root\wmi")
    set oResults = oServices.ExecQuery("select * from batteryfullchargedcapacity")
    foreach oResult in oResults
    iFull = oResult.FullChargedCapacity
    nextwhile (1)
    set oResults = oServices.ExecQuery("select * from batterystatus")
    foreach oResult in oResults
    iRemaining = oResult.RemainingCapacity
    bCharging = oResult.Charging
    next
    iPercent = ((iRemaining / iFull) * 100) mod 100
    If bCharging And (iPercent > 98) Then MsgBox "Battery is fully charged",vbInformation, "Battery monitor"
    wscript.sleep 30000 ' 5 minutes
    wend

    This I got it from here https://www.addictivetips.com/windows-tips/get-alerts-when-your-laptop-battery-is-low-or-full/

    Besides the main action that I would need is not really a notification but this cmd command

    curl -X POST https://maker.ifttt.com/trigger/low_battery/with/key/d78hxxxxxxxx_WU_xxxU6

    -------------------------------------------------------------------------


    A pseudo-code of something more or less like this perhaps


    If bCharging And (iPercent > 98) Then curl -X POST https://maker.ifttt.com/trigger/low_battery/with/key/d78hxxxxxxxx_WU_xxxU6 , vbInformation, "Battery monitor"

    For that specific line.

    Is there a possibility to make it possible or even perhaps more easy like adding custom action once battery or low instead of sleep, shutdown and hibernate in energy options like to be able to execute a command or simply once windows reach battery at 5% execute the command above.

    Thank you Custom action once battery level is very low on Windows to use with Webhooks :)

    :)
     
    leocali33, Sep 25, 2019
    #1

  2. Custom action once battery level is very low on Windows to use with Webhooks

    Hi,



    Thank you for writing to Microsoft Community Forums.



    We understand your concern as you are looking for Custom action once battery level is very low on Windows.



    Let me point you in the right direction, where you would get the appropriate help for this issue. I would suggest you to post your query in

    MSDN forums
    , where we have support professionals and participating developers to assist you with the appropriate details.



    Regards.



    Aditya Roy

    Microsoft Community – Moderator
     
    Aditya_Roy, Sep 28, 2019
    #2
  3. leocali33 Win User
    Custom action once battery level is very low on Windows to use with Webhooks

    Good morning dear community.

    Main objective behind what I am going to ask is to set a trigger once Windows is fullcharged or criticallylow.

    So in both cases I try with this VBScript being executed but don't seem to work in my windows

     
    leocali33, Sep 28, 2019
    #3
  4. jogusk Win User

    Custom action once battery level is very low on Windows to use with Webhooks

    no low battery warning windows 10

    read here:

    i think you have set it incorrectly.

    the low battery-level must be higher than the critical level.

    try this way. remember to set this in the described order. low level/ low level action

    critical level/critical level action!

    4 steps

    How to Set Low Battery Warnings on Your Windows 10 Laptop - dummies
     
    jogusk, Sep 28, 2019
    #4
Thema:

Custom action once battery level is very low on Windows to use with Webhooks

Loading...
  1. Custom action once battery level is very low on Windows to use with Webhooks - Similar Threads - Custom action once

  2. Low battery warning level change

    in Windows 10 Gaming
    Low battery warning level change: How do I change the low battery warning on Windows for education from 10% to 20%. I do not have access to an administrator login https://answers.microsoft.com/en-us/windows/forum/all/low-battery-warning-level-change/b81160e8-0ad7-418b-83a0-38864c780aae
  3. Low battery warning level change

    in Windows 10 Software and Apps
    Low battery warning level change: How do I change the low battery warning on Windows for education from 10% to 20%. I do not have access to an administrator login https://answers.microsoft.com/en-us/windows/forum/all/low-battery-warning-level-change/b81160e8-0ad7-418b-83a0-38864c780aae
  4. Customizing two low-battery notifications on Windows 10?

    in Windows 10 Software and Apps
    Customizing two low-battery notifications on Windows 10?: Hello, is there a way to program two low-battery notifications instead of just one?I have the default notif that appears at 15% battery on my ASUS Windows 10, but would like to customize two notifs: at 30% and then 15%, if possible.There is no option in "Control Panel.. >...
  5. Customizing two low-battery notifications on Windows 10?

    in Windows 10 Performance & Maintenance
    Customizing two low-battery notifications on Windows 10?: Hello, is there a way to program two low-battery notifications instead of just one?I have the default notif that appears at 15% battery on my ASUS Windows 10, but would like to customize two notifs: at 30% and then 15%, if possible.There is no option in "Control Panel.. >...
  6. Customizing two low-battery notifications on Windows 10?

    in Windows 10 Gaming
    Customizing two low-battery notifications on Windows 10?: Hello, is there a way to program two low-battery notifications instead of just one?I have the default notif that appears at 15% battery on my ASUS Windows 10, but would like to customize two notifs: at 30% and then 15%, if possible.There is no option in "Control Panel.. >...
  7. Can I customize the warning of low battery ?

    in Windows 10 Customization
    Can I customize the warning of low battery ?: My laptops battery life is very low, thats why when I get the low battery sign immediately laptop turns off after that. I want the warning early so that I can plug in the charger immediately. I also have one more question : Is it ok if I keep the laptop plugged in whenever I...
  8. Very high sound at low audio level

    in Windows 10 Customization
    Very high sound at low audio level: I feel like my PC has 100% volume when it's just 10-15%. I tried updating my audio drivers but it did not solve the problem... My headphone is using USB, but probably it have nothing to do with the problem cause the problem still stands in all the audio devices i have...
  9. Microphone input level very low

    in Windows 10 Drivers and Hardware
    Microphone input level very low: My W10 PC is bang up to date, all updates installed. I decided to set up a mic for Zoom/Skype, but... I followed a very long post now locked on the subject of low input levels for microphones in Windows 10. Most helpful was the final post which suggested changing the...
  10. Change Battery Notification, Level, and Action Settings in Windows

    in Windows 10 Tutorials
    Change Battery Notification, Level, and Action Settings in Windows: How to: Change Battery Notification, Level, and Action Settings in Windows [img] Information The Battery setting in Power Options allows you to configure notification and action settings you want when your battery reaches a set low and critical level. By default, when...

Users found this page by searching for:

  1. if laptop battery says 20 percent send IFTTT trigger