weewx: Publish MQTT
This commit is contained in:
parent
83f75e5658
commit
e287ef8e28
2 changed files with 28 additions and 12 deletions
|
@ -36,22 +36,38 @@ in
|
||||||
gid = 421;
|
gid = 421;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.mosquitto.listeners = [{
|
services.mosquitto.listeners = [
|
||||||
address = "0.0.0.0";
|
{
|
||||||
port = 1883;
|
address = "0.0.0.0";
|
||||||
|
port = 1883;
|
||||||
|
|
||||||
users = {
|
settings = {
|
||||||
weewx-proxy = {
|
protocol = "mqtt";
|
||||||
hashedPasswordFile = config.age.secrets.mosquitto-password-weewx-proxy.path;
|
|
||||||
acl = [ "write weewx/+" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
weewx = {
|
users = {
|
||||||
hashedPasswordFile = config.age.secrets.mosquitto-password-weewx.path;
|
weewx-proxy = {
|
||||||
acl = [ "read weewx/+" ];
|
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 =
|
networking.firewall.interfaces =
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue