On Wed, Jan 19, 2022 at 11:50 PM kludo <udo.klauss...@gmail.com> wrote:
> Since I only want to display a few PV data, I decided to use the two > database fields "signal1" and "signal2" as storage location for the output > data of my two inverters. > In principle, this also works, but I do not receive totalized yield data. > This means that at the end of the day, I can display the history, but not > the daily output. > I'm not following you here. Why can't you display daily output? For example, $day.signal1.sum should show the sum of signal1 for the day. Same strategy for plots. > Another issue is the subsequent import of the stored data into the WeeWX > database. I wanted, to have the year 2022 complete, to transfer the data > saved as csv to the WeeWX database afterwards using wee_import. > > I have prepared the csv accordingly and assigned "signal1" and "signal2" > to the group group_energy in the units.py file. If I start the import with > the parameter "--dry-run" everything is fine. Without "--dry-run" the > process also runs without errors, but the data is not included in the > database due to a UNIQUE problem. > > However, I would like to add the PV values to the respective existing data > record and not create a new data record. Is there no way to keep the > existing record and only save the additional values? > > I am very thankful for any tip > I can think of two strategies. First, would be to write a small python program that imports the data using a SQL UPDATE command, rather than the INSERT command used by wee_import. There might be a database tool that can do this for you. Alternatively, set up a second database with just PV data. Then use a 2nd database binding to show data from it. See the section *Adding a second data source <http://www.weewx.com/docs/customizing.htm#Adding_2nd_source>* in the Customizing Guide. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEAohDRBhwFF%2BunNXwj%2BwLK-qqbKdiuv8AUD8dgYhzq9yQ%40mail.gmail.com.