briis / hass-weatherflow2mqtt

WeatherFlow to MQTT for Home Assistant. Use UDP to get local weather data in to Home Assistant using MQTT Discovery
MIT License
129 stars 29 forks source link

Device Discovery not working with a Tempest station #199

Closed myMartek closed 1 year ago

myMartek commented 1 year ago

Home Assistant Version?

20221213.1

Add-On or Self Hosted?

Self managed Container

Weatherflow2MQTT version?

3.1.3

What happened?

I tried to setup your MQTT bridge as docker container.

As far as I can tell it is working in general, but I cannot see any devices in Homeassistant even after waiting a few hours.

As far as I can tell there a no /config event emitted. When I subscribe to homeassistant/# on my MQTT Broker I can see a few homeassistant/sensor/weatherflow2mqtt/weather/attributes messages but no /config

Am I doing something wrong or how can I trigger the /config events?

Relevant log output

No response

myMartek commented 1 year ago

I guess it has something to do with my network configuration. As far as I understand is that the UDP signals are not arriving.

I am running the container on a NAS with multiple network cards. The primary connection is on the same VLAN as the WeatherFlow Bridge. I tried to start the container as following:

docker run -d \
--name=Weatherflow2mqtt --restart=unless-stopped \
-v /volume1/docker/weatherflow:/data \
-p 10.0.20.10:50222:50222/udp \
-e TZ=Europe/Berlin \
-e UNIT_SYSTEM=metric \
-e LANGUAGE=de \
-e RAPID_WIND_INTERVAL=0 \
-e DEBUG=False \
-e ELEVATION=215 \
-e LATITUDE=<lat> \
-e LONGITUDE=<lng> \
-e ZAMBRETTI_MIN_PRESSURE=960 \
-e ZAMBRETTI_MAX_PRESSURE=1060 \
-e WF_HOST=0.0.0.0 \
-e WF_PORT=50222 \
-e MQTT_HOST=10.0.20.10 \
-e MQTT_PORT=1883 \
-e MQTT_USERNAME=<user> \
-e MQTT_PASSWORD=<pass> \
-e MQTT_DEBUG=False \
-e STATION_ID=<id> \
-e STATION_TOKEN=<token> \
-e FORECAST_INTERVAL=30 \
briis/weatherflow2mqtt:latest

I replaced some parameters with but of cause they are set differently

myMartek commented 1 year ago

Okay Fixes it myself. The trick was to really use -p 0.0.0.0:50222:5222/udp

I used the IP Adress of the network card I wanted to enforce instead of the general one but that does not work as expected.

Now the UDP packages are coming in.