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

No, I do read out the console with Virtual Weather Station through port 22222, based on the MAC adress. This has been working flawlessly for over 5 years. The sample rate is every 1.0 seconds as it rapid-fires into WeatherUnderground.

You cannot have 2 app simultaneously readout the Vantage Pro especially when you’re using such a high sample rate. You have to lower the sample rate. The VantagePro2MQTT has no chance to get connected to the Vantage Pro. Next to that you have to make sure the Virtual Weather Station needs to disconnect after every sample.

I changed both sample rates to 30 seconds, however, it seems the VWS software is not closing the connection after reading the data. So, will investigate further.

Edit: Closing the VWS software solved the problem, now the weather station is feeding HA perfectly. Thanks for the help.

The integration is really fun to play with. I do have a question though: It seems the value for the UV sensor seems to run from 0 to 40 (the last few days), which should (Netherlands) go from 0 to 4 as it is reported on the screen of the Vantage Pro.

Is this a correct readout? Or should it be divided by 10?

I don’t own a UV sensor myself so I have no idea. I will check if I can find any information on that subject. So you say the display shows 4 and the value gotten from the add-on is 40?

And do you see a floating point value (3.9) on the display or is it an integer (4) ?

I see an integer in the integration and a floating point on the screen.
E.g. now: the screen indicates 0.7, while the integration indicates 7 as a value.
Looking in the history of the value in HA, it always seems to be an integer. This makes sense as the Vantage reports 1 decimal and the value seems to be a factor 10 too high.

Thank you for the quick update!

Could it be that the value in MQTT has remained as an integer. What I mean:
The screen of the Vantage reports an UV index of 1.1. The integration reports this as 1. When I change the decimals in the entity, it is presented as 1.0 instead of 1.1.
Similar the other way. A screen value as 0.8 is presented as 1, and with extra decimals as 1.0.

I assumed the UV index (as anywhere else on the internet) was an integer so I implemented it as an integer. I just release a newer version of vantagepro2mqtt with the UV index as a float point value.

You’re amazing, thank you for implementing this so quickly.

Finally we have some sunshine :wink: It works perfectly now.

Almost afraid to ask as the integration is already so nice:

I know that my Vantage screen also reports the ‘Wind Gust’ value, is there a way to add that to the configuration?

Thanks

Unfortunately the used pyvantagepro library doesn’t provide that information.

1 Like

Edit: I see via Very High Temp Reading ¡ Issue #24 ¡ MarcoGos/ha-addons ¡ GitHub that this add-on is deprecated and replaced with GitHub - MarcoGos/davis_vantage: Davis Vantage custom component integration for Home Assistant.

I created a pull request to apply your pyvantagepro fix from your new solution to this older docker solution. I know you mentioned this solution is deprecated, but the docker solution works great for some so here it is for your consideration.

Today the outside temperature dropped below zero and there seems to be a problem as the integration is reading the temp as a massive number. Its currently -9 F outside and the integration is reporting 6544.5 F.

My station is a Vantage Vue connected via a WeatherLink IP in a Davis Vantage Pro 2 Weather Envoy.

Hey!

Thank you very much for the integration!

I have a Vantage Pro 2 connected to an RPI. On the RPI i am running ser2net. This forwards the Vantage Pro 2 Serial port to a TCP Port. In my case :22222.

So far all my attempts to connect this integration to this port failed. I do use some other Homeautomation software that works this way (yeah, i disabled it to avoid multiple connections).

Should this setup be possible in general or is this something totally not considered to be done?

Thx in advance,
Tom

You could try to use the python pyvantage tool to see if you can connect to that port. Or vproweather on a Linux based system to check if you can make a connection.

Specially if you tried to connect several times with the vantage pro integration.

thank you! i will give those a try and report back.

thanks for the tip. investigating further turned out to be a configuration issue with ser2net.
sending the ser2net banner on connection was what irritated the integration. disabled the banner and it worked instantly.

thank you for the great integration once again.

Hi Marco,

