SMA Sunny Home Manager abfragen.

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

Vorheriges Thema - Nächstes Thema

maximat0

Nach einer Seitenaktualisierung bekomme ich den Login-Status auf succesfull aber keinerlei Readings mehr. Die bleiben auf dem Datum 22.3. 18:04 Uhr stehen. Ich suche schon den halben Tag rum.
Hat jamand ne Idee?

BerndArnold

Zitat von: maximat0 am 24 März 2017, 19:35:45
Nach einer Seitenaktualisierung bekomme ich den Login-Status auf succesfull aber keinerlei Readings mehr. Die bleiben auf dem Datum 22.3. 18:04 Uhr stehen. Ich suche schon den halben Tag rum.
Hat jamand ne Idee?

Sorry, da muss ich passen. Bei mir werden die Readings bis gerade eben alle aktualisiert.

Was genau meinst du mit "Seitenaktualisierung"?

PS.: ich habe die Module von DS_Starter im Einsatz, die seit ca. April 2016 tadellos funktionieren.
FHEM auf Raspberry Pi mit Arch Linux
2x HM-LAN, 1x CUL
HomeMatic, FS20, Dreambox, Fritzbox
MQTT zur Kommunikation mit zweiter und dritter FHEM-Instanz

maximat0

Es lief alles ohne dass ich etwas verändert hatte bis zum 22.3. 18:04.
Von da an wird nur der Login alle 60 sek als succesfull angezeigt, alle anderen Werte stehen auf 22.3.
Welches sind die Module von ds_starter?
Ich hab noch die, die hier im Forum auf der ersten Seite von Brun vom 9. März 2016 stehen.
Kann es an einem Update von FHEM liegen?
Vielen Dank fürs Kümmern.
Seitenaktualisierung: bei meinem Firefox werden die aktualisierten Readings nur nach manuellem Seite neu laden angezeigt.
Ich nehme jetzt Safari

Xguide

Auf meinem Testsystem läuft die Version V0.3.2 ohne Probleme  (Versionsinfo aus dem Kopf kopiert)


##############################################
#
# 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
#
# Cahngelog:
# 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)
#
##############################################
# Definition: define <name> SHM <user> <password> (<delay>)
#
##############################################



Löscht du die mycookies.txt zyklisch?
Poste doch auch noch mal ein "list devicename" Ergebnis. Devicename = Name der shm Instanz.

Gruß Marcel

PS: mein List anbei:


Internals:
   CHANGED
   DEF        BENUTZERNAME KENNWORT 60
   NAME       sunnyHomeManager
   NR         181
   STATE      Battery: 91 % | PVprod: 665 Wh | Cons: 396 Wh | Grid-: 0 Wh | Grid+: 269 Wh
   TYPE       SHM
   interval   60
   password   KENNWORT
   username   BENUTZERNAME
   Readings:
     2017-04-11 15:37:08   AutarkyQuote    100
     2017-04-11 15:36:07   BatteryChargeStatus 91
     2017-04-11 15:21:59   BatteryIn       0
     2017-04-11 15:37:08   BatteryOut      0
     2017-04-11 15:37:08   DirectConsumption 396
     2017-04-11 15:37:08   DirectConsumptionQuote 60
     2017-04-11 15:21:59   ErrorMessages   []
     2017-04-11 15:37:08   FeedIn          269
     2017-04-11 15:37:08   GridConsumption 0
     2016-03-12 00:10:03   Info            {}
     2017-04-11 15:21:59   InfoMessages    []
     2017-04-11 15:35:09   Login-Status    Login successful
     2017-04-11 15:37:08   PV              665
     2017-04-11 15:37:08   SelfConsumption 396
     2017-04-11 15:37:08   SelfConsumptionQuote 60
     2017-04-11 15:37:08   SelfSupply      396
     2017-04-11 15:37:08   TotalConsumption 396
     2017-04-11 15:21:59   WarningMessages []
     2016-03-12 00:10:03   __type          LiveDataUI
     2017-04-11 15:37:11   state           269
     2017-04-11 15:37:11   summary         269
