Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Frequently Asked Questions
Wird mein Zähler denn schon unterstützt?
Am Besten wirfst Du einen Blick auf unseren Morphologischen Kasten
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"