weewx: Publish MQTT
This commit is contained in:
parent
83f75e5658
commit
e287ef8e28
2 changed files with 28 additions and 12 deletions
|
@ -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 =
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue