mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-18 10:47:31 -08:00
initial setup of HA with christmas lights
This commit is contained in:
parent
c73e8a5e94
commit
15f0b0e9b0
@ -8,6 +8,7 @@
|
|||||||
./obsidian-vault.nix
|
./obsidian-vault.nix
|
||||||
./share.nix
|
./share.nix
|
||||||
./rss.nix
|
./rss.nix
|
||||||
|
./home-assistant
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
@ -117,8 +118,8 @@
|
|||||||
"rss.tstarr.us" = (SSL // {
|
"rss.tstarr.us" = (SSL // {
|
||||||
locations."/".proxyPass = "http://localhost:8081/";
|
locations."/".proxyPass = "http://localhost:8081/";
|
||||||
});
|
});
|
||||||
"rss1.tstarr.us" = (SSL // {
|
"home.tstarr.us" = (SSL // {
|
||||||
locations."/".proxyPass = "http://localhost:8087/";
|
locations."/".proxyPass = "http://localhost:8123/";
|
||||||
});
|
});
|
||||||
"media.tstarr.us" = (SSL // {
|
"media.tstarr.us" = (SSL // {
|
||||||
locations."/".proxyPass = "http://localhost:8096/";
|
locations."/".proxyPass = "http://localhost:8096/";
|
||||||
|
50
provision/hosts/torus/home-assistant/automations.nix
Normal file
50
provision/hosts/torus/home-assistant/automations.nix
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
{
|
||||||
|
services.home-assistant.config = {
|
||||||
|
"automation manual" = [
|
||||||
|
{
|
||||||
|
alias = "turn on christmas lights";
|
||||||
|
trigger = {
|
||||||
|
platform = "time";
|
||||||
|
at = "16:45";
|
||||||
|
};
|
||||||
|
action = [
|
||||||
|
{
|
||||||
|
type = "turn_on";
|
||||||
|
device_id = "32bf8baf1214391472566d4300c7d6fb";
|
||||||
|
entity_id = "72c7694c3a3aed5d67499bfe0574346b";
|
||||||
|
domain = "switch";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "turn_on";
|
||||||
|
device_id = "08db6bd9e7bf98d5bf1b08351b909c94";
|
||||||
|
entity_id = "ecec82df2265c6b92c8474fe0c9fde6b";
|
||||||
|
domain = "switch";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
alias = "turn off christmas lights";
|
||||||
|
trigger = {
|
||||||
|
platform = "time";
|
||||||
|
at = "23:59";
|
||||||
|
};
|
||||||
|
action = [
|
||||||
|
{
|
||||||
|
type = "turn_off";
|
||||||
|
device_id = "32bf8baf1214391472566d4300c7d6fb";
|
||||||
|
entity_id = "72c7694c3a3aed5d67499bfe0574346b";
|
||||||
|
domain = "switch";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "turn_off";
|
||||||
|
device_id = "08db6bd9e7bf98d5bf1b08351b909c94";
|
||||||
|
entity_id = "ecec82df2265c6b92c8474fe0c9fde6b";
|
||||||
|
domain = "switch";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
"automation ui" = "!include automations.yaml";
|
||||||
|
};
|
||||||
|
}
|
26
provision/hosts/torus/home-assistant/default.nix
Normal file
26
provision/hosts/torus/home-assistant/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./mqtt.nix
|
||||||
|
./automations.nix
|
||||||
|
];
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8123 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 8123 ];
|
||||||
|
|
||||||
|
services.home-assistant = {
|
||||||
|
enable = true;
|
||||||
|
extraComponents = [
|
||||||
|
# Components required to complete the onboarding
|
||||||
|
"esphome"
|
||||||
|
"met"
|
||||||
|
"radio_browser"
|
||||||
|
"tasmota"
|
||||||
|
];
|
||||||
|
config = {
|
||||||
|
# Includes dependencies for a basic setup
|
||||||
|
# https://www.home-assistant.io/integrations/default_config/
|
||||||
|
default_config = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
15
provision/hosts/torus/home-assistant/mqtt.nix
Normal file
15
provision/hosts/torus/home-assistant/mqtt.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [ 1883 ];
|
||||||
|
services.home-assistant.config.mqtt = { };
|
||||||
|
|
||||||
|
services.mosquitto = {
|
||||||
|
enable = true;
|
||||||
|
listeners = [{
|
||||||
|
users.tstarr = {
|
||||||
|
acl = [ "readwrite #" ];
|
||||||
|
hashedPassword = "$7$101$fWS64zbpdeUWd8fA$A31ESjDqooTB9BTYA9dvdU20Cwpxc3wmXfm7QLEJYZzd+UkbCVG1Ic7VsD9BBghka0WQZgkQczzag/t09BZ+5w==";
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
}
|
1
resources/tasmota/amysen_config
Normal file
1
resources/tasmota/amysen_config
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"NAME":"Amysen JSMWF02","GPIO":[0,17,0,0,0,0,0,0,0,56,21,0,0],"FLAG":0,"BASE":18}
|
Loading…
x
Reference in New Issue
Block a user