SMA Sunny Home Manager abfragen.

Begonnen von Brun, 07 Oktober 2014, 10:40:34

Vorheriges Thema - Nächstes Thema

Freee84neu

Hallo

bin heute über das Modul gelaufen, Und es läuft eigentlich auch alles soweit ich sehen jedoch wird mein Log alles 600 sek damit geflutet

2019.02.15 19:01:58 1: ERROR: empty name in readingsBeginUpdate
2019.02.15 19:01:58 1: stacktrace:
2019.02.15 19:01:58 1:     main::readingsBeginUpdate           called by ./FHEM/98_SHMForecast.pm (215)
2019.02.15 19:01:58 1:     main::SHMForecast_ParseDone         called by (eval 76183) (1)
2019.02.15 19:01:58 1:     (eval)                              called by fhem.pl (1132)
2019.02.15 19:01:58 1:     main::AnalyzePerlCommand            called by fhem.pl (1157)
2019.02.15 19:01:58 1:     main::AnalyzeCommand                called by fhem.pl (1079)
2019.02.15 19:01:58 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (255)
2019.02.15 19:01:58 1:     main::telnet_Read                   called by fhem.pl (3689)
2019.02.15 19:01:58 1:     main::CallFn                        called by fhem.pl (742)
2019.02.15 19:01:58 1: readingsUpdate(,Forecast-00-Consumption,1458) missed to call readingsBeginUpdate first.
2019.02.15 19:01:58 1: stacktrace:
2019.02.15 19:01:58 1:     main::readingsBulkUpdate            called by ./FHEM/98_SHMForecast.pm (236)
2019.02.15 19:01:58 1:     main::SHMForecast_ParseDone         called by (eval 76183) (1)
2019.02.15 19:01:58 1:     (eval)                              called by fhem.pl (1132)
2019.02.15 19:01:58 1:     main::AnalyzePerlCommand            called by fhem.pl (1157)
2019.02.15 19:01:58 1:     main::AnalyzeCommand                called by fhem.pl (1079)
2019.02.15 19:01:58 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (255)
2019.02.15 19:01:58 1:     main::telnet_Read                   called by fhem.pl (3689)
2019.02.15 19:01:58 1:     main::CallFn                        called by fhem.pl (742)
2019.02.15 19:01:58 1: readingsUpdate(,Forecast-00-PV,0) missed to call readingsBeginUpdate first.
2019.02.15 19:01:58 1: stacktrace:


und wenn ich ehrlich bin sagt mir das garnix.

mrdidib

Zitat von: Frahmi am 27 November 2018, 13:26:14
Moin,
ich habe das Modul eingerichtet wie beschrieben, aber erhalte immer die Meldung:  [ 'Updating of the live data was interrupted.' ]
Wodran kann das liegen?
defmod MySHM SHM XX@XXX XXXX 60 attr MySHM room Photovoltaik define FileLog_MySHM FileLog ./log/MySHM-%Y-%m.log MySHM attr FileLog_MySHM room SHM


VG

Moin,
ich habe das gleiche Problem und bekomme auch ständig die Warnung "Updating of the live data was interrupted" woran kann das liegen. Es läuft bei mir sehr instabil. Ohne das ich etwas ändere, werden mal die Daten gelesen und dann stockt es wieder.

Hier einige Auszüge aus dem Logfile.

2019-02-19_11:42:14 MySHM 0
2019-02-19_11:42:14 MySHM summary: 0
2019-02-19_11:44:00 MySHM InfoMessages: []
2019-02-19_11:44:00 MySHM Info: {}
2019-02-19_11:44:00 MySHM WarningMessages: [           'Updating of the live data was interrupted.'         ]
2019-02-19_11:44:00 MySHM __type: LiveDataUI
2019-02-19_11:44:00 MySHM ErrorMessages: []
2019-02-19_11:44:00 MySHM 0
2019-02-19_11:44:00 MySHM summary: 0
2019-02-19_11:46:33 MySHM 0
2019-02-19_11:46:33 MySHM summary: 0
2019-02-19_11:47:36 MySHM 0
2019-02-19_11:47:36 MySHM summary: 0
2019-02-19_11:48:37 MySHM 0
2019-02-19_11:48:37 MySHM summary: 0
2019-02-19_11:49:37 MySHM 0
2019-02-19_11:49:37 MySHM summary: 0


