Re: [vz-users] vzclient in einer (modernen) Skriptsprache?

2019-06-04 Diskussionsfäden Daniel Lauckner
Hallo,


am Dienstag, 4. Juni 2019 um 19:38 hat Marc Haber geschrieben:
> Danke für Eure Unterstützung.

Danke für deine. :)


mfg Daniel



Re: [vz-users] vzclient in einer (modernen) Skriptsprache?

2019-06-04 Diskussionsfäden Frank Richter
Na dann ist das doch eine Win-Win-Situation. Danke für die Doku!

Viele Grüße
Frank

Marc Haber  schrieb am Di., 4. Juni
2019, 19:39:

> On Sun, Jun 02, 2019 at 09:34:36PM +0200, Frank Richter wrote:
> > Musst du dir wahrscheinlich aus dem ML-Archiv zusammensuchen. Mehrere
> Werte
> > funktioniert auf jeden Fall, Format war glaube ich Identifier = Wert.
>
> Das ist perfekt, Umstellung perfekt, alles einheitlich, die
> Konfiguration in der vzlogger.conf, so soll es sein.
>
> Und dokumentiert ist's jetzt auch:
>
> https://wiki.volkszaehler.org/software/controller/vzlogger/vzlogger_conf_parameter?s[]=exec#exec
>
> https://wiki.volkszaehler.org/hardware/channels/solar_inverters/kostal_pico?s[]=exec
>
> https://wiki.volkszaehler.org/hardware/channels/meters/power/dzg_dvh4013_modbus?s[]=exec
>
> Danke für Eure Unterstützung.
>
> Grüße
> Marc
>
> --
>
> -
> Marc Haber | "I don't trust Computers. They | Mailadresse im Header
> Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421
>


Re: [vz-users] vzclient in einer (modernen) Skriptsprache?

2019-06-04 Diskussionsfäden Marc Haber
On Sun, Jun 02, 2019 at 09:34:36PM +0200, Frank Richter wrote:
> Musst du dir wahrscheinlich aus dem ML-Archiv zusammensuchen. Mehrere Werte
> funktioniert auf jeden Fall, Format war glaube ich Identifier = Wert.

Das ist perfekt, Umstellung perfekt, alles einheitlich, die
Konfiguration in der vzlogger.conf, so soll es sein.

Und dokumentiert ist's jetzt auch:
https://wiki.volkszaehler.org/software/controller/vzlogger/vzlogger_conf_parameter?s[]=exec#exec
https://wiki.volkszaehler.org/hardware/channels/solar_inverters/kostal_pico?s[]=exec
https://wiki.volkszaehler.org/hardware/channels/meters/power/dzg_dvh4013_modbus?s[]=exec

Danke für Eure Unterstützung.

Grüße
Marc

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Re: [vz-users] SD-Kartencrash nach Update - noch etwas zu Retten ?

2019-06-04 Diskussionsfäden John Doe
Hallo Andreas, 

danke für 's Feedback. Normalerweise erzeuge ich das Backup ja offline mittels 
dd im Ganzen, nur fehlen mir dann eben die Daten aus der Zeit, während das 
Backup (von der Karte, die sich hierfür in einem anderen Rechner befindet) 
läuft. 
Daher hatte ich ins Blaue versucht, aus dem laufenden Betrieb zu sichern. Und 
dann kam mein Problem nach dem MW-Update. 
Da sich phpmyadmin nicht im aktuellen Image befindet: Wie müsste ich das mit 
der DB verdrahten?
Grüße, 

JD. 

