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

Install from pypi with:

pip install mqtt-presence-checker

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.5.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

mqtt_presence_checker-0.1.5-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mqtt_presence_checker-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6aaa75009b282e6fc07705c8cc6a3313062435cff0ae39fa7c28588c2362aea2
MD5 deb93936bcea5e992df1faf2a228d7d3
BLAKE2b-256 cdbd78fd506d65e336f6dc48fe21464732d102b0050ba579e166cfd7b70cfe8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqtt_presence_checker-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a2906c480f58326d70876067eb5b97708b12f7ed60e0ffdd55c21e0b6d2fa2e6
MD5 0d4e314004649e8d75779c694205c42b
BLAKE2b-256 4a26932447fd147727d8d8bd0cb8fcc8280ec16edde077750f98c2fd1f8610e4

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