Replies: 7 comments 15 replies
-
Are you referencing the MQTT broker host by IP address by any chance? |
Beta Was this translation helpful? Give feedback.
-
no, I assume in order for TLS to work I have to use the domain. |
Beta Was this translation helpful? Give feedback.
-
thanks for the brand new images! :) `docker run --rm -it -v /home/pi/config.toml:/config.toml --env RUST_LOG=TRACE dennisosrm/hms-mqtt-publisher [2023-12-10T13:14:34Z INFO hms_mqtt_publish] inverter host: 10.0.1.40 [2023-12-10T13:14:34Z INFO hms_mqtt_publish] Publishing to simple MQTT broker [2023-12-10T13:14:34Z INFO hms2mqtt::inverter] Inverter is Online [2023-12-10T13:14:34Z DEBUG hms2mqtt::simple_mqtt] dtu_sn: "xx" time: 1702214084 device_nub: 1 package_nub: 1 inverter_state {inv_id: xx port_id: 1 grid_voltage: 2295 grid_freq: 4998 pv_current_power: 1712 unknown1: 74 unknown2: 999 temperature: 136 unknown3: 26 unknown4: 1 bit_field: 524401 6: 1 11: 28864} port_state {pv_sn: xx pv_port: 1 pv_vol: 357 pv_cur: 330 pv_power: 1181 pv_energy_total: 30356 pv_daily_yield: 270 bitfield: 50921472} port_state {pv_sn: xx pv_port: 2 pv_vol: 337 pv_cur: 185 pv_power: 626 pv_energy_total: 18013 pv_daily_yield: 118 bitfield: 50331648} pv_current_power: 1712 pv_daily_yield: 388 [2023-12-10T13:15:05Z DEBUG hms2mqtt::simple_mqtt] dtu_sn: "xx" time: 1702214115 device_nub: 1 package_nub: 1 inverter_state {inv_id: xx port_id: 1 grid_voltage: 2287 grid_freq: 4997 pv_current_power: 649 unknown1: 28 unknown2: 999 temperature: 136 unknown3: 26 unknown4: 1 bit_field: 655474 11: 28864} port_state {pv_sn: xx pv_port: 1 pv_vol: 332 pv_cur: 136 pv_power: 453 pv_energy_total: 30357 pv_daily_yield: 271 bitfield: 50921472} port_state {pv_sn: xx pv_port: 2 pv_vol: 328 pv_cur: 70 pv_power: 232 pv_energy_total: 18013 pv_daily_yield: 118 bitfield: 50331648} pv_current_power: 649 pv_daily_yield: 389 ... however, no references to failed connections to mqtt/TLS/... |
Beta Was this translation helpful? Give feedback.
-
hmm.. this is a curious one, i.e. getting no output would usually equal to no error. Any failure in delivery to the MQTT broker would result in at least a warning. From this point, it looks like the message is being swallowed without further warning from the broker. |
Beta Was this translation helpful? Give feedback.
-
found a hint for the trouble: looks like "something" is going wild with dns queries. |
Beta Was this translation helpful? Give feedback.
-
found a workaround using mqtt bridge. The docker publishes to the host that runs the image, and the mqtt message is bridged to remote broker: config snipped for mosquitto:
works like a charm :) thanks a lot for the tool, looking forward to further developments! |
Beta Was this translation helpful? Give feedback.
-
The feature development is happening in PR #93 |
Beta Was this translation helpful? Give feedback.
-
Hi,
great projekt, thanks for your hard work on this!
I would like to publish data to mqtt on a vps, with traffic encrypted with tls (letsencrypt certificate).
The infrastructure in principle should work, I can publish messages to the server using
mosquitto_pub -h <domain.tld> -t test -m "hello again" -p 8883 -u <username> -p <password>
however, feeding these values into config.toml
[simple_mqtt] host = "<domain.tld>" username = "<username>" password = "<password>" port = 8883
does not do the trick.
I start the docker with
docker run --rm -it -v /home/pi/config.toml:/config.toml dennisosrm/hms-mqtt-publisher
and get a positive feedback:2023-12-04T12:42:10 [INFO] - inverter host: <IP> 2023-12-04T12:42:10 [INFO] - Publishing to simple MQTT broker 2023-12-04T12:42:10 [INFO] - Inverter is Online
any ideas how to tackle this? i cannot provide the ip of vps, because tls requires the domain (mosquitto_pub with ip fails with
Error: A TLS error occurred.
)Thanks a lot in advance :)
Beta Was this translation helpful? Give feedback.
All reactions