Installing a new Davis Vantage Pro 2 that is using the new Davis 6313 console. I am having difficulty connecting to vantagepro2mqtt. Log is showing the MQTT broker connecting to HA but the connection to the console is being refused on at the assigned IP address and port assignment of 22222. I’ve attached a log file, any ideas on what might be wrong? Do you know if any others are successfully using the Davis 6313 with vantagepro2mqtt? Regards, Richard

Vantage Pro to MQTT
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
[15:30:55] INFO: MQTT available, fetching server details …
[15:30:55] INFO: MQTT server settings not configured, trying to auto-discovering …
[15:30:56] DEBUG: Requested API resource: http://supervisor/services/mqtt
[15:30:56] DEBUG: Request method: GET
[15:30:56] DEBUG: Request data: {}
[15:30:56] DEBUG: API HTTP Response code: 200
[15:30:56] DEBUG: API Response: {“result”: “ok”, “data”: {“host”: “core-mosquitto”, “port”: 1883, “ssl”: false, “protocol”: “3.1.1”, “username”: “addons”, “password”: “****”, “addon”: “core_mosquitto”}}

[15:30:56] INFO: -d null -a 192.168.1.62:22222 -b core-mosquitto -P 1883 -u addons -p ****** -I homeassistant -s Imperial -i 30 -l debug
[2024-01-28 15:30:56] DEBUG: device =
[2024-01-28 15:30:56] DEBUG: address = 192.168.1.62:22222
[2024-01-28 15:30:56] DEBUG: broker = core-mosquitto
[2024-01-28 15:30:56] DEBUG: port = 1883
[2024-01-28 15:30:56] DEBUG: mqtt_user = addons
[2024-01-28 15:30:56] DEBUG: mqtt_pass = *****
[2024-01-28 15:30:56] DEBUG: discovery_prefix = homeassistant
[2024-01-28 15:30:56] DEBUG: unit_system = Imperial
[2024-01-28 15:30:56] DEBUG: interval = 30
[2024-01-28 15:30:56] DEBUG: log_level = debug
[2024-01-28 15:30:56] DEBUG: new_sensor_used = False
[2024-01-28 15:30:56] DEBUG: alt_windspeed_uom = False
[2024-01-28 15:30:56] DEBUG: Added MQTT user and password
[2024-01-28 15:30:56] INFO: Connecting to MQTT broker
[2024-01-28 15:30:56] INFO: Connecting to weather station
Traceback (most recent call last):
File “//./vantagepro2mqtt.py”, line 233, in
vantagepro2 = VantagePro2.from_url(link) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/pyvantagepro/device.py”, line 80, in from_url
return cls(link)
^^^^^^^^^
File “/usr/lib/python3.11/site-packages/pyvantagepro/device.py”, line 68, in init
self.link.open()
File “/usr/lib/python3.11/site-packages/pylink/link.py”, line 90, in open
self._socket.connect(self.address)
ConnectionRefusedError: [Errno 111] Connection refused
[2024-01-28 15:30:56] INFO: Close connection
[2024-01-28 15:30:57] INFO: Connection was closed
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

I don’t think the new console will work together with the add-on nor the integration.

Thanks for the reply. Trying a different setup. Now using a Davis Envoy8x with USB. Looks like vantagepro2mqtt is connecting and initially getting correct responses until it hits the first “LOOP 1”. Maybe I have an incorrect setting? I do see that the Envoy is supported. Is the Envoy8x also supported? I’ve attached a log file.

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
[15:55:51] INFO: MQTT available, fetching server details ...
[15:55:51] INFO: MQTT server settings not configured, trying to auto-discovering ...
[15:55:51] DEBUG: Requested API resource: http://supervisor/services/mqtt
[15:55:51] DEBUG: Request method: GET
[15:55:51] DEBUG: Request data: {}
[15:55:51] DEBUG: API HTTP Response code: 200
[15:55:51] DEBUG: API Response: {"result": "ok", "data": {"host": "core-mosquitto", "port": 1883, "ssl": false, "protocol": "3.1.1", "username": "addons", "password": "************", "addon": "core_mosquitto"}}

[15:55:52] INFO:  -d /dev/ttyUSB1 -b core-mosquitto -P 1883 -u addons -p ********* -I homeassistant -s Imperial -i 10 -l debug
[2024-01-30 15:55:52] DEBUG: device = /dev/ttyUSB1
[2024-01-30 15:55:52] DEBUG: address = 
[2024-01-30 15:55:52] DEBUG: broker = core-mosquitto
[2024-01-30 15:55:52] DEBUG: port = 1883
[2024-01-30 15:55:52] DEBUG: mqtt_user = addons
[2024-01-30 15:55:52] DEBUG: mqtt_pass = **********
[2024-01-30 15:55:52] DEBUG: discovery_prefix = homeassistant
[2024-01-30 15:55:52] DEBUG: unit_system = Imperial
[2024-01-30 15:55:52] DEBUG: interval = 10
[2024-01-30 15:55:52] DEBUG: log_level = debug
[2024-01-30 15:55:52] DEBUG: new_sensor_used = False
[2024-01-30 15:55:52] DEBUG: alt_windspeed_uom = False
[2024-01-30 15:55:52] DEBUG: Added MQTT user and password
[2024-01-30 15:55:52] INFO: Connecting to MQTT broker
[2024-01-30 15:55:52] INFO: Connecting to weather station
[2024-01-30 15:55:52] INFO: new <SerialLink serial:/dev/ttyUSB1:19200:8N1> was initialized
[2024-01-30 15:55:52] INFO: try wake up console
[2024-01-30 15:55:52] INFO: Write : <'\n'>
[2024-01-30 15:55:52] INFO: Read : <'\n\r'>
[2024-01-30 15:55:52] INFO: Check ACK: OK ('\n\r')
[2024-01-30 15:55:52] INFO: try send : VER
[2024-01-30 15:55:52] INFO: Write : <'VER\n'>
[2024-01-30 15:55:52] INFO: Read : <'\n\rOK\n\r'>
[2024-01-30 15:55:52] INFO: Check ACK: OK ('\n\rOK\n\r')
[2024-01-30 15:55:52] INFO: Read : <'Jul  1 2013\n\r'>
[2024-01-30 15:55:52] INFO: Set weather station time to system time
[2024-01-30 15:55:52] INFO: try wake up console
[2024-01-30 15:55:52] INFO: Write : <'\n'>
[2024-01-30 15:55:52] INFO: Read : <'\n\r'>
[2024-01-30 15:55:52] INFO: Check ACK: OK ('\n\r')
[2024-01-30 15:55:52] INFO: try send : SETTIME
[2024-01-30 15:55:52] INFO: Write : <'SETTIME\n'>
[2024-01-30 15:55:52] INFO: Read : <'\x06'>
[2024-01-30 15:55:52] INFO: Check ACK: OK ('\x06')
[2024-01-30 15:55:52] INFO: try send : 34 37 0F 1E 01 7C 42 B1
[2024-01-30 15:55:52] INFO: Write : <34 37 0F 1E 01 7C 42 B1>
[2024-01-30 15:55:52] INFO: Read : <'\x06'>
[2024-01-30 15:55:52] INFO: Check ACK: OK ('\x06')
[2024-01-30 15:55:52] INFO: Acquiring data from serial:/dev/ttyUSB1:19200:8N1 using vproweather
[2024-01-30 15:55:52] INFO: try wake up console
[2024-01-30 15:55:52] INFO: Write : <'\n'>
[2024-01-30 15:55:53] INFO: Read : <'\n\r'>
[2024-01-30 15:55:53] INFO: Check ACK: OK ('\n\r')
[2024-01-30 15:55:53] INFO: try send : LOOP 1
[2024-01-30 15:55:53] INFO: Write : <'LOOP 1\n'>
[2024-01-30 15:55:53] INFO: Read : <'\n'>
[2024-01-30 15:55:53] ERROR: Check ACK: BAD ('\x06' != '\n')
[2024-01-30 15:55:54] INFO: try send : LOOP 1
[2024-01-30 15:55:54] INFO: Write : <'LOOP 1\n'>
[2024-01-30 15:55:54] INFO: Read : <'\r'>
[2024-01-30 15:55:54] ERROR: Check ACK: BAD ('\x06' != '\r')
[2024-01-30 15:55:54] INFO: try send : LOOP 1
[2024-01-30 15:55:54] INFO: Write : <'LOOP 1\n'>
[2024-01-30 15:55:54] INFO: Read : <'\n'>
[2024-01-30 15:55:54] ERROR: Check ACK: BAD ('\x06' != '\n')
[2024-01-30 15:55:54] WARNING: Couldn't acquire data from serial:/dev/ttyUSB1:19200:8N1
[2024-01-30 15:55:54] INFO: Connection <SerialLink serial:/dev/ttyUSB1:19200:8N1> was closed
[2024-01-30 15:55:54] INFO: Now waiting for 10 seconds for next cycle
[2024-01-30 15:56:04] INFO: new <SerialLink serial:/dev/ttyUSB1:19200:8N1> was initialized
[2024-01-30 15:56:04] INFO: Acquiring data from serial:/dev/ttyUSB1:19200:8N1 using vproweather
[2024-01-30 15:56:04] INFO: try wake up console
[2024-01-30 15:56:04] INFO: Write : <'\n'>
[2024-01-30 15:56:04] INFO: Read : <'\n\r'>
[2024-01-30 15:56:04] INFO: Check ACK: OK ('\n\r')
[2024-01-30 15:56:04] INFO: try send : LOOP 1
[2024-01-30 15:56:04] INFO: Write : <'LOOP 1\n'>
[2024-01-30 15:56:05] INFO: Read : <'\n'>
[2024-01-30 15:56:05] ERROR: Check ACK: BAD ('\x06' != '\n')
[2024-01-30 15:56:05] INFO: try send : LOOP 1
[2024-01-30 15:56:05] INFO: Write : <'LOOP 1\n'>
[2024-01-30 15:56:05] INFO: Read : <'\r'>
[2024-01-30 15:56:05] ERROR: Check ACK: BAD ('\x06' != '\r')
[2024-01-30 15:56:06] INFO: try send : LOOP 1
[2024-01-30 15:56:06] INFO: Write : <'LOOP 1\n'>
[2024-01-30 15:56:06] INFO: Read : <'\n'>
[2024-01-30 15:56:06] ERROR: Check ACK: BAD ('\x06' != '\n')
[2024-01-30 15:56:06] WARNING: Couldn't acquire data from serial:/dev/ttyUSB1:19200:8N1
[2024-01-30 15:56:06] INFO: Connection <SerialLink serial:/dev/ttyUSB1:19200:8N1> was closed
[2024-01-30 15:56:06] INFO: Now waiting for 10 seconds for next cycle