Attributes:
   alias      PV Status
   event-on-change-reading .*
   group      Sunny 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 -

BerndArnold

Zitat von: Xguide am 11 April 2017, 15:38:56
Löscht du die mycookies.txt zyklisch?

Nein, nicht bewusst.

Zitat von: Xguide am 11 April 2017, 15:38:56
   STATE      Battery: 91 % | PVprod: 665 Wh | Cons: 396 Wh | Grid-: 0 Wh | Grid+: 269 Wh
...
   stateFormat Battery: BatteryChargeStatus % | PVprod: PV Wh | Cons: TotalConsumption Wh | Grid-: GridConsumption Wh | Grid+: FeedIn Wh

Danke, Marcel, für den stateFormat. Sieht richtig klasse aus und habe ich gleich bei mir übernommen!

Zitat von: maximat0 am 31 März 2017, 19:49:26
Es lief alles ohne dass ich etwas verändert hatte bis zum 22.3. 18:04.
Von da an wird nur der Login alle 60 sek als succesfull angezeigt, alle anderen Werte stehen auf 22.3.
Welches sind die Module von ds_starter?
Ich hab noch die, die hier im Forum auf der ersten Seite von Brun vom 9. März 2016 stehen.
Kann es an einem Update von FHEM liegen?
Vielen Dank fürs Kümmern.
Seitenaktualisierung: bei meinem Firefox werden die aktualisierten Readings nur nach manuellem Seite neu laden angezeigt.
Ich nehme jetzt Safari

ds_starter hatte noch ein paar Optimierungen eingebaut. Genau kann ich es nicht mehr sagen, weil es mittlerweile 1 Jahr her ist (Änderungsdatum der Dateien) :)

Ein Update von Fhem schließe ich mal soweit aus, als dass ich Fhem auch aktuell habe und es damit keine Probleme gibt.

Ich füge euch hier mal die Dateien an, so wie ich sie einsetze...

Viele Grüße
Bernd
FHEM auf Raspberry Pi mit Arch Linux
2x HM-LAN, 1x CUL
HomeMatic, FS20, Dreambox, Fritzbox
MQTT zur Kommunikation mit zweiter und dritter FHEM-Instanz

Xguide

#275
Hallo zusammen,

ich habe es lange vor mir hingeschoben, doch heute bin ich mal dazu gekommen.
Ich hatte die SHM-Abfrage lange Zeit auf einem 2. Raspberry Pi laufen und habe die Werte via FHEM2FHEM an meine Hauptinstanz übertragen, dies war der damaligen Performance von SHM geschuldet. Ich vermute mal hier ist auch der Durchbruch mit der Umstellung auf Non-Blocking gelungen, zumindest hat DS_STARTER das bei SMAInverter und SMAEnergyMeter hervoragend hinbekommen. Zumindest ist mir bei meinem Post am 11.April aufgefallen, dass mein Testsystem nur noch wg. des SHM, speziell hier wg. dem Forecast welches ich im TabletUI visualisiere, dauerhaft läuft.
Dafür einen 2. Rapi dauerhaft laufen zu lassen macht irgendwie kein Sinn, also ist das SHM & SHM_Forecast Modul heute umgezogen und ich habe noch ForecastRelative neu entdeckt.

Mir ist aufgefallen das es ziemlich viele verschieden Versionen von:

  • 98_SHM.pm
  • 98_SHMForecast.pm
gibt und die Revisionierung mit Versionsnummern nicht gerade übersichtlich ist. Ich habe mal versucht meine Version (entspricht ca. der DS_STARTER Version gepsotet am "« Antwort #251 am: 01 April 2016, 21:42:20 »") mit der von BerndArnold geposteten Version zusammenzuführen (« am: 14 April 2017, 16:02:54 ») was auch für SHM.pm recht gut geklappt hat, bei Forecast und ForecastRelative habe ich aber das Problem, dass a[2], was ja der Name der SHM Instanz aus dem Define sein soll, nicht wirklich funktioniert. Ich habe das bei mir jetzt hardcoded gemacht und es scheint zu laufen.

