MatterVN / ModbusTCP2MQTT

Sungrow & SMA Solar Inverter addon for Home Assistant using mobusTCP
MIT License
69 stars 52 forks source link

Attempt to fix #20

Closed tgcowell closed 2 years ago

tgcowell commented 2 years ago

Hi ....

Please review as I'm new to this and just giving it a crack, in an ideal world all the attributes would become sensors... and I needed to provide auth for my MQTT host and your options don't provide this.

Thought I would give it a shot?

Let me know your thoughts.

sEdsKi commented 2 years ago

Yes my log is showing all of this information - but no sensors to use it?

INFO:root:{'inverter_size': 8.0, 'daily_power_yield': 53500.0, 'total_power_yield': 86.52, 'inverter_power_on_hours': 5064, 'internal_temp': 51.2, 'pv1_voltage': 168.7, 'pv1_current': 0.6, 'pv2_voltage': 305.0, 'pv2_current': 0.6, 'total_pv_power': 308, 'grid_voltage': 244.2, 'inverter_current': 1.2, 'total_active_power': 300, 'grid_frequency': 50.0, 'export_power': 281, 'export_power_indicator': 0, 'power_meter': 589, 'daily_export_energy': 29600.0, 'total_export_energy': 5920.7, 'daily_import_energy': 7400.0, 'total_import_energy': 4531.3, 'daily_energy_consumption': 23900.0, 'total_energy_consumption': 2731.6, 'timestamp': '2022-02-01T18:05:23'}
INFO:root:Published to MQTT
tgcowell commented 2 years ago

They appear as attributes against any of the sensors, so you can manually create a sensor calling an attribute. This is how I've been able to get around it until the sensors are updated.

sEdsKi commented 2 years ago

@tgcowell Yes this is where Im at now. If I can piece together enough online help to write those sensors ill be pretty happy.

ttvt commented 2 years ago

The connection to home assistant's mqtt don't need the user name & password. If you need connect to different mqtt please use the solariot.