svijee / kostal-dataexporter

Python Script which exports Kostal Inverter Data into a PostgreSQL and Influx Database
MIT License
8 stars 6 forks source link

Add support for Kostal Piko 15 #3

Open Granddave opened 3 years ago

Granddave commented 3 years ago

Hello, I would like to add support for the Kostal Piko 15.

The changes required are to add scraping for two extra dc inputs:

  'pv_generator_dc_input_2_voltage': 33555458,
  'pv_generator_dc_input_2_current': 33555457,
  'pv_generator_dc_input_2_power': 33555459,
  'pv_generator_dc_input_3_voltage': 33555714,
  'pv_generator_dc_input_3_current': 33555713,
  'pv_generator_dc_input_3_power': 33555715,

I see that there are some fields in the data_mapping are scraped but not inserted into the databases, namely:

  'pv_generator_dc_input_2_voltage': 33555458,
  'pv_generator_dc_input_2_current': 33555457,
  'pv_generator_dc_input_2_power': 33555459,
  'house_home_consumption_covered_by_battery': 83886592,
  'grid_grid_parameters_limitation_on': 67110144,

Would it be OK for me to add these as well as the dc input for the third channel? I guess that it shouldn't be a problem to scrape all fields even if only one DC is in use, but it is rather the database schema compatibility that I am thinking about. Thoughts?

I also have some commits on my fork that generalizes the scraping and database inserts as well as some minor changes which I'll open another PR for.

svijee commented 3 years ago

Would it be OK for me to add these as well as the dc input for the third channel?

Sure, just create a PR 👍🏾

I guess that it shouldn't be a problem to scrape all fields even if only one DC is in use, but it is rather the database schema compatibility that I am thinking about. Thoughts?

Yes at least the postgres part of it. I'm okay with a change, so I will change my database layout accordingly. I have no idea if more people are using this project.