fix(rpi4): set up deconz
This commit is contained in:
parent
2f33e6835a
commit
2a135612ab
4 changed files with 205 additions and 1 deletions
|
@ -1,9 +1,38 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
pydeconz = python3.pkgs.buildPythonPackage rec {
|
||||
pname = "pydeconz";
|
||||
version = "73";
|
||||
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "Lm7J0p2dp2gyesDpgN0WGpxPewC1z/IUy0CDEqofQGA=";
|
||||
};
|
||||
|
||||
propagateBuildInputs = with python3Packages; [ setuptools ];
|
||||
buildInputs = with python3Packages; [ aiohttp ];
|
||||
doCheck = false;
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ./deconz.nix ];
|
||||
|
||||
environment.systemPackages = with pkgs; [ deconz ];
|
||||
|
||||
local.services.deconz = {
|
||||
enable = true;
|
||||
httpPort = 8080;
|
||||
wsPort = 1443;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
package = home-assistant.override {
|
||||
extraPackages = ps: with ps; [ pydeconz ];
|
||||
};
|
||||
openFirewall = true;
|
||||
config = {
|
||||
homeassistant = {
|
||||
|
@ -28,6 +57,11 @@ with pkgs;
|
|||
mqtt_topic = "owntracks/#";
|
||||
secret = "!secret owntracks_secret";
|
||||
};
|
||||
deconz = {
|
||||
host = "localhost";
|
||||
port = 8080;
|
||||
api_key = "!secret deconz_apikey";
|
||||
};
|
||||
};
|
||||
# configWritable = true; # doesn't work atm
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue