openhab setup
This commit is contained in:
@@ -7,9 +7,9 @@ in {
|
||||
sops = false;
|
||||
db = false;
|
||||
paths = [
|
||||
{ path="${serverCfg.configPath}/openhab/conf"; owner="9001:9001"; mode = "0755"; }
|
||||
{ path="${serverCfg.configPath}/openhab/userdata"; owner="9001:9001"; mode = "0755"; }
|
||||
{ path="${serverCfg.configPath}/openhab/addons"; owner="9001:9001"; mode = "0755"; }
|
||||
{ path="${serverCfg.configPath}/openhab/conf"; owner="1000:1000"; mode = "0755"; }
|
||||
{ path="${serverCfg.configPath}/openhab/userdata"; owner="1000:1000"; mode = "0755"; }
|
||||
{ path="${serverCfg.configPath}/openhab/addons"; owner="1000:1000"; mode = "0755"; }
|
||||
];
|
||||
|
||||
containers = {
|
||||
@@ -18,9 +18,9 @@ in {
|
||||
image = "openhab/openhab:${version}";
|
||||
port = 8080;
|
||||
extraEnv = {
|
||||
# USER_ID = "1000";
|
||||
# GROUP_ID = "1000";
|
||||
# CRYPTO_POLICY = "unlimited";
|
||||
USER_ID = "1000";
|
||||
GROUP_ID = "1000";
|
||||
CRYPTO_POLICY = "unlimited";
|
||||
OPENHAB_HTTP_PORT = "8080";
|
||||
};
|
||||
extraOptions = [
|
||||
@@ -38,21 +38,36 @@ in {
|
||||
|
||||
setup = {
|
||||
trigger = "server";
|
||||
envFile = [ config.sops.secrets."CUSTOM".path ];
|
||||
script = pkgs.writeShellScript "setup" ''
|
||||
# Pre-generate openHAB directories on the host
|
||||
OHAB="${pkgs.podman}/bin/podman --events-backend=none exec openhab-server /openhab/runtime/bin/client -u openhab -p habopen"
|
||||
sleep 20
|
||||
exit 0
|
||||
$OHAB openhab:users add $DEFAULT_ADMIN_USERNAME $DEFAULT_ADMIN_PASSWORD administrator
|
||||
$OHAB feature:list
|
||||
#TODO: Install DB (influx, mapdb,...)
|
||||
#TODO: Install! telegram, matter, mqtt, bluetooth, chromecast, PublicTransportSwitzerland, zigbee, OpenMeteoWeatherForecast
|
||||
$OHAB openhab:addons install persistance-mapdb
|
||||
$OHAB openhab:addons install persistance-influxdb
|
||||
|
||||
$OHAB openhab:addons install ui-basic
|
||||
$OHAB openhab:addons install automation-jsscripting
|
||||
|
||||
$OHAB openhab:addons install binding-telegram
|
||||
$OHAB openhab:addons install binding-matter
|
||||
$OHAB openhab:addons install binding-mqtt
|
||||
$OHAB openhab:addons install binding-bluetooth
|
||||
$OHAB openhab:addons install binding-zigbee
|
||||
$OHAB openhab:addons install binding-chromecast
|
||||
$OHAB openhab:addons install binding-astro
|
||||
$OHAB openhab:addons install binding-meteoblue
|
||||
$OHAB openhab:addons install binding-publictransportswitzerland
|
||||
|
||||
#IF APPLE DEVICE: HomeKit (siri/apple bridge)
|
||||
#IF UBIQUITY NET: Unifi + UnifiProtect (net/cam bridge)
|
||||
#IF YAMAHA+EPSON: EpsonProjector + Yamaha (projector and sound)
|
||||
#IF BAMBULAB DEVICE: BambuLab (notify print state)
|
||||
#IF GARDENA DEVICE: Gardena (smart watering)
|
||||
#IF AndroidTV/Jellyfin: Bind with lights + more
|
||||
#Extra: AndroidTV/Jellyfin (Bind with lights + more)
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user