Skip to main content

Check if you (or your phone) is at home and notify your smarthome via mqtt!

Project description

mqtt-presence-checker

Check if you (or your phone) is at home and notify your smarthome via mqtt. You can configure this daemon via a toml file in /etc/mqtt-presence-checker/mqtt-presence-checker.conf.

/etc/mqtt-presence-checker/mqtt-presence-checker.conf:

[main]
cooldown = 10
log = "/var/log/mqtt-presence-checker.log"

[mqtt]
host = "mqtt.example.org"
username = "<username>"
password = "<password>"
topic = "presence-checker/presence"

[mqtt.sensor.door-sensor]
topic = "zigbee2mqtt/door_sensor"
predicate = "lambda x: not x['contact']"

[ping]
hosts = [
    'alice.example.org',
    'bob.example.org'
]

This is rather rudimentary and might crash or behave strange. Feel free to fork me on github and send a PR if you find any bug!

Install with docker

Run with docker:

docker run --name mqtt-presence-checker  --restart unless-stopped -v /etc/mqtt-presence-checker/:/etc/mqtt-presence-checker/ --rm -d docker.io/rincewindwizzard/mqtt-presence-checker:latest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mqtt_presence_checker-0.1.15.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

mqtt_presence_checker-0.1.15-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file mqtt_presence_checker-0.1.15.tar.gz.

File metadata

  • Download URL: mqtt_presence_checker-0.1.15.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Linux/5.15.0-52-generic

File hashes

Hashes for mqtt_presence_checker-0.1.15.tar.gz
Algorithm Hash digest
SHA256 d5e8dde7608bd5047bd68d9316e88853ca7e9ba28240af3e03b0058e6f1accf5
MD5 ae9cd7e34a1bacb65c516bd532d05e0d
BLAKE2b-256 4a13e05e935821a738a30c4cb02e8222d6b3c7630e8339edbd7f64f53f8fa528

See more details on using hashes here.

File details

Details for the file mqtt_presence_checker-0.1.15-py3-none-any.whl.

File metadata

File hashes

Hashes for mqtt_presence_checker-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 a378032846f1ab2d4cb43761fd06fdb8ea1593350c49176476fdea44bec4f1d6
MD5 eeae35222024b586a102e104b8aef0f9
BLAKE2b-256 d646d0ec433ef433c35cb7d28391d02223b2ce2f8913c957d0a89bb016c784c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page