Benutzer-Werkzeuge

Webseiten-Werkzeuge


faq

Dies ist eine alte Version des Dokuments!


Frequently Asked Questions

Wird mein Zähler denn schon unterstützt?

Am Besten wirfst Du einen Blick auf unseren Morphologischen Kasten

Woher weiß ich, ob mein Zähler das Protokoll "sml" oder das Protokoll "d0" (oder DIN-EN 62056-21) spricht?

Das ist ganz einfach. Im Gegensatz zu sml ist d0 in ASCII codiert. Die Ausgabe sieht dann eben so, so oder so aus. sml hingegen ist binär codiert und sieht daher bei direkter Betrachtung auf der Console deutlich unübersichtlicher aus (wenn man's durch ein „hexdump -d“ laufen lässt, sieht's z. B. so aus). Kurzum: sobald in der Ausgabe sowas wie „1.8.1“ enthalten ist, spricht der Zähler „d0“ und nicht sml.

Database questions

How can I rename a column name in my database?

ALTER TABLE `properties` CHANGE `key` `pkey` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL

Table 'volkszaehler.data' doesn't exist

You may encounter this error if you created the database and the database user manually, but forgot to create the tables before adding the demo values.

To create the tables, see https://github.com/volkszaehler/volkszaehler.org/tree/master/misc/sql.

Fehlender TIMESTAMP / keine Daten in DB

falls beim Middleware Server unter apache in der access_log die Einträge in der folgenden Art gelistet sind:

<IP> - - [<DATE>] "POST /middleware/index.php/data/<UUID>.json?ts=0000&value=1 HTTP/1.1" 400 232

fehlt der TIMESTAMP des controllers (ts=0000).
In diesem Fall kann man Diesen testweise auch durch den Server erzeugen lassen, indem man ethersex (e6) ohne timestamp konfiguriert:

make menuconfig
  Applications:
    watchasync service:
      Include unix timestamp: ausschalten
      Summarize Events: ausschalten
      Path at the end: ".json"

Size of database and access_log

By using several higher resolution power meters with an S0 interface (DIN 43864) and an above average power consumption the harddisc space required by the (mysql-)database and apaches access_log can grow rapidaly to several hundert megabytes.

Since MySQL writes every change additionally to a binary log file (e.g. mysqld-bin.<nnnnnn>), its space requirements can be lowered by limiting the maximum size of these files and auto deleting older ones e.g. by inserting the following entries in /etc/mysql/my.cnf:

[mysqld]
expire_log_days = 7
max_binlog_size = 10M

This always creates an new binlog file when its size exceeds 10MB and deletes the ones which are older than 7 days.

Another major size reduction can be reached by frequently rotating apaches access_log file e.g. with logrotate.

In future we hope to reduce the database size additionaly by e.g. optionaly offering the implementation of a round-robin database like RRDtool

Fehlermeldungen im Frontend- bzw. Middleware

Bad Request 400: Property tokens does not exist

Nach Aktualisierung eures Volkszählers durch „git pull“ muss euer Webserver „etc/init.d/apache2 restart“ neu gestartet werden.

Bad Request 400: Could not find driver

Hier fehlt euch der PDO Datenbanktreiber. In der volkszaehler.conf.php habt ihr den verwendeten Treiber konfiguriert. Dazu müsst ihr ihn in der php.ini laden:

extension=pdo_mysql.so

Parse error: syntax error, unexpected T_STRING

Error message: „Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in <filename>.php on line <line_number>“ reason: You're running php in a version < 5.3; verify by running „php -v“; result should begin with „PHP 5.3.“ or higher; solution: upgrade to 5.3.x or higher

Frontend: "500 error: Unknown middleware response"

The parameter $config['lib']['doctrine'] could be missing in volkszaehler.conf.php. Insert something like this (taken from the current template volkszaehler.template.conf.php):

$config['lib']['doctrine']			= VZ_DIR . '/lib/vendor/Doctrine';

Help! Where's the git cheat sheet?!?

You need not be afraid - it is here.

Fehlermeldungen / Probleme bei TFTPD

Sollte im TFTPD32 kein Request für eine IP-Adresse ankommen, dann ggf. die Verkabelung vereinfachen um hier Fehlerquellen auszuschliessen. Der sicherste Fall sind feste IP-Adressen und ein Cross-Kabel mit nur 4Adern (10 MBit).

Controller Sourcecode

Wo ist denn der Volkszähler Code im Controller? Im Prinzip nirgends. Es wird je Impuls über den Dienst watchasync ein Aufruf an den eingestellten Server abgesetzt. Der Controller speichert selbst nichts - ggf. können Impulse zusammengefasst werden (was zu einem Auflösungsverlust führt – dafür den Traffic und die SQL Einträge reduziert).

Distribution

Gentoo Linux

A couple of hints for people trying to get this running under Gentoo

- Profile: hardened/linux/x86
- make.conf: USE="logrotate unicode userlocales -X -tcpd"
- package.use: "dev-lang/php apache2 gd mysql pdo"
- "emerge git jpgraph mysql pecl-apc phpmyadmin"

AVR Compiler

see http://en.gentoo-wiki.com/wiki/Crossdev#AVR_Architecture

- "emerge crossdev"
- "crossdev -v --target avr --gcc 4.4.4-r2 --binutils 2.20.1-r1 --libc 1.6.8 -s1 --without-headers"
- "crossdev -v --target avr --gcc 4.4.4-r2 --binutils 2.20.1-r1 --libc 1.6.8"
- "ln -s /usr/i686-pc-linux-gnu/avr/lib/ldscripts /usr/avr/lib/ldscripts"

Ubuntu Linux

I'm running Ubuntu 10.04 and I keep getting "services/tftp/tftp-bootload.c:73: undefined reference to `memcmp_PF'" - what can I do?

Make sure you download the AVR toolchain from these guys. That should help.

I'm running Ubuntu 10.04 and I keep getting "services/tftp/tftp_net.c:52: undefined reference to `pgm_get_far_address'" - what can I do?

Make sure you download the AVR toolchain from these guys. That should help.

So, now I _have_ installed the avrfreaks toolchain and I'm still running into the same issues!

Make sure your path is set accordingly to use the package, too; when in doubt:

export PATH=$PATH:/usr/local/avr/bin/

before you start.

Miscellaneous

Ganz andere Hardware

Wenn man mit einem Arduino-Board Daten eines eHZ auslesen und dazu die SoftwareSerial-Bibliothek verwendet, muss man unbedingt auf mySerial.overflow() prüfen. Sonst kann es passieren, dass unerkannt Bytes „verschluckt“ werden. Die Bibliothek hat nur 64 Byte Puffer, das ist nicht viel - und wenn man die Daten nicht schnell genug abnimmt, sind sie weg.

faq.1358841358.txt.gz · Zuletzt geändert: 2013/01/22 08:55 von justinotherguy