76_SMAInverter.pm - Abfrage von SMA Wechselrichter

Begonnen von sct14675, 28 Juli 2016, 11:01:16

Vorheriges Thema - Nächstes Thema

DS_Starter

Hallo Marcel,

ja ist ein Schönheitsfehler. Da war eine VAriable nicht gesetzt + Folgefehler.
Aber das sollte eigentlich sehr selten vorkommen weil diese Variable m indests 0 sein sollte (im Normalfall).

Grüße
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

Xguide

Hallo Heiko,

wollte es nur kurz gesagt haben :-)

Gruß Marcel
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

Xguide

Moin Heiko,

sag mal, hast Du für den Schönheitsfehler einen Fix erstellt?
Tritt bei mir dann doch irgendwie etwas häufiger auf.


2019.04.19 12:13:23 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in numeric lt (<) at /opt/fhem//FHEM/76_SMAInverter.pm line 813.
2019.04.19 12:13:23 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in concatenation (.) or string at /opt/fhem//FHEM/76_SMAInverter.pm line 817.
2019.04.19 12:13:23 1: PERL WARNING: Argument "" isn't numeric in division (/) at (eval 1143615) line 2.
2019.04.19 12:14:07 1: PERL WARNING: Argument "" isn't numeric in addition (+) at (eval 1143644) line 2.
2019.04.20 21:32:31 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at /opt/fhem//FHEM/32_speedtest.pm line 140.
2019.04.21 10:51:46 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in numeric lt (<) at /opt/fhem//FHEM/76_SMAInverter.pm line 813.
2019.04.21 10:51:46 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in concatenation (.) or string at /opt/fhem//FHEM/76_SMAInverter.pm line 817.
2019.04.21 10:51:46 1: PERL WARNING: Argument "" isn't numeric in division (/) at (eval 1348609) line 2.
2019.04.21 10:52:31 1: PERL WARNING: Argument "" isn't numeric in addition (+) at (eval 1348633) line 2.
2019.04.21 10:56:22 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in numeric lt (<) at /opt/fhem//FHEM/76_SMAInverter.pm line 813.
2019.04.21 10:56:22 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in concatenation (.) or string at /opt/fhem//FHEM/76_SMAInverter.pm line 817.
2019.04.21 10:56:22 1: PERL WARNING: Argument "" isn't numeric in division (/) at (eval 1348970) line 2.
2019.04.21 10:57:07 1: PERL WARNING: Argument "" isn't numeric in addition (+) at (eval 1349007) line 2.
2019.04.21 11:11:42 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in numeric lt (<) at /opt/fhem//FHEM/76_SMAInverter.pm line 813.
2019.04.21 11:11:42 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in concatenation (.) or string at /opt/fhem//FHEM/76_SMAInverter.pm line 817.
2019.04.21 11:11:42 1: PERL WARNING: Argument "" isn't numeric in division (/) at (eval 1350287) line 2.
2019.04.21 11:12:27 1: PERL WARNING: Argument "" isn't numeric in addition (+) at (eval 1350317) line 2.
2019.04.22 19:06:29 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in numeric lt (<) at /opt/fhem//FHEM/76_SMAInverter.pm line 813.
2019.04.22 19:06:29 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in concatenation (.) or string at /opt/fhem//FHEM/76_SMAInverter.pm line 817.
2019.04.22 19:06:29 1: PERL WARNING: Argument "" isn't numeric in division (/) at (eval 1495381) line 2.
2019.04.22 19:07:14 1: PERL WARNING: Argument "" isn't numeric in addition (+) at (eval 1495420) line 2.
2019.04.22 19:12:37 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in numeric lt (<) at /opt/fhem//FHEM/76_SMAInverter.pm line 813.
2019.04.22 19:12:37 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in concatenation (.) or string at /opt/fhem//FHEM/76_SMAInverter.pm line 817.
2019.04.22 19:12:37 1: PERL WARNING: Argument "" isn't numeric in division (/) at (eval 1495876) line 2.
2019.04.22 19:13:22 1: PERL WARNING: Argument "" isn't numeric in addition (+) at (eval 1495908) line 2.
2019.04.22 19:46:20 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in numeric lt (<) at /opt/fhem//FHEM/76_SMAInverter.pm line 813.
2019.04.22 19:46:20 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in concatenation (.) or string at /opt/fhem//FHEM/76_SMAInverter.pm line 817.
2019.04.22 19:46:20 1: PERL WARNING: Argument "" isn't numeric in division (/) at (eval 1498649) line 2.
2019.04.22 19:47:05 1: PERL WARNING: Argument "" isn't numeric in addition (+) at (eval 1498680) line 2.
2019.04.22 20:57:37 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in numeric lt (<) at /opt/fhem//FHEM/76_SMAInverter.pm line 813.
2019.04.22 20:57:37 1: PERL WARNING: Use of uninitialized value $inv_SPOT_PACTOT in concatenation (.) or string at /opt/fhem//FHEM/76_SMAInverter.pm line 817.
2019.04.22 20:57:37 1: PERL WARNING: Argument "" isn't numeric in division (/) at (eval 1504046) line 2.
2019.04.22 20:58:22 1: PERL WARNING: Argument "" isn't numeric in addition (+) at (eval 1504074) line 2.



Danke und besten Gruß,

Marcel
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

DS_Starter

Das habe ich natürlich vergessen.
Ich versuche es am WE zu machen :-)
Heute ist FHEM Stammtisch und morgen nehme ich mir mal einen Tag frei  ;)

Grüße,
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

Xguide

Hallo Heiko,