I don’t own a Envoy8x myself, so I’ve no experience with this device.

After some investigation, it appears the Envoy8x may be using the same protocol as my Vantage Pro2 console. The difference is that the Envoy8x, since it supports up to 8 ISS stations, is using a modified command. This command is in the place of the “LOOP” command and is “LOOPCH n” (where n = 0,1,2-7). N is the ISS assignment in the Envoy8x, thus data from up to 8 stations can be received.
My thought is that if a configuration switch could be added to vantagepro2mqtt to enable Envoy8x support and 8 channel enable switches could also be added, vantagepro2mqtt could substitute the “LOOPCH n” command for the “LOOP” command if the Envoy8x switch was enabled and the “n” would be picked up from the switch or switches enabled for channels (one for each of the 8 ISS stations). The Envoy8x support switch when off would also preserve all existing support in vantagepro2mqtt when not using an Envoy8x.
In my initial setup, I have just one ISS configured on my Envoy8x and it is assigned to channel 0. When I issue a “LOOPCH 0” from a terminal emulator through a USB connection to the Envoy8x, I receive a data packet that looks very similar to my console data packet. I can even identify many of the ISS data values. (Not sure about the CRC, cannot calculate that easily). Same works when I assign my ISS to channel 2 in the Envoy8x and issue a “LOOPCH 2” command.
I’d be willing to try a version of vantagepro2mqtt and provide feedback if support could eventually be added for the Envoy8x.

Best Regards, --Richard