2019-02-19_15:55:18 MySHM Login-Status: Login successful
2019-02-19_15:56:21 MySHM PV: 119
2019-02-19_15:56:21 MySHM SelfConsumptionQuote: 100
2019-02-19_15:56:21 MySHM WarningMessages: []
2019-02-19_15:56:21 MySHM AutarkyQuote: 24
2019-02-19_15:56:21 MySHM SelfConsumption: 119
2019-02-19_15:56:21 MySHM TotalConsumption: 494
2019-02-19_15:56:21 MySHM GridConsumption: 375
2019-02-19_15:56:21 MySHM SelfSupply: 119
2019-02-19_15:56:21 MySHM -375
2019-02-19_15:56:21 MySHM summary: -375
2019-02-19_15:57:21 MySHM -375
2019-02-19_15:57:21 MySHM summary: -375
2019-02-19_15:58:21 MySHM ErrorMessages: [           'The current data cannot be retrieved from the PV system. Check the cabling and configuration of the following energy meters:<div class="liveModeErrorSub"><ul><li class="faultingCounter"><span>PV generation meter</span></il><li class="faultingCounter"><span>Feed-in meter</span></il><li class="faultingCounter"><span>External consumption meter</span></il></ul></div>'         ]
2019-02-19_15:58:21 MySHM InfoMessages: [           'The current consumption could not be determined. The current purchased electricity is unknown. '         ]
2019-02-19_15:58:21 MySHM -375
2019-02-19_15:58:21 MySHM summary: -375
2019-02-19_15:59:22 MySHM ErrorMessages: []
2019-02-19_15:59:22 MySHM AutarkyQuote: 15
2019-02-19_15:59:22 MySHM InfoMessages: []
2019-02-19_15:59:22 MySHM PV: 131
2019-02-19_15:59:22 MySHM SelfSupply: 131
2019-02-19_15:59:22 MySHM TotalConsumption: 877
2019-02-19_15:59:22 MySHM SelfConsumption: 131
2019-02-19_15:59:22 MySHM GridConsumption: 746
2019-02-19_15:59:22 MySHM -746
2019-02-19_15:59:22 MySHM summary: -746
2019-02-19_16:00:22 MySHM -746
2019-02-19_16:00:22 MySHM summary: -746
2019-02-19_16:01:22 MySHM -746
2019-02-19_16:01:22 MySHM summary: -746
2019-02-19_16:02:23 MySHM -746
2019-02-19_16:02:23 MySHM summary: -746


2019-02-19_16:55:59 MySHM summary: -614
2019-02-19_16:57:00 MySHM GridConsumption: 627
2019-02-19_16:57:00 MySHM SelfConsumption: 135
2019-02-19_16:57:00 MySHM TotalConsumption: 762
2019-02-19_16:57:00 MySHM SelfSupply: 135
2019-02-19_16:57:00 MySHM PV: 135
2019-02-19_16:57:00 MySHM -627
2019-02-19_16:57:00 MySHM summary: -627
2019-02-19_16:58:09 MySHM InfoMessages: [           'The current consumption could not be determined. The current purchased electricity is unknown. '         ]
2019-02-19_16:58:09 MySHM ErrorMessages: [           'The current data cannot be retrieved from the PV system. Check the cabling and configuration of the following energy meters:<div class="liveModeErrorSub"><ul><li class="faultingCounter"><span>PV generation meter</span></il><li class="faultingCounter"><span>Feed-in meter</span></il><li class="faultingCounter"><span>External consumption meter</span></il></ul></div>'         ]
2019-02-19_16:58:09 MySHM -627
2019-02-19_16:58:09 MySHM summary: -627
2019-02-19_16:59:09 MySHM SelfSupply: 118
2019-02-19_16:59:09 MySHM GridConsumption: 600
2019-02-19_16:59:09 MySHM TotalConsumption: 718
2019-02-19_16:59:09 MySHM SelfConsumption: 118
2019-02-19_16:59:09 MySHM ErrorMessages: []
2019-02-19_16:59:09 MySHM AutarkyQuote: 16
2019-02-19_16:59:09 MySHM PV: 118
2019-02-19_16:59:09 MySHM InfoMessages: []
2019-02-19_16:59:09 MySHM -600
2019-02-19_16:59:09 MySHM summary: -600
2019-02-19_17:00:09 MySHM SelfSupply: 76
2019-02-19_17:00:09 MySHM GridConsumption: 590
2019-02-19_17:00:09 MySHM SelfConsumption: 76
2019-02-19_17:00:09 MySHM TotalConsumption: 666
2019-02-19_17:00:09 MySHM AutarkyQuote: 11
2019-02-19_17:00:09 MySHM PV: 76
2019-02-19_17:00:09 MySHM -590


