Linux Laptop Component

Hello,

I would like to start working on a “Laptop” component for linux laptop.

The device would be able to report the following:

  • Battery level: 0 - 100
  • State: Off/Lid Open/Lid Closed/Unknown
  • Charging Status: Charging/AC/Discharging
  • Display Brightness: 0 - 100
  • Keyboard Brightness: 0 - 100
  • Ambient Light Sensor: 0 - 100

Would be great if someone could provide the places where to fetch these info so that we can create an app which would expose these features via MQTT.

Have a look at psmqtt. It reports system info over mqtt. Sadly not the information you are after, but it’s a great start for what you want.

1 Like

you could also roll something yourself using Node-red to send system info over MQTT

I think the best places where to find those information is dbus.

1 Like

This looks great! Do you have any other project for controlling unix based computers as well? reboot or restarting services?