berwinter / uvr1611

UVR1611 Data Logger Pro
GNU General Public License v3.0
31 stars 22 forks source link

installation uvr1611 / database #6

Open oopskoule opened 9 years ago

oopskoule commented 9 years ago

Hi, first many thanks for this great work! Unfortunatelly I fail importing the tables usign the script:

Using the sample data, structure.sql was running fine. When I use table-migration.sql afterwards, I get an error: ERROR 1054 (42S22): Unknown column 'name_id' in 't_names_of_charts'

I tried to add the column: alter table t_names_of_charts add name_id char(50);

Then the script is running until: Can't DROP 'chart_id'; check that column/key exists.

Even data-migration.sql does fail: ERROR 1146 (42S02): Table 'uvr1611.t_datasets' doesn't exist

Sorry, but I am an abolutely noob in mysql.... Many thanks, Peter

berwinter commented 9 years ago

Hi Peter,

the migration scripts are only necessary if you have used an old version of the datalogger before. For new installations you are done after importing the structue.sql and the example data.

Bertram

oopskoule commented 9 years ago

Hi Bertram, thanks for this hint, it solved my problem! :-)

I still have some questions:

1) In my "Hauptmenü -> Schema, I do not get an entry fpr "MISCHER_AUF" or "MISCHER_ZU". in t_schema.sql I definers: INSERT INTO t_schema (id,path,frame,type,format) VALUES (26,'#Mischer_Hzkr2_auf > tspan','frame1','digital10','MISCHER_AUF(#)'); INSERT INTO t_schema (id,path,frame,type,format) VALUES (27,'#Mischer_Hzkr2_zu > tspan','frame1','digital11','MISCHER_ZU(#)');

In schema.svg, the field "Bezeichner" has been defined with: "#Mischer_Hzkr2_auf".

2) When choosing "Erträge" in "Haupütmenü" I get an error: "Not enough columns given to draw the requested chart.×" "Erträge" have been defined in t_menu with: INSERT INTO t_menu (id,name,unit,type,order,schema) VALUES (8,'Erträge','#.# kWh','energy',7,NULL);

any idea? many thanks for help! best regards, Peter

berwinter commented 9 years ago

You are welcome ;)

The problem with the "MISCHER" (mixer) is that their values are only displayed when the valve is moving. E.g. when it's opening or closing. The reason for this is, that usually there is no information about the exact position of the mixer.

If you have a normal valve, you could use instead the function VENTIL(#) to display the states "open" and "closed".

For the second problem, you have to look into the table ´t_names_of_charts´ for the entries with ´chart_id´ 8. There you should have defined the lines for the chart. Eg: INSERT INTO t_names_of_charts (chart_id,type,frame,order) VALUES (8,'energy1','frame1',1); INSERT INTO t_names_of_charts (chart_id,type,frame,order) VALUES (8,'energy2','frame1',2);

BR Bertram

oopskoule commented 9 years ago

Hi Bertram,

you are right: Of course the status "AUF"/ "ZU" can only appear, when the mixer is running / changing its position. I could see this now for a short time! :-) The energy chart is displayed properly now - there was a mismatch in the table.

Is there a possibility to display digital values too? (for example when are my pumps running...)

BR, Peter

berwinter commented 9 years ago

Hi Peter,

yes, you can display digital values too. For the schema you have to use the function DIGITAL(#) which display then 'EIN' or 'AUS'. For the charts you can add the digital lines just like the analog ones. They will be shown in a separated chart above the analog chart.

BR Bertram

oopskoule commented 9 years ago

Bertram, I assumed this, so I tried to implement digital values in charts, but I do not succeed, for example:

in t_menu is defined: | 6 | Pumpen | # | line | 5 | NULL |

in t_schema I defined: | 17 | #Pumpe_Solar > tspan | frame1 | digital1 | DIGITAL(#) |

in t_names_of_charts its defined: | 4 | digital1 | frame1 | 4 |

So there should be a chart of this pump digital 1 in chart 4 (at the 4th position) ? In my schema, this pump is shown properly with on/off. I cant detect the error, unfortunately there a no digital values used in your examples... :-).

Many thanks, cheers, Peter