019-02-19_17:41:23 MySHM summary: -779
2019-02-19_17:42:23 MySHM TotalConsumption: 1097
2019-02-19_17:42:23 MySHM GridConsumption: 1097
2019-02-19_17:42:23 MySHM -1097
2019-02-19_17:42:23 MySHM summary: -1097
2019-02-19_17:43:23 MySHM WarningMessages: [           'Updating of the live data was interrupted.'         ]
2019-02-19_17:43:23 MySHM -1097
2019-02-19_17:43:23 MySHM summary: -1097
2019-02-19_17:44:24 MySHM -1097
2019-02-19_17:44:24 MySHM summary: -1097
2019-02-19_17:45:24 MySHM -1097
2019-02-19_17:45:24 MySHM summary: -1097
2019-02-19_17:46:24 MySHM -1097
2019-02-19_17:46:24 MySHM summary: -1097
2019-02-19_17:47:25 MySHM -1097
2019-02-19_17:47:25 MySHM summary: -1097
2019-02-19_17:48:25 MySHM -1097
2019-02-19_17:48:25 MySHM summary: -1097
2019-02-19_17:49:25 MySHM -1097
2019-02-19_17:49:25 MySHM summary: -1097


Hat jemand eine Idee woran es liegen kann?

Viele Grüße

Dietmar


mrdidib

Ich habe jetzt festgestellt, dass die Übertragung immer genau nach 1 Std. unterbrochen wird. Liegt das an SMA? Ich habe den Intervall der Abfrage schon auf 120 sec. angehoben, hilft aber nicht.

2019-02-19_16:42:54 MySHM Login-Status: Login successful
...
2019-02-19_17:43:23 MySHM WarningMessages: [           'Updating of the live data was interrupted.'         ]

2019-02-21_02:09:16 MySHM Login-Status: Login successful
...
2019-02-21_03:09:39 MySHM WarningMessages: [           'Updating of the live data was interrupted.'         ]

2019-02-21_08:43:45 MySHM Login-Status: Login successful
...
2019-02-21_09:44:10 MySHM WarningMessages: [           'Updating of the live data was interrupted.'         ]


Xguide

#318
Guten Morgen zusammen,

habt ihr das mit dem Löschen des Cookies berücksichtigt?
Ich habe seinerzeit einen Cronjob dafür angelegt und es läuft seit langer Zeit stabil, wobei ich die SHM Portalverbindung nur noch für den Forecast nutze und das Interval auf 10min gesetzt habe.

Gruß Marcel

***EDIT***
Das Cronjob Thema ist obsolete ab einer gewissen Version - mein Fehler! Kann über Attribute (attr) gesetzt werden.
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 -

mrdidib

Hi Marcel,

danke für deine schnelle Antwort. Ich beschäftige mich erst sei kurzem mit dem Raspi und FHEM. Wie richte ich den Cronjob, zum löschen der Cookies, ein? Gibt es dazu eine Beschreibung? Ich habe dazu leider nichts
gefunden?


In dem Thread habe ich wohl gelesen, dass es auch im Modul berücksichtigt sein soll. Ich habe die Version "V0.3.1" gibt es noch eine neuere?

Gruß

Dietmar

Xguide

#320
Hi Dietmar,

die Cookie-Thematik findest du ziemlich einfach, indem Du hier im Thread cookie in die Suche eingibst. Allerdings waren meine Erinnerungen nicht mehr auf dem letzten Stand.
In Post #275 schrieb ich schon mal:

Zitat
@Maximat und Bernd, mir ist aufgefallen das das Löschen per cronjob der mycookies.txt mit irgendeiner Version obsolete wurde, da es von DS_Starter im SHM-Modul implementiert wurde. Dafür muss das Attribut cookieLocation und cookielifetime entsprechend gesetzt werden.

Also nun die Frage, passt cookieLocation und die Lebenszeit?

Meine Einstellungen sehen wie folgt aus:
cookieLocation  /media/USBSTICK/FHEM_StateFile/mycookies.txt
cookielifetime 3100

oder das ganze List:

