Battery level

Hi … I need to check the battery level of a tablet that I use for home automation with home assistant.
I use fully-kiosk to view HA. How does the battery sensor rest work?

Here’s how I’ve done it, although there may be an easier way.

If you’re using Fully Kiosk Browser, have bought the Plus version and have a working MQTT broker, you can turn on MQTT under Settings / Other:

image

image

You can then set up an MQTT sensor (replace DEVICE_ID with yours):

- platform: mqtt
  name: "FKB tablet"
  state_topic: "fully/event/onMotion/DEVICE_ID"
  json_attributes_topic: fully/deviceInfo/DEVICE_ID

and a template sensor to pull the battery level out of the attributes of that MQTT sensor:

template:
  - sensor:
      - name: "FKB tablet battery level"
        unit_of_measurement: '%'
        device_class: battery
        state: "{{ state_attr('sensor.fkb_tablet', 'batteryLevel') }}"

Alternatively, if you additionally install the HA app on the device, it will report back directly as a sensor.

Thanks for answering me … I would be interested in implementing the sensor through mqtt. (other method with HA app is active but not always reliable). Do I have to enter username and password once Mqtt is activated on the tablet? (used in HA mqtt)

sensor 5:
  - platform: mqtt
    name: "TabA7"
    state_topic: "fully/event/onMotion/192.168.1.xxx"
    json_attributes_topic: "fully/deviceInfo/192.168.1.xxx"
    
template:
  - sensor:
      - name: "TabA7 battery level"
        unit_of_measurement: '%'
        device_class: battery
        state: "{{ state_attr('sensor.TabA7', 'batteryLevel') }}"

I then found only one entity:
unknown sensor.taba7

Grazie

DEVICE_ID not DEVICE_IP. Have a look what messages are being sent over MQTT and edit the sensor to match.

Where do i find the device id of the samsung tablet?

Did you try this?

I seem to have solved:
Activate mqtt
Enter your MQTT broker url: tcp: // 192.168…
username: xxxx
password: xxxxx
The DEVICE ID can be found in the fully-kiosk device info menu

sensor 5:
  - platform: mqtt
    state_topic: "fully/event/onBatteryLevelChanged/Device.ID"
    name: tablet_a7
    device_class: battery
    value_template: "{{ value_json.level }}"

Why not just use the FKB integration? It will pull in about 18 entities which includes a battery sensor.

did you read this

If you just want the one battery sensor from FKB using MQTT, you can just add this to your sensors.yaml

- platform: mqtt
  name: "Battery FKB Tablet"
  state_topic: "fully/deviceInfo/galaxytab10"
  unit_of_measurement: "%"
  device_class: battery
  value_template: "{{ value_json.batteryLevel }}"

Change $deviceid under MQTT settings if you want a custom one like I have.

image