Hauptmenü

BenzinpreisMonitor

Begonnen von Phil__, 16 April 2014, 18:52:21

Vorheriges Thema - Nächstes Thema

Paul

Na in command kommt das rein ,wie du dir die Nachricht beim Neustart sendest
Cubietruck, HM-USB, CUL, FS20, FHT, HUE, Keymatic

benkler

#361
Ja das nachricht senden bekome ich hin, nur steige ich momentan nicht ganz durch, wie ich die Readings da rein bekomme...

Update:

so funktioniert es:

define SpritpreisePush at *17:00:00 {my $tanke1 = ReadingsVal("tanke1","SuperE10", "0");; my $tanke2 = ReadingsVal("tanke2","SuperE10", "0");; fhem ("set push msg 'Spritpreise' 'tanke1: $tanke1 €
tanke2: $tanke2 € ' '' 0 ''")}


natürlich muss vorher pushover eingerichtet sein im fall von diesem Beispiel als push :)

Grüße
Benkler
FHEM (Docker), Homebridge (Docker), Homematic IP, nanoCUL 433 + 868 a-culfw, jeeLink Clone, Diverse IT Sensoren, ems-esp, Netatmo und noch einiges mehr

ToM_ToM

Hey, weiß jemand von euch wie man im reading01Regex die Punkte durch ein Komma ersetzten kann?

Dass Benzinpreis = 1,499 statt 1.499 ist...

VG und frohe Ostern, Thomas
Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

ToM_ToM

Hier die Lösung um Komma durch Punkt zu ersetzen:

Zitat von: betateilchen am 29 März 2016, 15:12:28
Es funktioniert über den Umweg mit userReadings:

attr BenzinpreisePL_Apexim userReadings reading01User {my $v = ReadingsVal('BenzinpreisePL_Apexim','Apexim_SuperE5','');; $v =~ tr/,/./;; return $v;;}

(http://up.picr.de/25027967oc.jpg)

Großen Dank an betateilchen.
Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

en-trust

Blöde Frage, aber wie bekomme ich den Benzinmonitor in eine html seite eingebunden ?

readingGroup ist wie folgt aufgebaut...

define Spritpreise readingsGroup (OIL|star|Aral|JET):(SuperE5).*
attr Spritpreise group Spritpreisuebersicht
attr Spritpreise notime 1
attr Spritpreise room Spritpreise
# attr Spritpreise style style="font-size:16px"
attr Spritpreise valueFormat {'%.3f €'}
attr Spritpreise valueStyle {Werte($READING,$VALUE)}

Bin neu und arbeite mich gerade ein.

Gruss

perseusarm

Hallo Leute,

ich habe den Benzinpreismonitor so eingerichtet

#Benzinpreise
define Jet HTTPMOD http://www.clever-tanken.de/tankstelle_details/3471 600
attr Jet userattr reading01Name reading01Regex reading02Name reading02Regex
attr Jet enableControlSet 1
attr Jet group Spritpreise
attr Jet icon tanken
attr Jet reading01Name SuperE5
attr Jet reading01Regex <span>Super E5</span> [^0-9]+([0-9\.]+)
attr Jet reading02Name Diesel
attr Jet reading02Regex <span>Diesel</span> [^0-9]+([0-9\.]+)
attr Jet room Spritpreise
attr Jet stateFormat Liter_Diesel: Diesel
attr Jet timeout 5

...
...
Das Gleiche für "Tankpunkt"
...
...


Im Log habe ich aber:

2016.04.09 00:32:47 3: Jet: Read response to update didn't match any Reading
2016.04.09 00:32:48 3: Tankpunkt: Read response to update didn't match any Reading


Die Empfehlung aus einem vorherigen Thread mit

attr Jet enableControlSet 1

ist ja drinnen und ein
set Spritpreise upgradeAttributes
bringt die Meldung:
Unknown argument upgradeAttributes, choose one of visibility

Nach dem Update all
2016.04.09 00:47:37 1 :
2016.04.09 00:47:37 1 : fhem
2016.04.09 00:47:38 1 : nothing to do...
2016.04.09 00:47:38 1 :
2016.04.09 00:47:38 1 : fhemabfall
2016.04.09 00:47:39 1 : nothing to do...
hat sich leider nichts verändert.

Meine 98_HTTPMOD.pm  scheint auch aktuell zu sein:
# $Id: 98_HTTPMOD.pm 11002 2016-03-05 19:39:06Z ststrobel $

Keine Ahnung wo ich noch suchen soll. Könnte bitte mal jemand nachsehen wo ich ich was übersehene habe.
Vielen Dank
FHEM auf NUC, CUL866, HM-.*, Raspimatc, ...

perseusarm

Gelöst.
Ich hab nochmal komplett von vorne angefangen (laut http://www.fhemwiki.de/wiki/Spritpreismonitor) und jetzt klappts. Das Problem muss wohl ca. 40 cm vor dem Monitor gewesen sein.  ;)
FHEM auf NUC, CUL866, HM-.*, Raspimatc, ...

Marius82

Hallo,

ich schaffe es nicht das als 3.Kommastelle die 9 mit angezeigt wird.
Mein code:
define Buehne HTTPMOD http://www.clever-tanken.de/tankstelle_details/50302 600
attr Buehne userattr reading01Name reading01Regex reading02Name reading02Regex readingsExpr_Diesel readingsExpr_SuperE5
attr Buehne enableControlSet 1
attr Buehne group Spritpreise
attr Buehne icon tanken
attr Buehne reading01Name Diesel
attr Buehne reading01Regex <span>Diesel</span>[^0-9]+([0-9\.]+)
attr Buehne reading02Name SuperE5
attr Buehne reading02Regex <span>Super E5</span>[^0-9]+([0-9\.]+)
attr Buehne room Spritpreise
attr Buehne stateFormat Liter_Diesel: Diesel
attr Buehne timeout 5
attr Buehne readingsExpr_Diesel $val + 0.009
attr Buehne readingsExpr_SuperE5 $val + 0.009


define Spritpreise readingsGroup (Buehne|Deisel|Donig):(SuperE5|Diesel).*
attr Spritpreise group Spritpreisuebersicht
attr Spritpreise notime 1
attr Spritpreise room Spritpreise
attr Spritpreise style style="font-size:16px"
attr Spritpreise valueFormat {'%.2f €'}


Ich habe die beiden +0.009 wie im Wiki nachzulesen hinzu gebracht, es werden aber nur 2 Kommastellen angezeigt.
Kann mir jemand unter die Arme greifen?

Ich bin noch Anfänger...

Danke

benkler

#368
Hallo Marius82

du hast reading01 & reading02 dann brauchen die auch die Expr.

bei mir schaut das so aus


reading01Name SuperE10
reading01Regex <span>Super E10</span>[^0-9]+([0-9\.]+)
reading01Expr $val + 0.009



Gruß
benkler
FHEM (Docker), Homebridge (Docker), Homematic IP, nanoCUL 433 + 868 a-culfw, jeeLink Clone, Diverse IT Sensoren, ems-esp, Netatmo und noch einiges mehr

Marius82


frank

attr Spritpreise valueFormat {'%.2f €'}
warum schneidest du die 3. nachkommastelle dann in der readingsgroup eigentlich wieder ab?
FHEM: 6.0(SVN) => Pi3(buster)
IO: CUL433|CUL868|HMLAN|HMUSB2|HMUART
CUL_HM: CC-TC|CC-VD|SEC-SD|SEC-SC|SEC-RHS|Sw1PBU-FM|Sw1-FM|Dim1TPBU-FM|Dim1T-FM|ES-PMSw1-Pl
IT: ITZ500|ITT1500|ITR1500|GRR3500
WebUI [HMdeviceTools.js (hm.js)]: https://forum.fhem.de/index.php/topic,106959.0.html

Marius82

Noch eine Frage:
Im Wiki zum Spritpreismonitor wird zB. "attr Jet icon tanken" angegeben.
Das Icon "tanken" ist aber nicht in der Auswahl vorhanden, oder verstehe ich da etwas falsch?

Danke

moonsorrox

Ich habe seit einigen Tagen im Log immer diese Meldungen, hat das noch jemand..?
Wurde bei clever Tanken etwas umgestellt..?

2016.05.08 12:43:16 3: Real: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Real: the attribute readingsRegex_SuperE5 should no longer be used. Please use reading01Regex syntax instead
2016.05.08 12:43:16 3: Real: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Real: the attribute readingsRegex_Diesel should no longer be used. Please use reading01Regex syntax instead
2016.05.08 12:43:16 3: Real: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Real: the attribute readingsName_SuperE5 should no longer be used. Please use reading01Name syntax instead
2016.05.08 12:43:16 3: Real: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Real: the attribute readingsName_Diesel should no longer be used. Please use reading01Name syntax instead
2016.05.08 12:43:16 3: Real: Defined with URL http://www.clever-tanken.de/tankstelle_details/3884 and interval 1800
2016.05.08 12:43:16 3: Famila: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Famila: the attribute readingsRegex_SuperE5 should no longer be used. Please use reading01Regex syntax instead
2016.05.08 12:43:16 3: Famila: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Famila: the attribute readingsRegex_Diesel should no longer be used. Please use reading01Regex syntax instead
2016.05.08 12:43:16 3: Famila: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Famila: the attribute readingsName_SuperE5 should no longer be used. Please use reading01Name syntax instead
2016.05.08 12:43:16 3: Famila: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Famila: the attribute readingsName_Diesel should no longer be used. Please use reading01Name syntax instead
2016.05.08 12:43:16 3: Famila: Defined with URL http://www.clever-tanken.de/tankstelle_details/52793 and interval 1800
2016.05.08 12:43:16 3: HEM: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: HEM: the attribute readingsRegex_SuperE5 should no longer be used. Please use reading01Regex syntax instead
2016.05.08 12:43:16 3: HEM: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: HEM: the attribute readingsRegex_Diesel should no longer be used. Please use reading01Regex syntax instead
2016.05.08 12:43:16 3: HEM: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: HEM: the attribute readingsName_SuperE5 should no longer be used. Please use reading01Name syntax instead
2016.05.08 12:43:16 3: HEM: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: HEM: the attribute readingsName_Diesel should no longer be used. Please use reading01Name syntax instead
2016.05.08 12:43:16 3: HEM: Defined with URL http://www.clever-tanken.de/tankstelle_details/4881 and interval 1800
2016.05.08 12:43:16 3: Star: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Star: the attribute readingsRegex_SuperE5 should no longer be used. Please use reading01Regex syntax instead
2016.05.08 12:43:16 3: Star: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Star: the attribute readingsRegex_Diesel should no longer be used. Please use reading01Regex syntax instead
2016.05.08 12:43:16 3: Star: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Star: the attribute readingsName_SuperE5 should no longer be used. Please use reading01Name syntax instead
2016.05.08 12:43:16 3: Star: For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
2016.05.08 12:43:16 3: Star: the attribute readingsName_Diesel should no longer be used. Please use reading01Name syntax instead
2016.05.08 12:43:16 3: Star: Defined with URL http://www.clever-tanken.de/tankstelle_details/14638 and interval 1800
Intel-NUC i5: FHEM-Server 6.1 :: Perl v5.18.2

Homematic: HM-USB-CFG2,HM-CFG-LAN Adapter, HM-LC-BL1-FM, HM-LC-Sw1PBU-FM, HM-LC-Sw1-PI-2, HM-WDS10-TH-O, HM-CC-TC, HM-LC-SW2-FM

betateilchen

Zitat von: moonsorrox am 08 Mai 2016, 12:49:57
Ich habe seit einigen Tagen im Log immer diese Meldungen, hat das noch jemand..?
Wurde bei clever Tanken etwas umgestellt..?

nein, aber bei HTTPMOD. Mach doch einfach das, was Dir in den Logmeldungen empfohlen wird:

For most old attributes you can specify enableControlSet and then set device upgradeAttributes to automatically modify the configuration
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

moonsorrox

ich habe da ewig nichts verändert und es funktioniert ja auch alles..! ich sehe eben nur die letzten Tage diese Logmeldungen

Aber die Attribute für eine einzelne Abfrage erschlagen einen ja förmlich - ich glaube es sind einige an oder über die 100, ehe ich da rumfummel lasse ich das doch lieber  ;)
Intel-NUC i5: FHEM-Server 6.1 :: Perl v5.18.2

Homematic: HM-USB-CFG2,HM-CFG-LAN Adapter, HM-LC-BL1-FM, HM-LC-Sw1PBU-FM, HM-LC-Sw1-PI-2, HM-WDS10-TH-O, HM-CC-TC, HM-LC-SW2-FM