Internals:
   CFGFN      ./FHEM/msPV-Plant.cfg
   DEF        USERNAME PASSWORD 600
   FUUID      FUUID
   NAME       sunnyHomeManager
   NR         2063
   STATE      Battery: 97 % | PVprod: 7200 Wh | Cons: 288 Wh | Grid-: 0 Wh | Grid+: 6892 Wh
   TYPE       SHM
   interval   600
   password   PASSWORD
   username   USERNAME
   .attraggr:
   .attreocr:
     .*
   .attrminint:
   HELPER:
     oldlogintime 1551091190.59257
   READINGS:
     2019-02-25 12:09:49   AutarkyQuote    100
     2019-02-25 12:09:49   BatteryChargeStatus 97
     2019-02-25 12:09:49   BatteryIn       20
     2019-02-25 12:09:49   BatteryOut      0
     2019-02-25 12:09:49   DirectConsumption 288
     2019-02-25 12:09:49   DirectConsumptionQuote 4
     2019-02-25 12:09:49   ErrorMessages   
     2019-02-25 12:09:49   FeedIn          6892
     2019-02-25 12:09:49   GridConsumption 0
     2019-02-25 12:09:49   Info           
     2019-02-25 12:09:49   InfoMessages   
     2019-02-25 11:39:50   Login-Status    successful
     2019-02-25 12:09:49   PV              7200
     2019-02-25 12:09:49   SelfConsumption 308
     2019-02-25 12:09:49   SelfConsumptionQuote 4
     2019-02-25 12:09:49   SelfSupply      288
     2019-02-25 12:09:49   Timestamp       
     2019-02-25 12:09:49   TotalConsumption 288
     2019-02-25 12:09:49   WarningMessages
     2019-02-25 12:09:49   __type          LiveDataUI
     2019-02-25 12:09:49   state           6892
     2019-02-25 12:09:49   summary         6892
   helper:
Attributes:
   alias      PV Status
   cookieLocation /media/USBSTICK/FHEM_StateFile/mycookies.txt
   cookielifetime 3100
   event-on-change-reading .*
   group      SMA-Home Manager
   room       11_PV-Plant
   stateFormat Battery: BatteryChargeStatus % | PVprod: PV Wh | Cons: TotalConsumption Wh | Grid-: GridConsumption Wh | Grid+: FeedIn Wh
   verbose    0

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

#321
Hallo Freee84neu,

schon den Thread mit Post 298 - 308 gelesen?

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 -

mrdidib

Ich habe jetzt erstmal das Modul ausgetauscht und die Version genommen, die von DS_Starter angepasst wurde.  Jetzt läuft es seit über 2 Std. ohne Unterbrechung.

#####################################################################################################################################################
#
# A Module to read the values from the Sunny Portal Home Manager.
#
# FHEM Forum: http://forum.fhem.de/index.php/topic,27667.0.html
# FHEM Wiki:
#
# Author: Brun von der Gönne <brun at goenne dot de>
#
# !!!BETA!!! V0.3.1
#
# Cnangelog:
# V0.1.1:
#   - ignore "null" values
#   - add reading "summary" for state
# V0.1.2
#   - converting insted ignore "null" values
# V0.2
#   - use JSON
#   - add forecast from Sunny Portal
# V0.3
#   - disabled forecast because problems
#   - disabled ssl certificate checks
# V0.3.1
#   - changed User Agent
# V0.3.2
#   - add Loginstatus as reading (Thanx BerndArnold)
#
# Changes by DS_Starter
#   - use of BlockingCall to avoid blocking situations
#   - only one BlockingCall can be running
#   - added attribute "timeout" (default 30) for BlockingCall added
#   - added attribute "userAgent" to determine useragent entry (default: "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)"
#   - added attribute "disable" to disable the module temporary
#   - added attribute "cookieLocation" for path/name of cookiefile (default: "./log/mycookies.txt") - consider dependency of 98_SHMForecast.pm !
#   - enhanced log-entries for verbose-modes
#   - Testroutine of "Login failed" changed (only "Logincontrol1_ErrorLabel")
#   - all readings will be updated, not only changed readings data (see ($old_val ne $new_val) commented), it's for correct exposure in SVG diagram if
#     one value is "0" for a long time and goes then suddenly to a high value
#   - attribute "cookielifetime" and sub for deleting cookiefile added
#
################################################################################################################################


Mein Ziel ist es, eine Verbindung zwischen SHM und meinem Go-eCharger herzustellen, so das ich mein Elektroauto mit möglich viel PV-Strom laden kann. Bin mal gespannt, ob ich das hinbekomme. Für den go-echarger habe ich etwas gefunden, dass über HTTPMOD läuft.

Xguide

Das klingt doch erst einmal gut, sorry bin von der Version die Du jetzt hast ausgegangen.
Leider herrscht bei dem Modul, vorallem wenn es dann um die Prognosen geht (SHM_FORMCAST), etwas Unordnung.

Viel Erfolg und einen sonnigen Tag,

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 -

Waldmensch

Den Wechselrichter direkt abfragen, ohne das Portal, läuft aber wesentlich stabiler.


Gesendet von iPhone mit Tapatalk

mrdidib

Wenn das mit meinen Wechselrichtern geht?
- SB 4000TL-21 450
- STP 8000TL-20 194

