DennisOSRM / hms-mqtt-publisher

HMS-XXXXW-2T MQTT publisher and Home Assistant addon
BSD 2-Clause "Simplified" License
106 stars 16 forks source link

2x HMS-800W-2T mit einem PC auslesen #127

Open tuvok81 opened 1 month ago

tuvok81 commented 1 month ago

Hallo, da man ja nur einen WR momentan mit der software im selben Netzwerk auslesen kann wäre es schön, wenn die Software das irgendwie hinbekommt 2 WRs gleichzeitig auszulesen.

theoretisch müsste man das irgendwie umbauen

[inverter1] inverter_host = "192.168.178.10" update_interval = 30500 mqtt_name = "hms800wt2"

[inverter2] inverter_host = "192.168.178.11" update_interval = 30500 mqtt_name = "hms800wt2-2"

[simple_mqtt] host = "192.168.178.3" username = "" password = ""

wäre schön, wenn es diese Option geben würde

stefan123t commented 1 month ago

@tuvok81 the mqtt prefix is hard coded here in simple_mqtt.rs

https://github.com/DennisOSRM/hms-mqtt-publisher/blob/44340dea4de9b0336cb369a7843aac70d3f68bd5/hms2mqtt/src/simple_mqtt.rs#L48-L77

tuvok81 commented 1 month ago

ich bin da nicht so firm drin ich schreibe einfach in der datei wo hms800wt2 steht halt nen -2 dahinter dann sollte das klappen hoff ich :) .. Ich hoffe ja, dass @DennisOSRM da was aktualisiert :) den Kasten Bier bekommt er, wie er sich gewünscht hat hehe

DennisOSRM commented 1 month ago

Es ist auf meiner Liste das zu implementieren. Sollte nicht zu viel Arbeit sein, aber evtl komme ich erst in ein oder zwei Wochen dazu.

tuvok81 commented 1 month ago

so ich habe mal einen 2ten ordner gemacht den part abgeändert und compiliert scheint erstmal so zu funktionieren :)

// TODO: this section bears a lot of repetition. Investigate if there's a more idiomatic way to get the same result, perhaps using a macro let topic_payload_pairs = [ ("hms800wt2-2-2/inverter_local_time", inverter_local_time), ("hms800wt2-2/pv_current_power", pv_current_power.to_string()), ("hms800wt2-2/pv_daily_yield", pv_daily_yield.to_string()), ("hms800wt2-2/pv_current_power", pv_current_power.to_string()), ("hms800wt2-2/pv_daily_yield", pv_daily_yield.to_string()), ("hms800wt2-2/pv_grid_voltage", pv_grid_voltage.to_string()), ("hms800wt2-2/pv_grid_freq", pv_grid_freq.to_string()), ( "hms800wt2-2/pv_inv_temperature", pv_inv_temperature.to_string(), ), ("hms800wt2-2/pv_port1_voltage", pv_port1_voltage.to_string()), ("hms800wt2-2/pv_port1_curr", pv_port1_curr.to_string()), ("hms800wt2-2/pv_port1_power", pv_port1_power.to_string()), ("hms800wt2-2/pv_port1_energy", pv_port1_energy.to_string()), ( "hms800wt2-2/pv_port1_daily_yield", pv_port1_daily_yield.to_string(), ), ("hms800wt2-2/pv_port2_voltage", pv_port2_voltage.to_string()), ("hms800wt2-2/pv_port2_curr", pv_port2_curr.to_string()), ("hms800wt2-2/pv_port2_power", pv_port2_power.to_string()), ("hms800wt2-2/pv_port2_energy", pv_port2_energy.to_string()), ( "hms800wt2-2/pv_port2_daily_yield", pv_port2_daily_yield.to_string(), ), ];

tuvok81 commented 1 month ago

OK scheint doch nicht so zu funktionieren :(

grafik

der macht jetzt komische Zahlen dran :) AH hab den fehler

tuvok81 commented 1 month ago

hmpf will doch nicht klappen :( ("hms800wt2-2-2/inverter_local_time", inverter_local_time), hatte hier ne 2 zu viel aber er liest nix aus :(

grafik