> Sent: Tuesday, June 04, 2019 at 12:39 PM
> From: "Andreas Goetz" 
> To: "volkszaehler.org - users" 
> Subject: Re: [vz-users] SD-Kartencrash nach Update - noch etwas zu Retten ?
>
> Hallo John,
> 
> ich muss es trotzdem nochmal sagen- zur Sicherheit: dbcopy ersetzt immer noch 
> kein Backup!
> 
> So kann es z.B. theoretisch passieren, dass Du im produktiven System alle 
> Kanäle löschst (oder DB kaputt, oder…). Wenn dann dbcopy läuft werden die 
> auch aus der Kopie gelöscht (selbst wenn die Daten erhalten bleiben unschön).
> 
> Du solltest also auch von der Kopie regelmäßige Sicherungen machen:
> bei SQlite einfach als Kopie der Datei
> bei MySQL mit mysqldump oder phpmyadmin
> 
> Das Backup der dbcopy-Kopie tut dann weniger weh, diese DB darf ja ruhig auch 
> mal länger gesperrt oder offline sein…
> 
> Ich hoffe Deine Daten sind jetzt sicher :)
> 
> Viele Grüße, 
> Andreas
> 
> 
> > On 2. Jun 2019, at 18:46, John Doe  wrote:
> > 
> > Hallo Andreas,
> >  
> > der letzte Tip hat funktioniert:
> >  
> > Nach Installation von php-sqlite3 scheint es durchgelaufen zu sein:
> >  
> >  $ /var/www/volkszaehler.org/vendor/bin/dbcopy create -c /etc/dbcopy.yaml
> > Creating target schema
> > Creating tables
> > Updating schema assets for target platform compatibility: sqlite
> > table: aggregate
> > table: data
> > table: entities
> > table: entities_in_aggregator
> > table: properties
> >  
> > Ish schaue mir jetzt mal die Kopie an und versuche evtl mal eine 
> > Rücksicherung.
> > Bis hierhin danke für Deine Geduld !
> >  
> > Grüße,
> >  
> > JD.
> >  
> > Sent: Sunday, June 02, 2019 at 6:22 PM
> > From: "Andreas Goetz" 
> > To: "volkszaehler.org - users" 
> > Subject: Re: [vz-users] SD-Kartencrash nach Update - noch etwas zu Retten ?
> > Deinem PHP fehlt das richtige Modul:
> >  
> > In AbstractSQLiteDriver.php line 70:
> >   An exception occurred in driver: could not find driver
> >  
> > Aktuell keine Idee woher wenn:
> >  
> > apt-get update
> > apt-get install php-sqlite3 (oder php-sqlite)
> >  
> > nicht funktioniert.
> >  
> > Sorry :(
> >  
> > On 2. Jun 2019, at 18:18, John Doe  > > wrote:
> >  
> > Hallo Andreas,
> >  
> > die dbcopy.yaml habe ich, bis auf die User-Daten, erst mal so gelassen:
> >  
> > # DATABASE DEFINITION
> > source:
> >   driver: pdo_mysql
> >   host: localhost
> >   user: vz
> >   password: demo
> >   dbname: volkszaehler
> > target:
> >   driver: pdo_sqlite
> >   host: localhost
> >   user: root
> >   password: raspberry
> >   dbname: volkszaehler_backup
> >   path: sqlite.db3  # path is only used if driver = pdo_sqlite
> > # influxdb target database connection
> > influx:
> >   dsn: influxdb://localhost:8086 <>
> >   dbname: volkszaehler
> >   measurement: data
> > # DATABASE DEFINITION
> > source:
> >   driver: pdo_mysql
> >   host: localhost
> >   user: vz
> >   password: demo
> >   dbname: volkszaehler
> > target:
> >   driver: pdo_sqlite
> >   host: localhost
> >   user: root
> >   password: raspberry
> >   dbname: volkszaehler_backup
> >   path: sqlite.db3  # path is only used if driver = pdo_sqlite
> > # influxdb target database connection
> > influx:
> >   dsn: influxdb://localhost:8086 <>
> >   dbname: volkszaehler
> >   measurement: data
> > # TABLE DEFINITION
> > # 
> > # tables will be processed in the order they are mentioned:
> > #   - foreign keys on target will be dropped
> > #   - if a table is not listed here, it will not be touched
> > # transfer mode
> > #   skip:   table will not be copied
> > #   copy:
> >  
> > Der analoge Aufruf endet wie vorher:
> >  
> > pi@raspberrypi:~ $ /var/www/volkszaehler.org/vendor/bin/dbcopy 
> >  create -c /etc/dbcopy.yaml
> > Creating target schema
> > Creating tables
> > Updating schema assets for target platform compatibility: sqlite
> > table: aggregate
> > table: data
> > table: entities
> > table: entities_in_aggregator
> > table: properties
> > CREATE TABLE aggregate (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, 
> > channel_id INTEGER DEFAULT NULL, type SMALLINT NOT NULL, timestamp BIGINT 
> > NOT NULL, value DOUBLE PRECISION NOT NULL, count INTEGER NOT NULL, 
> > CONSTRAINT FK_B77949FF72F5A1AA FOREIGN KEY (channel_id) REFERENCES entities 
> > (id) NOT DEFERRABLE INITIALLY IMMEDIATE)
> > CREATE UNIQUE INDEX aggregate_unique ON aggregate (channel_id, type, 
> > timestamp)
> > 

Re: [vz-users] SD-Kartencrash nach Update - noch etwas zu Retten ?

2019-06-04 Diskussionsfäden Andreas Goetz
Hallo John,

ich muss es trotzdem nochmal sagen- zur Sicherheit: dbcopy ersetzt immer noch 
kein Backup!

So kann es z.B. theoretisch passieren, dass Du im produktiven System alle 
Kanäle löschst (oder DB kaputt, oder…). Wenn dann dbcopy läuft werden die auch 
aus der Kopie gelöscht (selbst wenn die Daten erhalten bleiben unschön).

Du solltest also auch von der Kopie regelmäßige Sicherungen machen:
bei SQlite einfach als Kopie der Datei
bei MySQL mit mysqldump oder phpmyadmin

Das Backup der dbcopy-Kopie tut dann weniger weh, diese DB darf ja ruhig auch 
mal länger gesperrt oder offline sein…

Ich hoffe Deine Daten sind jetzt sicher :)

Viele Grüße, 
Andreas


