30 lines
1.3 KiB
PHP
30 lines
1.3 KiB
PHP
<?php
|
|
|
|
return [
|
|
/*
|
|
|----------------------------------------------------------------------
|
|
| Device MQTT onboarding (Shelly)
|
|
|----------------------------------------------------------------------
|
|
| Home-Assistant-style: every Shelly signs in with ONE shared account and
|
|
| is created automatically on its first message. These values are shown to
|
|
| the user under Settings → Geräte-MQTT so they can enter them into a device.
|
|
*/
|
|
'mqtt' => [
|
|
// Address the DEVICES connect to = this server's LAN IP:port (not the internal
|
|
// `mosquitto` hostname). Empty → the settings screen shows a hint instead.
|
|
'device_host' => env('MQTT_DEVICE_HOST'),
|
|
|
|
// The shared device account. Username is fixed (matches the `shelly` ACL block).
|
|
'device_username' => 'shelly',
|
|
'device_password' => env('MQTT_SHELLY_PASSWORD'),
|
|
'port' => (int) env('MQTT_PORT', 1883),
|
|
|
|
// Auto-create a device the first time an unknown prefix publishes a real component.
|
|
'auto_onboard' => (bool) env('MQTT_AUTO_ONBOARD', true),
|
|
|
|
// Hard cap on total devices, so a flood of distinct prefixes on the shared account can't
|
|
// exhaust the DB via auto-onboarding. 0 disables the cap.
|
|
'max_devices' => (int) env('MQTT_MAX_DEVICES', 250),
|
|
],
|
|
];
|