peterzen / hass-pws-mqtt-addon

Addon to pull WH2600 weather station data into Home Assistant via MQTT.
Apache License 2.0
1 stars 0 forks source link

env var #29

Closed nrc04 closed 2 months ago

nrc04 commented 7 months ago

Hello,

Have new problem, do not understand : 2024/01/08 19:56:30 PWS_IP env var undefined

I had uninstall it and try many time no changes.

thanks regards

peterzen commented 7 months ago

Hi, can you please confirm which addon version is running on your HA?

wilburne commented 7 months ago

version de l'addon : 0.1.23

peterzen commented 7 months ago

Right, I see the problem now. Can you please downgrade to 0.1.22?

Apologies for the problem!

wilburne commented 7 months ago

Bonsoir, merci pour la réponse, j'ai effectué la nouvelle installation, mais je n'arrive toujours pas à collecter les données. J'ai ce message lorsque je démarre pws:

"PWS to MQTT dispatcher addon 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 services-up: info: copying legacy longrun pwsmqttdispatcher (no readiness notification) s6-rc: info: service legacy-services successfully started [18:54:14] INFO: Starting pwsmqttdispatcher ./run: line 21: /usr/bin/pwsmqttdispatcher: cannot execute binary file: Exec format error ./run: line 21: /usr/bin/pwsmqttdispatcher: No error information [17:54:14] WARNING: Halt add-on with exit code 1 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"

Une idée? Remerciements Cdlt

peterzen commented 7 months ago

Are you running on a raspberry Pi, or a PC? A fix was released last night, please make sure you have 0.1.24 installed.

wilburne commented 7 months ago

Raspberry Pi 3 et j'ai installé la version 0.1.24

peterzen commented 7 months ago

Apparently the yesterday release broke the Raspberry build. Until it gets fixed you should downgrade back to the previous version with the steps above. I apologize for this!

wilburne commented 7 months ago

Good evening, you tell me to reinstall the previous version. How can I put version v0.1.16 or v0.1.21 thanks for the help Sincerely

peterzen commented 7 months ago

I fixed and tested 0.1.25 on raspberry pi 3 earlier today so you can update to 0.1.25. Click "Check updates" in the Addons screen, it should highlight the PWS addon indicating that there is an update available. Try restarting HA if that's not the case. If the update still doesn't show up (this sometimes happens to me) then remove the addon and the repo (as per the above steps with the screenshots) and reinstall it.

wilburne commented 7 months ago

ok update done, i am now in 0.1.25

2024-01-10 190755 pws 2024-01-10 190755 mqtt 2024-01-10 190755 config 2024-01-10 190755

publishing ok, sensor ok, but not found by mqtt brocker, no incoming messages

peterzen commented 7 months ago

It looks like the publishing to the weather_station topic works. Can you check with the MQTT explorer addon whether the data appears there? https://community.home-assistant.io/t/addon-mqtt-explorer-new-version/603739

peterzen commented 7 months ago

What is the addon from the last screenshot?

peterzen commented 7 months ago

You should be seeing this: image

wilburne commented 7 months ago

addon : 0.1.25 see log mosquitto broker, denied publish. 2024-01-10 193846 ver addon 2024-01-10 193636 Mosquitto broker

wilburne commented 7 months ago

2024-01-10 19:55:57: Denied PUBLISH from pwsmqttdispatcher (d0, q0, r0, m0, 'weather_station', ... (441 bytes))

not able to use mqttexplorer

wilburne commented 7 months ago

2024-01-10 201140 mqtt explorer

no publication

wilburne commented 7 months ago

for your inforemation, I create a new user with id:pwsmqttdispatcher and password : pwsmqttdispatcher

peterzen commented 7 months ago

Did this change since 0.1.21? MQTT auth is managed by mosquitto, the PWS addon picks up the default credentials from HA. Did you try a full HA restart?

wilburne commented 7 months ago

yes I restart but I am still denied in log file 2024-01-11 100556 mosquito regards

peterzen commented 7 months ago

This sounds like a configuration issue in the broker as the PWS addon successfully pushes the data to MQTT. That part of the code has not changed in the recent version, it works the same way as in 0.1.21.

wilburne commented 7 months ago

Good evening, I agree with you, but look at my brooker setup: I don't see what could be wrong. Greetings Mosquitto broker config 2 Mosquitto broker config 1

peterzen commented 7 months ago

What do you have in the mosquitto YAML config?

logins:
  - username: xxxxx  # not pws related
    password: xxxxx
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
  active: true
  folder: mosquitto
debug: true
peterzen commented 7 months ago

The only thing that's different from my setup is the mqtt_topic setting, can you try this PWS config instead?

pws_ip: x.x.x.x
mqtt_topic: weather_station/data
mqtt_client_id: pwsmqttdispatcher
fetch_interval: 180
debug_enabled: true
wilburne commented 7 months ago

setting like you no change 2024-01-12 195039 mosquitto 2024-01-12 194720 pws new config

peterzen commented 7 months ago

Can you try setting mqtt_topic to PVROUTER005/DATA and see what happens?

wilburne commented 7 months ago

mqtt_topic PVROUTER005/DATA publish without problem

peterzen commented 7 months ago

What addon is this screenshot from? I wonder if it might have something to do with it. What is sending to PVROUTER005/DATA?

image

wilburne commented 7 months ago

n MQTT I have 2 devices. pws which is my MTO WH2600 station And PVROUTER005 which is a module that manages the water heaters in my home 2024-01-12 213747

peterzen commented 7 months ago

What is the screenshot in the previous post from?

wilburne commented 7 months ago

in "Devices and service"\MQTT\Devices, I select "wh2600" then "MQTT info"

peterzen commented 7 months ago

in "Devices and service"\MQTT\Devices, I select "wh2600" then "MQTT info"

Interesting, I don't have my device configured this way. Maybe you could doublecheck the subscribed topic variable, it looks like it's set to weather_station above, not weather_station/data

wilburne commented 7 months ago

exact, but I had previously tried "weather-station" but still the same problem, and following your post I modified it again to "weater_station/data". It does not work either.

peterzen commented 7 months ago

It can be any value really. I'd try changing it to something else, surely the problem is around the topic configuration, quite possibly in mosquitto.

wilburne commented 7 months ago

Good morning yesss, I finally managed to read the data. Indeed, I just changed the value of the Mosquitto broker configuration, from "customize" active: true to "customize active: false. (see attached files) Once done, the transfer of information takes place without problem. Don't ask me why, I don't know anything about it. Thank you for your help and have a good evening. Regards Mosquitto broker config false Mosquitto broker config true

peterzen commented 7 months ago

Interesting! It makes sense, though my production system runs with active: true and the PWS addon is able to post data to the topic without special access configuration. Thanks for reporting back, I'm glad it's working now.