> On 2. Jun 2019, at 18:46, John Doe  wrote:
> 
> Hallo Andreas,
>  
> der letzte Tip hat funktioniert:
>  
> Nach Installation von php-sqlite3 scheint es durchgelaufen zu sein:
>  
>  $ /var/www/volkszaehler.org/vendor/bin/dbcopy create -c /etc/dbcopy.yaml
> Creating target schema
> Creating tables
> Updating schema assets for target platform compatibility: sqlite
> table: aggregate
> table: data
> table: entities
> table: entities_in_aggregator
> table: properties
>  
> Ish schaue mir jetzt mal die Kopie an und versuche evtl mal eine 
> Rücksicherung.
> Bis hierhin danke für Deine Geduld !
>  
> Grüße,
>  
> JD.
>  
> Sent: Sunday, June 02, 2019 at 6:22 PM
> From: "Andreas Goetz" 
> To: "volkszaehler.org - users" 
> Subject: Re: [vz-users] SD-Kartencrash nach Update - noch etwas zu Retten ?
> Deinem PHP fehlt das richtige Modul:
>  
> In AbstractSQLiteDriver.php line 70:
>   An exception occurred in driver: could not find driver
>  
> Aktuell keine Idee woher wenn:
>  
> apt-get update
> apt-get install php-sqlite3 (oder php-sqlite)
>  
> nicht funktioniert.
>  
> Sorry :(
>  
> On 2. Jun 2019, at 18:18, John Doe  > wrote:
>  
> Hallo Andreas,
>  
> die dbcopy.yaml habe ich, bis auf die User-Daten, erst mal so gelassen:
>  
> # DATABASE DEFINITION
> source:
>   driver: pdo_mysql
>   host: localhost
>   user: vz
>   password: demo
>   dbname: volkszaehler
> target:
>   driver: pdo_sqlite
>   host: localhost
>   user: root
>   password: raspberry
>   dbname: volkszaehler_backup
>   path: sqlite.db3  # path is only used if driver = pdo_sqlite
> # influxdb target database connection
> influx:
>   dsn: influxdb://localhost:8086 <>
>   dbname: volkszaehler
>   measurement: data
> # DATABASE DEFINITION
> source:
>   driver: pdo_mysql
>   host: localhost
>   user: vz
>   password: demo
>   dbname: volkszaehler
> target:
>   driver: pdo_sqlite
>   host: localhost
>   user: root
>   password: raspberry
>   dbname: volkszaehler_backup
>   path: sqlite.db3  # path is only used if driver = pdo_sqlite
> # influxdb target database connection
> influx:
>   dsn: influxdb://localhost:8086 <>
>   dbname: volkszaehler
>   measurement: data
> # TABLE DEFINITION
> # 
> # tables will be processed in the order they are mentioned:
> #   - foreign keys on target will be dropped
> #   - if a table is not listed here, it will not be touched
> # transfer mode
> #   skip:   table will not be copied
> #   copy:
>  
> Der analoge Aufruf endet wie vorher:
>  
> pi@raspberrypi:~ $ /var/www/volkszaehler.org/vendor/bin/dbcopy 
>  create -c /etc/dbcopy.yaml
> Creating target schema
> Creating tables
> Updating schema assets for target platform compatibility: sqlite
> table: aggregate
> table: data
> table: entities
> table: entities_in_aggregator
> table: properties
> CREATE TABLE aggregate (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, 
> channel_id INTEGER DEFAULT NULL, type SMALLINT NOT NULL, timestamp BIGINT NOT 
> NULL, value DOUBLE PRECISION NOT NULL, count INTEGER NOT NULL, CONSTRAINT 
> FK_B77949FF72F5A1AA FOREIGN KEY (channel_id) REFERENCES entities (id) NOT 
> DEFERRABLE INITIALLY IMMEDIATE)
> CREATE UNIQUE INDEX aggregate_unique ON aggregate (channel_id, type, 
> timestamp)
> CREATE INDEX IDX_B77949FF72F5A1AA ON aggregate (channel_id)
> CREATE TABLE data (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, channel_id 
> INTEGER DEFAULT NULL, timestamp BIGINT NOT NULL, value DOUBLE PRECISION NOT 
> NULL, CONSTRAINT FK_ADF3F36372F5A1AA FOREIGN KEY (channel_id) REFERENCES 
> entities (id) NOT DEFERRABLE INITIALLY IMMEDIATE)
> CREATE UNIQUE INDEX data_unique ON data (channel_id, timestamp)
> CREATE INDEX IDX_ADF3F36372F5A1AA ON data (channel_id)
> CREATE TABLE entities (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, uuid 
> VARCHAR(36) NOT NULL, type VARCHAR(255) NOT NULL, class VARCHAR(255) NOT NULL)
> CREATE UNIQUE INDEX UNIQ_50EC64E5D17F50A6 ON entities (uuid)
> CREATE TABLE entities_in_aggregator (parent_id INTEGER NOT NULL, child_id 
> INTEGER NOT NULL, PRIMARY KEY(parent_id, child_id), CONSTRAINT 
> FK_2BD88468727ACA70 FOREIGN KEY (parent_id) REFERENCES entities (id) NOT 
> DEFERRABLE INITIALLY IMMEDIATE,