Ferner habe ich noch eine dauerhafte Meldung "Use of uninitialized value" von SHM und SHMForeCast bekommen.
Ich habe sub SHM_ParseData (ca. Zeile 257ff) wie folgt modifiziert und die Meldung damit eliminiert:

        if (($homemanager_content->{$homemanger_name} =~ m/ARRAY/i) || ($homemanager_content->{$homemanger_name} =~ m/HASH/i)) {
         
  my ($homemanager_dumper0,$homemanager_dumper1) = split(/ = /,Dumper($homemanager_content->{$homemanger_name}));
#          chomp $homemanager_dumper1;
#          $homemanager_dumper1 =~ s/\;//g;
#          $new_val = $homemanager_dumper1;  
  if (defined $homemanager_dumper1) {
            $homemanager_dumper1 =~ s/\;//g;
$new_val = $homemanager_dumper1;
  }
        }

Analog dazu habe ich das in SHMForecast gemacht (sub SHMForecast_DoParse (ca. Zeile 125))

    my $homemanager = JSON->new->utf8->decode($homemanager_page->content);
    for my $homemanger_name (keys %$homemanager) {
      if (defined $homemanager->{$homemanger_name}) {
        if (($homemanager->{$homemanger_name} =~ m/ARRAY/i) || ($homemanager->{$homemanger_name} =~ m/HASH/i)) {
          my ($homemanager_dumper0,$homemanager_dumper1) = split(/ = /,Dumper($homemanager->{$homemanger_name}));
  if (defined $homemanager_dumper1) {
            $homemanager_dumper1 =~ s/\;//g;
  }  
        }
      }
    }


@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.
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 -

maximat0

Hallo, vielen Dank für die Hinweise. Ich habe nun das Problem gelöst. Ich habe mich bei sma mit einem weiteren Benutzer angemeldet und diesen für  98_SHM Modul genommen und vorsichtshalber die Readings auf 60 Sekunden eingestellt (vorher waren es 15 Sekunden). Seit ein paar Tagen läuft es fehlerfrei.

assi05

Hallo zusammen,

das ist (glaube ich) mein erster Beitrag - ich lese schon eine ganze Zeit mit und habe mittlerweile einen Signalduino gebaut und erfolgreich mit Somfy eingebunden - ich verstehe also langsam, wie FHEM funktioniert.

Leider komme ich mit dem Modul 98_SHM nicht klar! Der Forecast läuft, aber das eigentliche SHM-Modul greift sich immer einen Wert und updatet dann nicht mehr. Intervall auf 60.

Auch habe ich wie in den letzten Beiträgen beschrieben verschiedene Versionen der 98_SHM.pm versucht, leider vergebens.

Gefühlt (nicht reproduzierbar) funktioniert es ein paar Stunden und friert dann ein.

Aktuelle Ausagbe:

defmod Strom SHM xxxxxxxxx@gmail.com PASSWORT 60
attr Strom room Strom
attr Strom verbose 5

setstate Strom 0
setstate Strom 2017-05-07 10:13:34 FeedIn 0
setstate Strom 2017-05-07 10:13:34 GridConsumption 0
setstate Strom 2017-05-07 10:12:12 __type LiveDataUI
setstate Strom 2017-05-07 13:07:41 state 0
setstate Strom 2017-05-07 13:07:41 summary 0

State und Summary bekommen regelmäßig ein Update, aber keine Werte (oft freezt das bei einem Wert wie z.B. 1.633 anstelle der "0")

Event Monitor:

2017-05-07 13:19:51 SHM Strom 0
2017-05-07 13:19:51 SHM Strom summary: 0
2017-05-07 13:20:52 SHM Strom 0
2017-05-07 13:20:52 SHM Strom summary: 0
2017-05-07 13:21:12 SHMForecast Stromforecast plantOid: blablablabla
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-00-Consumption: 203
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-00-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-00-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-00: -203
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-01-Consumption: 196
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-01-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-01-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-01: -196
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-02-Consumption: 189
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-02-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-02-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-02: -189
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-03-Consumption: 191
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-03-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-03-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-03: -191
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-04-Consumption: 200
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-04-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-04-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-04: -200
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-05-Consumption: 182
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-05-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-05-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-05: -182
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-06-Consumption: 193
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-06-PV: 45
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-06-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-06: -148
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-07-Consumption: 243
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-07-PV: 426
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-07-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-07: 183
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-08-Consumption: 442
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-08-PV: 639
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-08-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-08: 197
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-09-Consumption: 306
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-09-PV: 852
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-09-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-09: 545
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-10-Consumption: 689
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-10-PV: 1081
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-10-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-10: 392
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-11-Consumption: 2073
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-11-PV: 941
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-11-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-11: -1131
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-12-Consumption: 1492
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-12-PV: 1421
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-12-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-12: -70
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-13-Consumption: 1849
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-13-PV: 1364
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-13-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-13: -485
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-14-Consumption: 962
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-14-PV: 1405
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-14-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-14: 443
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-15-Consumption: 805
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-15-PV: 1372
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-15-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-15: 567
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-16-Consumption: 803
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-16-PV: 1126
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-16-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-16: 322
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-17-Consumption: 844
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-17-PV: 683
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-17-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-17: -160
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-18-Consumption: 792
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-18-PV: 395
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-18-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-18: -397
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-19-Consumption: 501
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-19-PV: 156
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-19-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-19: -345
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-20-Consumption: 519
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-20-PV: 36
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-20-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-20: -483
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-21-Consumption: 486
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-21-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-21-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-21: -486
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-22-Consumption: 418
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-22-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-22-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-22: -418
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-23-Consumption: 334
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-23-PV: 0
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-23-IsConsumptionRecommended: no
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-23: -334
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-Today-Consumption: 14912
2017-05-07 13:21:12 SHMForecast Stromforecast Forecast-Today-PV: 11942
2017-05-07 13:21:12 SHMForecast Stromforecast 11942
2017-05-07 13:21:12 SHMForecast Stromforecast STATE: 11942
2017-05-07 13:21:12 SHMForecast Stromforecast summary: -2970
2017-05-07 13:21:53 SHM Strom 0
2017-05-07 13:21:53 SHM Strom summary: 0


Abfrage im Sunnyportal funktioniert einwandfrei.


Forecast funktioniert hingegen meines Erachtens:


Was mache ich falsch? Oder hat SMA hier etwas aktiviert, um die Abfragen zu unterbinden?

Ich bin für jede Hilfe dankbar, da ich ENDLICH meine Luft-Luft und Luft-Wasser-Wärmepumpen intelligent zwischen unterschiedlichen Stromkreisläufen mit SONOFF hin- und her schalten möchte, also wirklich einen $$$$-Nutzen dadurch habe.

DANKE vorab für Ideen und Vorschläge!


Xguide

Hallo assi05,

Hast du beim shm die cookielifetime gesetzt, bzw. löscht du die Datei via cronjob?

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 -

assi05

Hallo Marcel,

nein, das hab' ich nicht. Im Forum meine ich gelesen zu haben, dass das mit einer neueren Revision von 98_SHM nicht mehr nötig ist?!

Habe eben kurz gegoogelt, aber: Wie mache ich das?

Gruß
Joe

Xguide

Ich habe bei mir
- cookieLocation pfad
- cookielifetime 3100
gesetzt.
Ich kann dir später auch noch ein list schicken, bin aber gerade unterwegs.
Du kannst ja mal bei blockiertem shm das mycookies.txt file manuell löschen, wenn es dann bei der nächsten Abfrage wieder klappt, dann weisst du woran es liegt.

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 -

assi05

Marcel, Du bist der BESTE!! :)

attr Strom cookielifetime 100
attr Strom room Strom
attr Strom verbose 5

setstate Strom 1599
setstate Strom 2017-05-07 14:21:44 AutarkyQuote 100
setstate Strom 2017-05-07 14:21:44 FeedIn 1599
setstate Strom 2017-05-07 14:21:44 GridConsumption 0
setstate Strom 2017-05-07 14:20:40 Login-Status successful
setstate Strom 2017-05-07 14:21:44 PV 2160
setstate Strom 2017-05-07 14:21:44 SelfConsumption 561
setstate Strom 2017-05-07 14:21:44 SelfConsumptionQuote 26
setstate Strom 2017-05-07 14:21:44 SelfSupply 561
setstate Strom 2017-05-07 14:21:44 TotalConsumption 561
setstate Strom 2017-05-07 14:21:44 __type LiveDataUI
setstate Strom 2017-05-07 14:21:44 state 1599
setstate Strom 2017-05-07 14:21:44 summary 1599

2017.05.07 14:26:23 5 : Strom -> SelfConsumption - 395
2017.05.07 14:26:23 5 : Strom -> WarningMessages -
2017.05.07 14:26:23 5 : Strom -> AutarkyQuote - 100
2017.05.07 14:26:23 5 : Strom -> __type - LiveDataUI
2017.05.07 14:26:23 5 : Strom -> Timestamp -
2017.05.07 14:26:23 5 : Strom -> GridConsumption - 0
2017.05.07 14:26:23 5 : Strom -> SelfSupply - 395
2017.05.07 14:26:23 5 : Strom -> TotalConsumption - 395
2017.05.07 14:26:23 5 : Strom -> Info -
2017.05.07 14:26:23 5 : Strom -> SelfConsumptionQuote - 18
2017.05.07 14:26:23 5 : Strom -> ErrorMessages -
2017.05.07 14:26:23 5 : Strom -> FeedIn - 1765
2017.05.07 14:26:23 5 : Strom -> InfoMessages -
2017.05.07 14:26:23 5 : Strom -> PV - 2160
2017-05-07 14:26:23 SHM Strom SelfConsumption: 395
2017-05-07 14:26:23 SHM Strom AutarkyQuote: 100
2017-05-07 14:26:23 SHM Strom __type: LiveDataUI
2017-05-07 14:26:23 SHM Strom GridConsumption: 0
2017-05-07 14:26:23 SHM Strom SelfSupply: 395<br> 2017-05-07 14:26:23 SHM Strom TotalConsumption: 395
2017-05-07 14:26:23 SHM Strom SelfConsumptionQuote: 18
2017-05-07 14:26:23 SHM Strom FeedIn: 1765
2017-05-07 14:26:23 SHM Strom PV: 2160
2017-05-07 14:26:23 SHM Strom 1765
2017-05-07 14:26:23 SHM Strom summary: 1765
2017.05.07 14:26:23 4 : Strom BlockingCall SHM_ParseData finished


Scheint also auf jeden Fall am Cookie zu liegen! Habe mal den Intervall auf 70 und zu Testzwecken DeleteCookie auf 100.

Werde das mal beobachten, aber nochmals DANKE! Ich bin echt Tage davor gesessen.... :(

Gruß
Joe

Xguide

Freut mich das es jetzt geht!
Einen sonnigen Restsonntag,

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 -

pewen

#283
Hallo Zusammen,
nachdem ich FHEM auf meiner DS211j installiert und erfolgreich mit den Phillips HUE Komponenten verbunden habe,
möchte ich nun den SHM mit einbinden um die Pool Stecksose die am HUE hängt zu steuern.
Der Login auf das Portal ist auch erfolgreich, doch im SHM Log finde ich nur das erfolgreiche Logon und keine weiteren Daten.
Das allgemeine Log zeigt das schon mehr, besonders mit dem verbose=5. Nur kann ich leider mit den Infos, da ich noch neu mit fhem bin nicht wirklich was anfangen.
Hat jemand einen Tip für mich? Schaue ich an der falschen Stelle?
PS
Update auf 5.8 habe ich gemacht.

CFG:
   DEF        BENUTZER KENNWORT 60
   NAME       EweSHM
   NR         39
   STATE      ???
   TYPE       SHM
   interval   60
   password   KENNWORT
   username   BENUTZER
   Helper:
     oldlogintime 1496745493.89455
   Readings:
     2017-06-02 18:49:58   FeedIn          0
     2017-06-02 18:49:58   GridConsumption 0
     2017-06-06 12:38:13   Login-Status    successful
   Helper:
Attributes:
   cookieLocation ./opt/cookies/mycookies.txt
   cookielifetime 3100
   room       SHM
   timeout    200
   verbose    5 

Log:
2017.06.06 12:31:43 3: EweSHM - not logged in. try to login...
2017.06.06 12:31:44 4: EweSHM -> 302
2017.06.06 12:31:44 3: EweSHM - login to SMA-Portal successful, get data when ne                                                                                                 xt cycle runs
2017.06.06 12:31:46 4: EweSHM SHM_GetData homemanager_content: {"Login-Status":"                                                                                                 successful"}
2017.06.06 12:31:46 4: EweSHM BlockingCall SHM_GetData finished
2017.06.06 12:31:50 4: EweSHM Start BlockingCall SHM_ParseData
2017.06.06 12:31:51 4: EweSHM BlockingCall SHM_ParseData finished
2017.06.06 12:32:51 3: EweSHM - not logged in. try to login...
2017.06.06 12:32:52 4: EweSHM -> 302
2017.06.06 12:32:52 3: EweSHM - login to SMA-Portal successful, get data when next cycle                                                                                          runs
2017.06.06 12:32:54 4: EweSHM SHM_GetData homemanager_content: {"Login-Status":"successf                                                                                         ul"}
2017.06.06 12:32:54 4: EweSHM BlockingCall SHM_GetData finished
2017.06.06 12:32:58 4: EweSHM Start BlockingCall SHM_ParseData
2017.06.06 12:32:59 4: EweSHM BlockingCall SHM_ParseData finished
2017.06.06 12:33:29 5: EweSHM Start BlockingCall SHM_GetData with CookieLocation: ./opt/cookies/mycookies.txt and UserAgent: Moz                                                 illa/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)
2017.06.06 12:33:46 3: EweSHM - not logged in. try to login...
2017.06.06 12:33:47 4: EweSHM -> 302
2017.06.06 12:33:47 5: EweSHM -> Login-Page return: <html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Templates/UserProfile.aspx">here</a>.</h2>
</body></html>
<!DOCTYPE html>
<!--[if IE 8]><html class="ie8 oldie"><![endif]-->
<!--[if IE 9 ]><html class="ie9"><![endif]-->
<!--[if gt IE 9]><!--><html><!--<![endif]-->
    <head id="ctl00_Head"><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>
----  noch mehr htlml code ----- snap ---
2017.06.06 12:33:47 3: EweSHM - login to SMA-Portal successful, get data when next cycle runs
2017.06.06 12:33:48 5: EweSHM -> 200
2017.06.06 12:33:48 4: EweSHM SHM_GetData homemanager_content: {"Login-Status":"successful"}
2017.06.06 12:33:48 4: EweSHM BlockingCall SHM_GetData finished
2017.06.06 12:33:50 4: EweSHM Start BlockingCall SHM_ParseData
2017.06.06 12:33:51 5: EweSHM -> Login-Status - successful
2017.06.06 12:33:52 4: EweSHM BlockingCall SHM_ParseData finished



Xguide

Hallo NiedPitt,

welche Berechtigung hat der Portal-User den du verwendest? Hast Du wirklich nur die drei Readings wie im List angezeigt?
Für Dein Vorhaben mit der Steuerung eignet sich veemutlich noch das Forecast Modul, das funktioniert natürlich nur wenn SHM problemlos läuft.
Wird das cookie-file geschrieben? Wenn Du es löscht, dann sollte es mit der nächsten Abfrage wieder da sein...

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 -