kein Problem!
Wo findet denn euer Stammtisch statt?
Dir ein schönes langes Wochenende,

Marcel
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

DS_Starter

ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

Xguide

Leipzig, sehr schade, einfach zu weit weg.

Schönen Abend,

Marcel
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

DS_Starter

Hallo Marcel, @all,

ich habe die Warnings hoffentlich gefixt und eine Version zum Test in mein contrib geladen.
Du kannst die Version hier downloaden und dann restarten:

https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter  (Downloadbutton benutzen)

@Thomas (sct14675) ... das Modul müssten wir mal an die neuesten Entwicklungen in FHEM anpassen (Meta.pm, Installer.pm, direkte Attributhilfe etc.). Soll ich das bei Gelegenheit mal mit übernehmen ? Ich habe meine Module schon weitgehend angepasst, aber auch noch nicht ganz fertig.



Grüße,
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

Xguide

Guten Morgen Heiko,

sieht erst einmal gut aus - Danke!

Grüße Marcel
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

Vorhand

Danke für das Modul.
Auf  der Suche nach einem Helligkeitssensor für die Rolladensteuerung ASC, dachte ich an den Power-Wert der Solaranlage. Der Wert ist sogar im status meines SMATripower verfügbar. Hab den Wert mit einem readingsProxy herausgezogen und Solar benannt.
Bis ich bemerkte, dass der tausender mit einem Punkt abgesetzt ist und damit mein Rolladenprogramm anstatt 3756 nur 3.756 bekam. Nichts reagierte damit.
Ich half mir damit, den 5 min Mittelwert auszulesen, der wiederum liegt als ganze Zahl vor 3455, halt nur als Mittelwert.
Gibt es einen bestimmten Grund, manche Werte mit dem tausenderPunkt auszugeben?
Hat jemand einen Tip, wie ich so einen Wert wandeln kann?
Die Anleitung mit stateFormat usw. ist ganz schön kompliziert!
Danke.
Viele Grüße
Raspi,Homatic,ESP,Fronius,KIA-PHEV,DHW300,Mi,Shelly

Xguide

Nabend Vorhand,

der Punkt ist der Dezimaltrenner, oder? Habe ich noch nie anders gesehen, oder ich verstehe dein Problem gerade nicht. Ich aber i.d.R. aber auch nie mit den States selber, häufig modifiziere ich die und dann geht dein Vorhaben auch wieder schief.
Wie auch immer Du die Helligkeitssteuerung machst, kann Du Dir den Wert bspw. in einem notify mit readingsval aus einem anderen device abholen. Schau mal in die Doku.
Wenn Dir ein Wert in der Darstellung etc nicht passt, dann kannst du im Quelldevice auch ein usrreading dafür anlegen.

Bsp: für den SMA_Inverter:


SPOT_ETODAY_KW {sprintf("%.2f",ReadingsVal($name,"SPOT_ETODAY",0)/1000)}

Legt ein neues Reading an "SPOT_ETODAY_KW in dem der Wert nicht in W sondern in KW angezeigt wird. Wenn Du jetzt noch auf Nachkommastellen verzischten willst, dann könntest du bspw.


SPOT_ETODAY_KW {sprintf("%.0f",ReadingsVal($name,"SPOT_ETODAY",0)/1000)}

nutzen....

Gruß Marcel
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

Wzut

Zitat von: Vorhand am 05 Mai 2019, 18:01:45
Gibt es einen bestimmten Grund, manche Werte mit dem tausenderPunkt auszugeben?
Klar, aber bist auf dem Holzweg. Das ist kein Trennzeichen sondern ein Komma :)
FHEM Module benutzen keine Trennzeichen, dein Wert von  3.756 ist nicht Watt mit Trennzeichen sondern 3,756 kW
Brauchst du zur Weiterverarbeitung Watt lautet die geheime Zauberformel : Wert * 1000
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

Vorhand

Danke für die Antworten. Dass der Punkt ein Komma ist, hab ich verstanden. Mit dem Rest komme ich leider nicht klar. Offensichtlich hatte ich bisher die Welt der Umwandlung von Werten noch nicht betreten. In der Doku konnte ich kein vergleichbares (einfaches) Beispiel finden.
Bitte ergänze noch den Beispielcode, so dass ich den Wert für das Logfile und meine Rolläden benutzen kann.
Konkret erzeugt das Modul  - mySMATripower:state einen Wert zwischen 0.000 und 9.000 kW.
Ich benötige einen Wert etwa von 0 - 9000.

Übrigens war ein weiterer Effekt für mich unverständlich: define" Solar05 readingsProxy mySMATripower:avg_power-lastminutes_05" erzeugt einen Wert, dessen state sich nur mit dem attr event-on-change-reading änderte, aber im Logfile nicht verwendbar war (im Gegensatz zum ebenfalls erzeugten Wert Solar). Ich wollte mir im SVG die beiden Kurven gegenüberstellen. Mit dem "Originalwert" geht die Aufzeichnung.
Gehört hier wahrscheinlich nicht hin - trotzdem Danke.
Viele Grüße
Raspi,Homatic,ESP,Fronius,KIA-PHEV,DHW300,Mi,Shelly

Wzut

Tipp : Solange du allgemein fragst ( ich habe das und das gemacht ) bekommst auch allgemeine Antworten ( dann mach dies und jenes)
Wenn du exakte copy & paste Antworten erwartest dann mußt du schon komplette lists deiner betroffenen Geräte posten
d.h. wenn ich bis jetzt richtig gezählt habe sind das wohl mindestens drei : WR -> readingsProxy -> Rollo
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

Xguide

FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -