weewx-proxy/config/runtime.exs
Daniel Kempkens 42edf668a4
All checks were successful
Build / build (push) Successful in 4m23s
feat(mqtt): re-publish in a way home-assistant understands better
2024-08-09 17:16:22 +02:00

17 lines
1.2 KiB
Elixir

import Config
config :weewx_proxy,
mqtt_weewx_host: elem(:inet.parse_address(to_charlist(System.fetch_env!("WEEWX_PROXY_MQTT_WEEWX_HOST"))), 1),
mqtt_weewx_port: elem(Integer.parse(System.get_env("WEEWX_PROXY_MQTT_WEEWX_PORT", "1883")), 0),
mqtt_weewx_user: System.fetch_env!("WEEWX_PROXY_MQTT_WEEWX_USER"),
mqtt_weewx_password: System.fetch_env!("WEEWX_PROXY_MQTT_WEEWX_PASSWORD"),
mqtt_weewx_client_id: String.to_atom("Elixir." <> System.get_env("WEEWX_PROXY_MQTT_WEEWX_CLIENT_ID", "WeewxBroker")),
mqtt_local_host: elem(:inet.parse_address(to_charlist(System.fetch_env!("WEEWX_PROXY_MQTT_LOCAL_HOST"))), 1),
mqtt_local_port: elem(Integer.parse(System.get_env("WEEWX_PROXY_MQTT_LOCAL_PORT", "1883")), 0),
mqtt_local_user: System.fetch_env!("WEEWX_PROXY_MQTT_LOCAL_USER"),
mqtt_local_password: System.fetch_env!("WEEWX_PROXY_MQTT_LOCAL_PASSWORD"),
mqtt_sdr_client_id: String.to_atom("Elixir." <> System.get_env("WEEWX_PROXY_MQTT_SDR_CLIENT_ID", "SdrIngestLocal")),
mqtt_modbus_client_id:
String.to_atom("Elixir." <> System.get_env("WEEWX_PROXY_MQTT_MODBUS_CLIENT_ID", "ModbusIngestLocal")),
purpleair_url: System.fetch_env!("WEEWX_PROXY_PURPLEAIR_URL")