Open Battery changed level via MQTT

Discussion in 'Tasker' started by oli, Apr 29, 2020.

  1. oli

    oli New Member

    Joined:
    Apr 29, 2020
    Messages:
    2
    Likes Received:
    0
    Hi all,

    I'm very new to Tasker and hope that someone can give me a hint, what I'm doing wrong. I want to implement the following very simple use case with Tasker:
    When battery level changes, send the current level to an MQTT server (in my case MQTT adapter in ioBroker).

    I did the following:
    1. Installed Tasker and MQTT plugin
    2. Created Profile: Event -> Power -> Battery Changed
    3. Added Task to Profile: Plugin -> MQTT Publisher
    4. Configured the Task (Server, Port, Topic, QoS=1)
    When I press the play sign on the Task Edit page, the connection to the MQTT broker is established, the message is published and the device disconnects immediately (that's what the logs in the MQTT broker show).

    So configuration seem to be fine, but the battery level is not pulished every time when it changes (only from time to time) and I don't know why. I hopefully have disabled all energy saving options for Tasker and MQTT Publisher.

    Additionally tasker notification shows "No active profiles." although my "Battery Changed" profile is switched on.

    Any help will be hghly appreciated ;-)

    Thanks
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,338
    Likes Received:
    784
    Hi there.
    "No Active Profiles" just means that none of the conditions of your profiles is currently true. It doesn't mean that Tasker is not monitoring those profiles.

    Please check here for more info:

    About why it's not working consistently, to make sure Tasker and the AutoApps run in the foreground please check here: https://tasker.joaoapps.com/userguide/en/faqs/faq-problem.html#00

    Pay special attention to the location part. If Tasker doesn't have permission to get location in the background it might not work correctly, so disable and re-enable the location permission and make sure that you allow Tasker to always access it.

    Make sure to check here too: https://dontkillmyapp.com/?app=Tasker

    Hope this helps!
     
  3. oli

    oli New Member

    Joined:
    Apr 29, 2020
    Messages:
    2
    Likes Received:
    0
    Hi @joaomgcd,
    thanks for your response. I just switched from MQTT Publisher Plugin to MQTT Client and everything seems to run (almost) stable now ;-)
     
: Battery

Share This Page