Skip to content

Monitor my garage door and tell me when I leave it open

License

Notifications You must be signed in to change notification settings

melgish/door-notifier

Repository files navigation

door-notifier

License: MIT .NET CodeQL codecov

A simple service to poll my garage door sensor and send me a notification when I leave it open for too long

Configuration

Application can be configured via appsettings.json

{
  "Sensor": {
    // URI for the sensor endpoint.
    // Expects a text/plain response of either OPEN, CLOSED, or UNKNOWN
    "Uri": "http://192.168.1.111/garage-door-sensor"
  },
  "Notify": {
    // URI for NTFY notifier including topic.
    "Uri": "http://192.168.1.112/garage-door-sensor",
    // Security token for NTFY notifier with write access to topic.
    "Token": ""
  },
  "Worker": {
    // How long before notifying that the door is open.
    "After": "01:00:00",
    // How often to check the door state.
    "Interval": "00:01:00"
  },
  "Serilog": {
    "MinimumLevel": {
      "Default": "Warning",
      "Override": {
        "DoorNotifier": "Information"
      }
    },
    "WriteTo": [
      {
        "Name": "Console"
      }
    ]
  }
}

Building

Via Command line

dotnet build
dotnet run --project DoorNotifier

Via Docker

In addition to the command below review ./publish.sh for creating container with version tag.

docker compose build
docker compose up -d

About

Monitor my garage door and tell me when I leave it open

Resources

License

Stars

Watchers

Forks

Packages

No packages published