From 91bb8e087d9f48948d198d4ab488bbf5ecb58acd Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Wed, 26 Feb 2025 20:02:03 -0600 Subject: [PATCH] home assistant test --- hosts/homeassistant/homeassistant.nix | 33 +++++++++++++++++---------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/hosts/homeassistant/homeassistant.nix b/hosts/homeassistant/homeassistant.nix index d501996..63baae9 100644 --- a/hosts/homeassistant/homeassistant.nix +++ b/hosts/homeassistant/homeassistant.nix @@ -117,7 +117,17 @@ in auth-header ]; # use postgresql instead of sqlite - extraPackages = ps: with ps; [ psycopg2 numpy hassil pyturbojpeg ]; + extraPackages = ps: with ps; [ + psycopg2 + numpy + hassil + pyturbojpeg + paho-mqtt + pychromecast + pyatv + python-otbr-api + brother + ]; config = { # Includes dependencies for a basic setup @@ -150,15 +160,14 @@ in auth_header = { debug = false; }; - - # Add MQTT integration - mqtt = { - discovery = true; - discovery_prefix = "homeassistant"; - broker = "localhost"; # Using local Mosquitto broker - port = mosquittoPort; - # If you set up MQTT with authentication, add username and password here - }; + + # MQTT with the new configuration format + mqtt = {}; # Enable the integration + + "mqtt:broker" = "localhost"; + "mqtt:port" = 1883; + "mqtt:discovery" = true; + "mqtt:discovery_prefix" = "homeassistant"; # https://www.home-assistant.io/integrations/ota_updater/ zha.zigpy_config.ota.z2m_remote_index = "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json"; @@ -199,7 +208,7 @@ in }; # Enable and configure Mosquitto MQTT broker - services.mosquitto = { + mosquitto = { enable = true; listeners = [ { @@ -229,7 +238,7 @@ in # MQTT configuration mqtt = { base_topic = "zigbee2mqtt"; - server = "mqtt://localhost:${mosquittoPort}"; + server = "mqtt://localhost:1883"; # If using authentication: # user = "mqttuser"; # password = "your-password";