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,22 +36,38 @@ in
gid = 421;
};
services.mosquitto.listeners = [{
address = "0.0.0.0";
port = 1883;
services.mosquitto.listeners = [
{
address = "0.0.0.0";
port = 1883;
users = {
weewx-proxy = {
hashedPasswordFile = config.age.secrets.mosquitto-password-weewx-proxy.path;
acl = [ "write weewx/+" ];
settings = {
protocol = "mqtt";
};
weewx = {
hashedPasswordFile = config.age.secrets.mosquitto-password-weewx.path;
acl = [ "read weewx/+" ];
users = {
weewx-proxy = {
hashedPasswordFile = config.age.secrets.mosquitto-password-weewx-proxy.path;
acl = [ "write weewx/+" ];
};
weewx = {
hashedPasswordFile = config.age.secrets.mosquitto-password-weewx.path;
acl = [ "read weewx/+" "write weather/+" ];
};
};
};
}];
}
{
address = "127.0.0.1";
port = 9883;
settings = {
protocol = "websockets";
};
acl = [ "topic read weather/+" ];
}
];
networking.firewall.interfaces =