From 9cdd0fc00ad9ed5129f5b213b4b3296899000b5a Mon Sep 17 00:00:00 2001 From: root Date: Tue, 18 Oct 2011 23:18:36 +0200 Subject: //retiolum: kremu -> kremium --- retiolum/hosts/kremium | 10 ++++++++++ retiolum/hosts/kremu | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 retiolum/hosts/kremium delete mode 100644 retiolum/hosts/kremu diff --git a/retiolum/hosts/kremium b/retiolum/hosts/kremium new file mode 100644 index 00000000..06df489f --- /dev/null +++ b/retiolum/hosts/kremium @@ -0,0 +1,10 @@ +Subnet = 42:88ec:8968:cc6b:978a:68b7:1004:fc8a/128 +Subnet = 10.7.7.192 +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAsdjqCyLvGfkIsawGji1CIIxGaKKdFhKJcfFK8FWiyQdgeNK/9UAh +XsJYkSHVcXqHAorP1QAvk5fIiSEEoSwoChyecqpNOREOnN8+N8RVrs0QIwL0mwa0 +9H4HDcpt8O8J0mpM8z8pb7vhDk261oMchG52TVYX4cuEgpEiyJtij27UIfOeVY8g +8kuJQG+9X7WNGMOt2Y8A7pXFf/+8qdwpOq5C0SIRPR5WplBeeF3BepzmUeq24XOE +cdF/ggYeU8hSYzr3DFX7g9u/gOjBQrhApopx6LR9TkpkrFfVcgLw3NaOzI2vQzqa +7m8v62D+/3vun3ZB/1OfQpIMfm77DC8AEQIDAQAB +-----END RSA PUBLIC KEY----- diff --git a/retiolum/hosts/kremu b/retiolum/hosts/kremu deleted file mode 100644 index 06df489f..00000000 --- a/retiolum/hosts/kremu +++ /dev/null @@ -1,10 +0,0 @@ -Subnet = 42:88ec:8968:cc6b:978a:68b7:1004:fc8a/128 -Subnet = 10.7.7.192 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAsdjqCyLvGfkIsawGji1CIIxGaKKdFhKJcfFK8FWiyQdgeNK/9UAh -XsJYkSHVcXqHAorP1QAvk5fIiSEEoSwoChyecqpNOREOnN8+N8RVrs0QIwL0mwa0 -9H4HDcpt8O8J0mpM8z8pb7vhDk261oMchG52TVYX4cuEgpEiyJtij27UIfOeVY8g -8kuJQG+9X7WNGMOt2Y8A7pXFf/+8qdwpOq5C0SIRPR5WplBeeF3BepzmUeq24XOE -cdF/ggYeU8hSYzr3DFX7g9u/gOjBQrhApopx6LR9TkpkrFfVcgLw3NaOzI2vQzqa -7m8v62D+/3vun3ZB/1OfQpIMfm77DC8AEQIDAQAB ------END RSA PUBLIC KEY----- -- cgit v1.2.3 From e47af39129fdca0f8268759a3bcfaa70fdd0ca90 Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 19 Oct 2011 10:30:40 +0200 Subject: retiolum/Makefile: reload tinc correctly --- retiolum/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/retiolum/Makefile b/retiolum/Makefile index 83c4ac12..effdbfb8 100644 --- a/retiolum/Makefile +++ b/retiolum/Makefile @@ -22,7 +22,8 @@ update: hosts @echo adding hosts bin/update_tinc_hosts restart @echo reloading tincd - pkill -HUP tincd || true + sudo pkill -HUP tincd || true + sudo pkill -ALRM tincd || true arch-install: update install arch-autostart autohosts -- cgit v1.2.3 From 6dee2fbae4b6ec96853bf2f6cef9aeb72db13b25 Mon Sep 17 00:00:00 2001 From: EUcancER Date: Thu, 20 Oct 2011 14:38:59 +0200 Subject: util/bin/magic: add usage --- util/bin/magic | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/util/bin/magic b/util/bin/magic index d3e86120..cb9cee6e 100755 --- a/util/bin/magic +++ b/util/bin/magic @@ -35,13 +35,33 @@ destroy() { echo "$cache" | sed "/^$bs$/,/^$es$/d" >$3 fi } +help() { +cat <&2 echo 'Error 1: You are made of stupid!' >&2 exit 23 esac -- cgit v1.2.3 From 2eaa8d33a8ef792a9c10543fe2551e0680ab97b7 Mon Sep 17 00:00:00 2001 From: momo Date: Mon, 24 Oct 2011 10:38:29 +0200 Subject: //shack/strom: initial commit --- shack/strom/main.py | 50 +++++++++++++++++++++++++++++++++++++++++++++ shack/strom/testdata | 24 ++++++++++++++++++++++ shack/strom/testdatacomment | 24 ++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 shack/strom/main.py create mode 100644 shack/strom/testdata create mode 100644 shack/strom/testdatacomment diff --git a/shack/strom/main.py b/shack/strom/main.py new file mode 100644 index 00000000..e1a85d02 --- /dev/null +++ b/shack/strom/main.py @@ -0,0 +1,50 @@ +#! /usr/bin/python +# -*- coding utf-8 -*- + +from __future__ import division + +import re + + +class Reader(object): + _re = re.compile(r'^(?P\d-\d:\d+\.\d+\.\d+\*\d+)\((?P\S+?)(?:\*[VAW])?\)$') + + def _convert_periode(value): + return int(value, 16) / 100 + + fields = { + '1-0:1.8.0*255': ('overall', float), + '1-0:31.7.0*255': ('l1_strom', float), + '1-0:32.7.0*255': ('l1_spannung', float), + '1-0:51.7.0*255': ('l2_strom', float), + '1-0:52.7.0*255': ('l2_spannung', float), + '1-0:71.7.0*255': ('l3_strom', float), + '1-0:72.7.0*255': ('l3_spannung', float), + '1-0:96.50.0*1': ('periode', _convert_periode), + } + + def __init__(self, f): + self._file = f + + def __iter__(self): + data = {} + for line in self._file: + line = line.strip() + if line == '!': + yield data + data = {} + continue + r = self._re.match(line) + if not r: + continue + field = self.fields.get(r.group('field')) + if field: + data[field[0]] = field[1](r.group('value')) + #uncomment to print unmapped values + #else: + # print r.groups() + + +data_file = open('testdata') +for data in Reader(data_file): + print data diff --git a/shack/strom/testdata b/shack/strom/testdata new file mode 100644 index 00000000..c4db6b5d --- /dev/null +++ b/shack/strom/testdata @@ -0,0 +1,24 @@ +/HAG5eHZ010C_IEnBWA02 + +1-0:0.0.0*255(20745965) +1-0:1.8.0*255(011107.1314) +1-0:96.5.5*255(82) +0-0:96.1.255*255(0000120120) +1-0:32.7.0*255(233.90*V) +1-0:52.7.0*255(233.07*V) +1-0:72.7.0*255(236.50*V) +1-0:31.7.0*255(004.99*A) +1-0:51.7.0*255(005.02*A) +1-0:71.7.0*255(007.14*A) +1-0:21.7.0*255(+00984*W) +1-0:41.7.0*255(+00966*W) +1-0:61.7.0*255(+01640*W) +1-0:96.50.0*0(EF) +1-0:96.50.0*1(07CE) +1-0:96.50.0*2(10) +1-0:96.50.0*3(0B) +1-0:96.50.0*4(28) +1-0:96.50.0*5(1D) +1-0:96.50.0*6(003D381B260A16F1F6FE560200009F80) +1-0:96.50.0*7(00) +! diff --git a/shack/strom/testdatacomment b/shack/strom/testdatacomment new file mode 100644 index 00000000..e453b98b --- /dev/null +++ b/shack/strom/testdatacomment @@ -0,0 +1,24 @@ +/HAG5eHZ010C_IEnBWA02 + +1-0:0.0.0*255(20745965) #Eigentumsnummer +1-0:1.8.0*255(011107.1314) #Zählerstand Bezug +1-0:96.5.5*255(82) #Zählerstand Lieferg +0-0:96.1.255*255(0000120120) #Status +1-0:32.7.0*255(233.90*V) #Spannung L1 +1-0:52.7.0*255(233.07*V) #Spannung L2 +1-0:72.7.0*255(236.50*V) #Spannung L3 +1-0:31.7.0*255(004.99*A) #Strom L1 +1-0:51.7.0*255(005.02*A) #Strom L2 +1-0:71.7.0*255(007.14*A) #Strom L3 +1-0:21.7.0*255(+00984*W) #Leistung L1 +1-0:41.7.0*255(+00966*W) #Leistung L2 +1-0:61.7.0*255(+01640*W) #Leistung L3 +1-0:96.50.0*0(EF) #Netzstatus +1-0:96.50.0*1(07CE) #Netzperiode (1/100ms) +1-0:96.50.0*2(10) #aktuelle Chiptemp. Zähler (hex, in °C) +1-0:96.50.0*3(0B) #min Chiptemp +1-0:96.50.0*4(28) #gemittelte Chiptemp +1-0:96.50.0*5(1D) #max. Chiptemp. +1-0:96.50.0*6(003D381B260A16F1F6FE560200009F80) #Kontrollnummer +1-0:96.50.0*7(00) #Diagnose +! #ENTE -- cgit v1.2.3 From b1fc61c5a6f819a7e6840f73eb57ca33c5af461c Mon Sep 17 00:00:00 2001 From: EUcancER Date: Tue, 25 Oct 2011 14:01:10 +0200 Subject: EUcancER -> euer --- retiolum/hosts/EUcancER | 11 ----------- retiolum/hosts/euer | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 retiolum/hosts/EUcancER create mode 100644 retiolum/hosts/euer diff --git a/retiolum/hosts/EUcancER b/retiolum/hosts/EUcancER deleted file mode 100644 index ae2d5f9d..00000000 --- a/retiolum/hosts/EUcancER +++ /dev/null @@ -1,11 +0,0 @@ -Address = 84.23.67.119 -Subnet = 10.7.7.144 -Subnet = 42:974a:3ecf:3c49:06c0:4cd1:3c6f:59d9/128 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEArx2mZOPEfS8fvmQYSzWuMmNtfposJlctDfGVmhMVotaFIpIBcKuL -dHZHI8BAStaM++DuqKv/QBjk9jF6BRAdZqHn98LHXR+VRJmFvgelEFe0uPvIRMe2 -IMzi9Ly0f0f5L90ulZBMkudl56nBcEPuG5ge9RLDINIX5nDVh0oQzvrwWaIiVuy/ -oKDFLaoxa3SSsCXbhnbP7ow37+xzvaVCFolu++yLHvinkCc5g3IUkBGwr3kXKHQ7 -J8oDuPgsDZ7d1kMPfzMtGI9xcq8GFeCmJsMAt86XsWD8t9ogQpVUi8NGjR4cbQSI -TbE2iVBsdGLpxbGh833uy7fW5CCnK79DwwIDAQAB ------END RSA PUBLIC KEY----- diff --git a/retiolum/hosts/euer b/retiolum/hosts/euer new file mode 100644 index 00000000..ae2d5f9d --- /dev/null +++ b/retiolum/hosts/euer @@ -0,0 +1,11 @@ +Address = 84.23.67.119 +Subnet = 10.7.7.144 +Subnet = 42:974a:3ecf:3c49:06c0:4cd1:3c6f:59d9/128 +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEArx2mZOPEfS8fvmQYSzWuMmNtfposJlctDfGVmhMVotaFIpIBcKuL +dHZHI8BAStaM++DuqKv/QBjk9jF6BRAdZqHn98LHXR+VRJmFvgelEFe0uPvIRMe2 +IMzi9Ly0f0f5L90ulZBMkudl56nBcEPuG5ge9RLDINIX5nDVh0oQzvrwWaIiVuy/ +oKDFLaoxa3SSsCXbhnbP7ow37+xzvaVCFolu++yLHvinkCc5g3IUkBGwr3kXKHQ7 +J8oDuPgsDZ7d1kMPfzMtGI9xcq8GFeCmJsMAt86XsWD8t9ogQpVUi8NGjR4cbQSI +TbE2iVBsdGLpxbGh833uy7fW5CCnK79DwwIDAQAB +-----END RSA PUBLIC KEY----- -- cgit v1.2.3