Volkszähler Zählerstand auswerten

Begonnen von hyper2910, 21 Juli 2017, 09:54:42

Vorheriges Thema - Nächstes Thema

hyper2910

danke aber das will alles nicht so.


Save config
Tablet-UI
0.1 OelHeizung
0.5 Zähler
1.00 Küche
2.00 Wohnzimmer
3.00 Schlafzimmer
3.50 Ankleide
4.00 Draussen
5.00 Badezimmer
6.00 Esszimmer
7.00 Flur Oben
8.00 Flur Unten
9.00 Anrufliste
9.01 CUL
9.02 Wetter
9.04 Anwesenheit
9.05 Kalender
9.06 Fritzbox
9.07 Trigger
9.08 Logs
9.09 Hilfe
9.10 Heizung
9.50 Alarm
ALEXA Control
AMAD
Homematic-Schalter
IT
Residents
Unsorted
alexa
icoEverything Everything
Logfile
Commandref
Remote doc
Edit files
Select style
Event monitor
DOIFtools
restart
update
updatecheck
reloadMyUtils
ReReadcfg
AMAD-Upd

Internals:
   BUSY       0
   CHANGED
   DEF        http://192.168.178.37:80/middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1
   Interval   300
   LASTSEND   1501570364.47014
   MainURL    http://192.168.178.37:80/middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1
   ModuleVersion 3.3.11 - 8.5.2017
   NAME       Zaehlerstand1234
   NR         1106
   STATE      ???
   TRIGGERTIME 1501570664.46664
   TRIGGERTIME_FMT 2017-08-01 08:57:44
   TYPE       HTTPMOD
   addr       http://192.168.178.37:80
   buf
   data
   displayurl http://192.168.178.37:80/middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1
   header
   host       192.168.178.37
   httpversion 1.0
   ignoreredirects 0
   loglevel   4
   path       /middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1
   protocol   http
   redirects  0
   timeout    2
   url        http://192.168.178.37:80/middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1
   value      0
   QUEUE:
   READINGS:
   REQUEST:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        http://192.168.178.37:80/middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1
     value      0
   sslargs:
Attributes:
   reading2Name consumption
   reading2Regex consumption.*?([\d\.]+)
   room       0.5 Zähler
   userattr   reading2JSON reading2Name reading2Regex
   verbose    5



aus dem Log

2017.08.01 08:50:43.479 5: Zaehlerstand1234: UpdateHintList called
2017.08.01 08:50:43.480 5: Zaehlerstand1234: UpdateHintList: setlist =
2017.08.01 08:50:43.480 5: Zaehlerstand1234: UpdateHintList: getlist =
2017.08.01 08:52:44.466 4: Zaehlerstand1234: GetUpdate called (update)
2017.08.01 08:52:44.467 4: Zaehlerstand1234: update timer modified: will call GetUpdate in 300.0 seconds at 2017-08-01 08:57:44
2017.08.01 08:52:44.468 4: Zaehlerstand1234: AddToQueue adds update, initial queue len: 0
2017.08.01 08:52:44.468 5: Zaehlerstand1234: AddToQueue adds type update to URL http://192.168.178.37:80/middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1, no data, no headers, retry 0
2017.08.01 08:52:44.469 5: Zaehlerstand1234: HandleSendQueue called, qlen = 1
2017.08.01 08:52:44.470 4: Zaehlerstand1234: HandleSendQueue sends request type update to URL http://192.168.178.37:80/middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1, No Data, No Header,
timeout 2
2017.08.01 08:52:44.471 4: HttpUtils url=http://192.168.178.37:80/middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1
2017.08.01 08:52:44.576 5: HttpUtils request header:
GET /middleware.php/data/5f9777b0-7d54-11e5-85cb-ab4d43be7dbc.json?from=1970&tuples=1 HTTP/1.0
Host: 192.168.178.37
User-Agent: fhem
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.08.01 08:52:46.584 3: Zaehlerstand1234: Read callback: Error: read from http://192.168.178.37:80 timed out
2017.08.01 08:52:46.585 4: Zaehlerstand1234: Read callback: request type was update retry 0, no headers, body empty
2017.08.01 08:52:46.586 5: Zaehlerstand1234: ExtractSid called, context reading, num
2017.08.01 08:52:46.587 4: Zaehlerstand1234: CheckAuth decided no authentication required

Cubietruck mit FHEM, CUL V3 443MHz, 2 x CULV3 868MHz, Milights, Max Heizungssteuerung, Homematic, IT,

amenomade

Hmmm.
Die Kalkulation / Aggregation, die er machen soll, um den gesamten Wert zu ergeben, dauert anscheinend zu lang. Deswegen:
Error: read from http://192.168.178.37:80 timed out
... oder dein Volkszähler Middleware ist ausgeschaltet.

Mach mal dazu attr timeout 10 oder 20... oder 30, bis Du eine Antwort bekommst.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

hyper2910

#32
danke jetzt funktioniert es.

Was ich nicht hinbekomme ich die Formatierung bzw. die Einheiten hinter das Reading zu stellen.

Ich mache das auch bei anderen Zählern und da funktioniert es einwandfrei. ich denke da ich noch etwas zu addiere klappt es nicht, kann mir jemand nochmals auf die Sprünge helfen?

Funktioniert einwanfrei
valueFormat
{'2_value' => '{sprintf("%.2f KW/h",$VALUE/1000)}','7_value' => '{("%.1f °C")}','8_value' => '{("%.1f °C")}'}


hier leider nicht

valueFormat
{'consumption' => '{sprintf("%.0f KW",$VALUE/1000)+159}'}

Cubietruck mit FHEM, CUL V3 443MHz, 2 x CULV3 868MHz, Milights, Max Heizungssteuerung, Homematic, IT,