New Add-on: Vantage Pro 2 MQTT (Deprecated)

Hi all,

This add-on is DEPRECATED and is replaced by an integration called Davis Vantage. See GitHub - MarcoGos/davis_vantage: Davis Vantage custom component integration for Home Assistant for futher information.

Couple of months ago I started the development of this add-on. I own a Davis Vantage Pro 2 weather station with a serial link and as far as I could see there wasn’t an easy way to connect this weather station to Home Assistant.
This add-on acquires data from a Davis Vantage weather station using the pyvantagepro software and publishes the information to a MQTT broker. Either use a serial port or use an ip address to connect to your device.

For more information see:

How to install?

Add my Addons Repository

How to setup?

Enter an IP address if your device has that option or choose a serial port by showing the unused optional configuration options.

3 Likes

Marcos, I am pushing a steep learning curve here. This is my first MQTT implementation. I just installed your add-on. I have my Vantage Pro 2 pushing data via a WifiLogger2. I see it’s IP data stream at the Home Assistant Add-on: Mosquitto broker, but the integration does not seem to be picking it up.

Integration Configuration
address: 192.168.9.127:1883 interval: 10 unit_system: Imperial new_sensor_used: false log_level: notice

Log from integration:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Traceback (most recent call last):
File “//./vantagepro2mqtt.py”, line 94, in
logger.debug(f"new_sensor_used = {new_sensor_used}")
NameError: name ‘new_sensor_used’ is not defined
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Broker Configuration:
Broker 192.168.9.127
Port 1883

Thoughts?

Hi Dan,

Please change the log level to ‘debug’ to provide some more info.
But I’m not sure the 3th party WifiLogger2 will be supported.

Marco - Thanks for the quick response.

I am not seeing a log level change option in the integration:

WRT to the 3d party hardware - it is built specifically for the Davis weather stations and can push wflexp.json via MQTT that I am receiving in the broker, so your integration gives me hope that perhaps I can capture the data for use in HA.

This is a screenshot of what the MQTT listener is recieving:

Hi Dan,

You can find the ‘Log Level’ in the Configuration tab of the add-on.

Thanks -
Log data:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[06:48:07] INFO: MQTT available, fetching server details …
[06:48:07] INFO: MQTT server settings not configured, trying to auto-discovering …
[06:48:07] DEBUG: Requested API resource: http://supervisor/services/mqtt
[06:48:07] DEBUG: Request method: GET
[06:48:07] DEBUG: Request data: {}
[06:48:07] DEBUG: API HTTP Response code: 200
[06:48:07] DEBUG: API Response: {“result”: “ok”, “data”: {“host”: “core-mosquitto”, “port”: 1883, “ssl”: false, “protocol”: “3.1.1”, “username”: “addons”, “password”: “*”, “addon”: “core_mosquitto”}}
[06:48:08] INFO: -d null -a 192.168.9.127:1883 -b core-mosquitto -P 1883 -u addons -p * -I homeassistant -s Imperial -i 10 -l debug
[2022-09-13 06:48:08] DEBUG: device = null
[2022-09-13 06:48:08] DEBUG: address = 192.168.9.127:1883
[2022-09-13 06:48:08] DEBUG: broker = core-mosquitto
[2022-09-13 06:48:08] DEBUG: port = 1883
[2022-09-13 06:48:08] DEBUG: mqtt_user = addons
[2022-09-13 06:48:08] DEBUG: mqtt_pass = *
[2022-09-13 06:48:08] DEBUG: discovery_prefix = homeassistant
[2022-09-13 06:48:08] DEBUG: unit_system = Imperial
[2022-09-13 06:48:08] DEBUG: interval = 10
[2022-09-13 06:48:08] DEBUG: log_level = debug
Traceback (most recent call last):
File “//./vantagepro2mqtt.py”, line 94, in
logger.debug(f"new_sensor_used = {new_sensor_used}")
NameError: name ‘new_sensor_used’ is not defined
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Hi Dan,

I found the problem and fixed it in version 1.0.4. Please update the add-on and try again.

PS. Don’t publish passwords on forums. The log you published contains passwords.

Thanks - Edited the entry and changed the passwords.

1.0.4 is not yet populated to HACS. Will do when available.

Updated to 1.0.4

