1
0
Fork 0

weewx: Publish MQTT

This commit is contained in:
Daniel Kempkens 2023-03-25 00:06:34 +01:00
parent 83f75e5658
commit e287ef8e28
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
2 changed files with 28 additions and 12 deletions

View file

@ -36,10 +36,15 @@ in
gid = 421; gid = 421;
}; };
services.mosquitto.listeners = [{ services.mosquitto.listeners = [
{
address = "0.0.0.0"; address = "0.0.0.0";
port = 1883; port = 1883;
settings = {
protocol = "mqtt";
};
users = { users = {
weewx-proxy = { weewx-proxy = {
hashedPasswordFile = config.age.secrets.mosquitto-password-weewx-proxy.path; hashedPasswordFile = config.age.secrets.mosquitto-password-weewx-proxy.path;
@ -48,10 +53,21 @@ in
weewx = { weewx = {
hashedPasswordFile = config.age.secrets.mosquitto-password-weewx.path; hashedPasswordFile = config.age.secrets.mosquitto-password-weewx.path;
acl = [ "read weewx/+" ]; acl = [ "read weewx/+" "write weather/+" ];
}; };
}; };
}]; }
{
address = "127.0.0.1";
port = 9883;
settings = {
protocol = "websockets";
};
acl = [ "topic read weather/+" ];
}
];
networking.firewall.interfaces = networking.firewall.interfaces =