homeos/routes/console.php

25 lines
1.1 KiB
PHP

<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schedule;
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');
// Presence sweep — "home" immediately on association, "away" after a debounce (in the command).
Schedule::command('presence:poll')->everyMinute()->withoutOverlapping();
// Metrics sample for the charts (MQTT throughput + host CPU/memory).
Schedule::command('metrics:sample')->everyMinute()->withoutOverlapping();
// Time-triggered automations (state-change ones fire off the DeviceStateChanged listener).
Schedule::command('automations:tick')->everyMinute()->withoutOverlapping();
// Poll local (HTTP) Shelly devices for near-live status (MQTT devices push instead).
Schedule::command('shelly:poll')->everyTenSeconds()->withoutOverlapping();
// E-mail alerts (device offline, low battery) — only acts if the SMTP add-on is set up.
Schedule::command('notifications:sweep')->everyFiveMinutes()->withoutOverlapping();