Log Data:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[08:16:16] INFO: MQTT available, fetching server details …
[08:16:16] INFO: MQTT server settings not configured, trying to auto-discovering …
[08:16:16] DEBUG: Requested API resource: http://supervisor/services/mqtt
[08:16:16] DEBUG: Request method: GET
[08:16:16] DEBUG: Request data: {}
[08:16:16] DEBUG: API HTTP Response code: 200
[08:16:16] DEBUG: API Response: {“result”: “ok”, “data”: {“host”: “core-mosquitto”, “port”: 1883, “ssl”: false, “protocol”: “3.1.1”, “username”: “addons”, “password”: “*”, “addon”: “core_mosquitto”}}
[08:16:17] INFO: -d null -a 192.168.9.127:1883 -b core-mosquitto -P 1883 -u addons -p * -I homeassistant -s Imperial -i 30 -l debug
[2022-09-13 08:16:17] DEBUG: device = null
[2022-09-13 08:16:17] DEBUG: address = 192.168.9.127:1883
[2022-09-13 08:16:17] DEBUG: broker = core-mosquitto
[2022-09-13 08:16:17] DEBUG: port = 1883
[2022-09-13 08:16:17] DEBUG: mqtt_user = addons
[2022-09-13 08:16:17] DEBUG: mqtt_pass = *
[2022-09-13 08:16:17] DEBUG: discovery_prefix = homeassistant
[2022-09-13 08:16:17] DEBUG: unit_system = Imperial
[2022-09-13 08:16:17] DEBUG: interval = 30
[2022-09-13 08:16:17] DEBUG: log_level = debug
[2022-09-13 08:16:17] DEBUG: new_sensor_used = False
[2022-09-13 08:16:17] DEBUG: Added MQTT user and password
[2022-09-13 08:16:17] INFO: Acquiring data from serial:null:19200:8N1 using vproweather
[2022-09-13 08:16:17] ERROR: [Errno 2] could not open port null: [Errno 2] No such file or directory: 'null’
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Hi Dan,

Hopefully fixed that error as well in version 1.0.5.

1 Like

Awesome. It remains running and does not error out. Thanks.

Debug Log:
[12:28:36] INFO: MQTT available, fetching server details …
[12:28:36] INFO: MQTT server settings not configured, trying to auto-discovering …
[12:28:36] DEBUG: Requested API resource: http://supervisor/services/mqtt
[12:28:36] DEBUG: Request method: GET
[12:28:36] DEBUG: Request data: {}
[12:28:36] DEBUG: API HTTP Response code: 200
[12:28:36] DEBUG: API Response: {“result”: “ok”, “data”: {“host”: “core-mosquitto”, “port”: 1883, “ssl”: false, “protocol”: “3.1.1”, “username”: “addons”, “password”: “*”, “addon”: “core_mosquitto”}}
[12:28:37] INFO: -d null -a 192.168.9.127:1883 -b core-mosquitto -P 1883 -u addons -p * -I homeassistant -s Imperial -i 30 -l debug
[2022-09-13 12:28:38] DEBUG: device =
[2022-09-13 12:28:38] DEBUG: address = 192.168.9.127:1883
[2022-09-13 12:28:38] DEBUG: broker = core-mosquitto
[2022-09-13 12:28:38] DEBUG: port = 1883
[2022-09-13 12:28:38] DEBUG: mqtt_user = addons
[2022-09-13 12:28:38] DEBUG: mqtt_pass = *
[2022-09-13 12:28:38] DEBUG: discovery_prefix = homeassistant
[2022-09-13 12:28:38] DEBUG: unit_system = Imperial
[2022-09-13 12:28:38] DEBUG: interval = 30
[2022-09-13 12:28:38] DEBUG: log_level = debug
[2022-09-13 12:28:38] DEBUG: new_sensor_used = False
[2022-09-13 12:28:38] DEBUG: Added MQTT user and password
[2022-09-13 12:28:38] INFO: Acquiring data from tcp:192.168.9.127:1883 using vproweather
[2022-09-13 12:28:38] INFO: new was initialized
[2022-09-13 12:28:38] INFO: try wake up console
[2022-09-13 12:28:38] INFO: Write : <’\n’>


Developer Tools/States

`update.vantage_pro_to_mqtt_update
Vantage Pro to MQTT Update
off auto_update: true
installed_version: 1.0.5
in_progress: false
latest_version: 1.0.5
release_summary: # Changelog

1.0.0

  • Initial version

1.0.1

  • Added dew point calculation

1.0.2

  • Added address to configuration to use an ip link

1.0.3

  • Now using docker hub image

1.0.4

  • Changed name of device to Davis Weather Station.

1.0.5

release_url: null
skipped_version: null
title: Vantage Pro to MQTT
entity_picture: /api/hassio/addons/030ceba9_vantagepro2mqtt/icon
friendly_name: Vantage Pro to MQTT Update
supported_features: 25`

Should I see an integration popup?

If the add~on can read data from the given address like reading a serial port, it will publish info to mqtt which home assistant will turn into a device with a couple of entities. If the given address will not produce the same type of information vproweather needs, no publish can be done and no mqtt device will be created. At that point you’re out of luck.

Thanks so much.

Hi Marco,

Thank You so much for bringing my Vantage Pro 2 to life in HA! I have also struggled quite some time with getting my weather data into HA, and now it was easy. Even for me :blush:. (Although I had to struggle a little bit extra with MQTT which also was new to me)

One question tough: Is it possible to display the wind speed in m/s instead of km/h? At least here in Sweden we’re more comfortable with m/s.

Hi Raven,

Good to see you managed to hook up your vantage pro to HA.

You could create a template sensor which calculates/converts a m/s value based on the km/h value.

Vantage Vue weatherstation with Weatherlink IP
Awesome! Thanks Marco. Just finding my way round home assistant and was expecting my weather station to be a problem cos it’s elderly in technology terms. But I used your add-on and bingo, I have the weather station sensors!

Thanks for the info. Glad to see it’s working for you as well.

Does this have to be on the same network?

Well, I’m don’t know. The Home Assistant server needs to be able to contact that network.

I have the add on started in the add ons page, now what do I do to get the integration or pull data?