Soweit ich weiß, läuft bei den Wechselrichtern die Kommunikation nur über Bluetooth. Ansonsten bin ich für alle Lösungen offen.

Xguide

Nabend zusammen,

zum SB kann ich nichts sagen, beim STP8000TL-20 sollte es wie bei meinem baugleichen 10000er gehen.
Allerdings geht Bluetooth und Speedwire gemeinsam nicht ohne Fehlermeldungen, deswegen habe ich Bluetooth deaktiviert und alles über Speedwire = Ethernet verkabelt. Die Schnittstelle ist da.
Über Bluetooth kommunizieren jetzt nur noch SHM und die SMA Steckdosen. Zum Deaktivieren von Bluetooth einfach die NodeID am SHM ändern und die Steckdosen umparametrieren.
Um Bluetooth nur am STP zu deaktivieren muss man ihn aufmachen, das wollte ich nicht.

Für Forecast finde ich dieses Modul trotzdem noch sehr gut, denn das liefern die anderen Module nicht.

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 -

DS_Starter

#327
Guten Abend,

über das Wochende hatte ich mich nochmal mit dem 98_SHM von Brun und dem 98_SHMForecastRelative von BerndArnold beschäftigt und wollte neben einer allgemeinen Verbesserung im Handling auch ein gemeinsames Modul aus beiden Teilen erstellen, da die jeweiligen Funktionen ohnehin zusammengehören.

Herausgekommen ist das Modul 76_SMAPortal, was ich in meinem contrib-Ordner zum Download bereitgestellt habe:

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

Der Name des Moduls ist nun auch ein Hinweis darauf, dass ein Portal abgerufen wird und nicht der Sunny Homemanager direkt.
Das Modul enthält eine deutsche Hlilfe die nach dem Download nach FHEM mit "help SMAPortal de" aufgerufen werden kann.

Hier ein Auszug welche Features es gibt:

* einfaches Define mit "define <name> SMAPortal"
* keine Angabe der Zugangsdaten im Define und auch nicht mehr in den Internals sichtbar
* Zugangsdaten werden durch "set <name> credentials" gesetzt und einem File unleserlich gespeichert. Sie können mit einem Get-Kommando angezeigt werden.
* Daten können automatisch per Intervall oder manuell (Notify / At) mit einem Get-Kommando abgerufen werden.
* die zu erstellenden Readings können durch Angabe von Detail-Levels quantifiziert werden

     L1    - nur Live-Daten werden generiert.
     L2    - Live-Daten und Prognose der nächsten 4 Stunden
     L3    - wie L2 und zusätzlich Daten des Resttages und Folgetages
     L4    - wie L3 und zusätzlich die detaillierte Prognose der nächsten 24 Stunden

* erweiterte Statusmeldungen gegenüber den Originalmodulen

Beispiel für eine Raw-Definition:


defmod Sonnenstrom SMAPortal
attr Sonnenstrom cookieLocation ./log/cookies.txt
attr Sonnenstrom cookielifetime 3000
attr Sonnenstrom detailLevel 3
attr Sonnenstrom disable 0
attr Sonnenstrom event-on-update-reading state,L1_FeedIn,L1_PV,L1_SelfSupply,L1_SelfConsumption,L1_SelfConsumptionQuote,L1_TotalConsumption,L1_GridConsumption,L1_AutarkyQuote
attr Sonnenstrom group Sunny Home Manager
attr Sonnenstrom interval 65
attr Sonnenstrom room Energie
attr Sonnenstrom stateFormat { ReadingsVal("$name","state", "") eq "disabled" ? ReadingsVal("$name","state", "") : ReadingsVal("$name","summary", 0)." W (+ ToGrid, - FromGrid) / PV-Prognose der nächsten 4 Stunden: ".ReadingsVal("$name","next04hours_state", 0)." Wh" }
attr Sonnenstrom timeout 200
attr Sonnenstrom verbose 3


Grüße,
Heiko
Proxmox+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

mrdidib

Danke Heiko, dass du dir Zeit genommen hast und das ganze noch weiterentwickelt hast. Die Hilfe funktioniert bei mir nicht. Wenn ich sie aufrufen, kommt:

"SMAPortal

Is coming soon..."

Mach ich was falsch oder ist die Hilfe noch nicht fertig?

Grüße

Dietmar

DS_Starter

Hallo Dietmar,

äh ... die deutsche Hilfe ist fertig. Wenn man man nicht global language = DE eingestellt hat, muss man aufrufen:

help SMAPortal de

Lg
Heiko
Proxmox+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