Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexible evu-Kit Modules (parameters) #1545

Merged
merged 7 commits into from Oct 1, 2021
Merged

Conversation

DetMoerk
Copy link
Contributor

Anpassung der EVU-Kit Module. Die Module können jetzt Parameter für IP, Port und Unit_id übernehmen.
Ohne Parameter werden die bisherigen Defaults verwendet.
Es können 1-3 Parameter übergeben werden

  1. IP
  2. Port
  3. UNIT_ID

In dieser Reihenfolge sind die Parameter auch beim Aufruf zu übergeben, um die entsprechende Variable im Programm zu überschreiben.

@benderl : Bitte eingehend überprüfen, ob das für openWB so funktioniert.

Ich habe auch auf meiner openWB mal geschaut, wie es mit den pymodbus Versionen aussieht.

pi@openWB:~ $ pip list |grep -i modbu
pymodbus (2.5.1)
pi@openWB:~ $ pip3 list |grep -i modbu
pymodbus (2.4.0)

Es sind unterschiedliche Package Versionen installiert. Aktuellste Version wäre pymodbus 2.5.2.

Adding the possibillity to use commandline parameters to setup the client connection (IP, Port, Unit_id)
Defaults are used if no parameters are given. Parameters must be in order
1. IP
2. Port
3. Unit_ID

Checked Installation of my openWB
Installed are pymodbus in different versions for Python2 and Python3. At the moment Python2 is used for the EVUKit, Python3 shhould be checked for compatibility with openWB 2.0 Core.

pi@openWB:~ $ pip list |grep -i modbu
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
pymodbus (2.5.1)
pi@openWB:~ $ pip3 list |grep -i modbu
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
pymodbus (2.4.0)
Changed sdmid to mbid as used in  lovato and mpm3pm
@DetMoerk
Copy link
Contributor Author

Ich muss noch was anpassen an readlovato. Da ist die mbid direkt in den Client (gesetzt. Das sollte auskommentiert sein.

Aber theoretisch sollte es funktionieren, den Client direkt mit der ID zu initialisieren, dann spart man sich das in den weiteren Aufrufen.

comment client.unit_id as it is not tested
@DetMoerk
Copy link
Contributor Author

readlovato.py ist jetzt angepasst.

@DetMoerk
Copy link
Contributor Author

DetMoerk commented Sep 2, 2021

Hi @benderl,
ich habe mal weiter gemacht und die moduleconfigevu.php angepasst.
image

Als Variablen habe ich die folgenden definiert.
evuflexip='192.168.193.55'
evuflexport=502
evuflexid='3'

Was meinst Du dazu? Weiter in der Richtung oder gibt es Änderungsvorschläge?

VG
Det

@DetMoerk
Copy link
Contributor Author

DetMoerk commented Sep 3, 2021

@benderl: hast du ein EVU Kit bei dir installiert?
Kannst Du die Module mal testen?

Im modules/bezug_ethmpm3pm/main.sh werden die Module alle mit sudo python aufgerufen,
sudo python /var/www/html/openWB/modules/bezug_ethmpm3pm/readlovato.py

  1. ist der sudo zwingend oder würde das auch ohne gehen?
  2. können wir gleich auf python3 wechseln? Zur Erinnerung: unterschiedliche Versionen von pymodbus

Ich hätte in der Zwischenzeit den Rest auch realisiert.

@DetMoerk
Copy link
Contributor Author

DetMoerk commented Sep 3, 2021

habe gerade noch das übliche Debugging in die main.sh aufgenommen.

@DetMoerk
Copy link
Contributor Author

Ein erster Test eines anderen Users mit einem SDM630 hinter einem Protoss hat schon mal funktioniert.
Wäre trotzdem schön, wenn openWB seinen Segen dazu geben würde.

@benderl
Copy link
Collaborator

benderl commented Oct 1, 2021

@DetMoerk Möchtest Du die Gui Anpassung noch hier ergänzen oder zusammen mit den PV in einem separaten PR?

@DetMoerk
Copy link
Contributor Author

DetMoerk commented Oct 1, 2021

Ich habe die Gui Anpassungen und die weiteren Module schon in einem anderen Branch. Die würde ich dann nachreichen. Zuerst muss halt der hier drin sein.

Release early Release often 😉

@DetMoerk
Copy link
Contributor Author

DetMoerk commented Oct 1, 2021

@benderl: ich denke es geht auch so, aber schat ihr euch mal die pymodbus Versionen an, ob man da noch was aktualisieren sollte?

Sind unterschiedlich für python2 und Python3 da jetzt alles in Richtung python3 wandert, sollten man da evtl. auf eine aktuelle Version wechseln.

pi@openWB:~ $ pip list |grep -i modbu
pymodbus (2.5.1)
pi@openWB:~ $ pip3 list |grep -i modbu
pymodbus (2.4.0)
Es sind unterschiedliche Package Versionen installiert. Aktuellste Version wäre pymodbus 2.5.2.

@benderl benderl merged commit 0cc2a43 into snaptec:master Oct 1, 2021
DetMoerk added a commit to DetMoerk/openWB that referenced this pull request Oct 1, 2021
commit db913ff
Author: Det <76627235+DetMoerk@users.noreply.github.com>
Date:   Fri Oct 1 13:34:39 2021 +0200

    Flexevu config (snaptec#1596)

    * Konfiguration for Flexible EVU Kits

    moduleconfig and updateConfig.sh with the new varaibles.

    * New main.sh for evukitflex

    calls the changed flex modules

    * bugfix moduleconfigevu

    * bugfix config

    add evuflexversion

    * bugfix

    * bugfix

commit ef4bdf6
Merge: 01280af 54d60fc
Author: benderl <benderl@users.noreply.github.com>
Date:   Fri Oct 1 13:32:26 2021 +0200

    Merge pull request snaptec#1598 from DetMoerk/wr_json_fix

    Update WR_JSON read_json.py

commit 54d60fc
Author: DetMoerk <76627235+DetMoerk@users.noreply.github.com>
Date:   Fri Oct 1 12:42:46 2021 +0200

    Update read_json.py

    Fix to get all numeric values as input. changing into integer before writing to File

commit 01280af
Author: Det <76627235+DetMoerk@users.noreply.github.com>
Date:   Fri Oct 1 10:53:29 2021 +0200

    Flexible pv-kit Modules (Parameters) (snaptec#1578)

    * wr_pvkit Modules with Parameters

    Make the PVKit Modules flexible, so they can be used with self defined IP Adresses, Ports and unit_ids

    * Add Debugging in main.sh

    use python3 instead of python

    * bugfix

    * main.sh for PVkit behind a EVU kit

    * new main.sh for flexible PVKit

    * bufix for wr2

    * bugfix

    * bugfix

commit 0cc2a43
Author: Det <76627235+DetMoerk@users.noreply.github.com>
Date:   Fri Oct 1 10:53:12 2021 +0200

    Flexible evu-Kit Modules (parameters) (snaptec#1545)

    * EVU Kit Modules with parameters

    Adding the possibillity to use commandline parameters to setup the client connection (IP, Port, Unit_id)
    Defaults are used if no parameters are given. Parameters must be in order
    1. IP
    2. Port
    3. Unit_ID

    Checked Installation of my openWB
    Installed are pymodbus in different versions for Python2 and Python3. At the moment Python2 is used for the EVUKit, Python3 shhould be checked for compatibility with openWB 2.0 Core.

    pi@openWB:~ $ pip list |grep -i modbu
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    pymodbus (2.5.1)
    pi@openWB:~ $ pip3 list |grep -i modbu
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    pymodbus (2.4.0)

    * Update readsdm.py

    Changed sdmid to mbid as used in  lovato and mpm3pm

    * Bugfixreadlovato

    comment client.unit_id as it is not tested

    * Insert Debugging into main.sh

    * add debug message

    * bugfixing

    different call for modbusclient

    * Bug Fixing

commit 1c49d82
Author: dj3mu <41773089+dj3mu@users.noreply.github.com>
Date:   Fri Oct 1 09:13:06 2021 +0200

    BMW has renamed JSON field "chargingSystemStatus" (snaptec#1594)

    It seems the new name is "charging_status"

commit c7d0ef8
Author: Bembelfan <84085643+Bembelfan@users.noreply.github.com>
Date:   Thu Sep 30 19:08:41 2021 +0200

    Update watt.py (snaptec#1574)

    * Update watt.py

    - Change: No parameter for debugmode anymore
    - Change: Always write debuglog smaem.log

    Parameter secondssincelastmetering is not used right now, instead of using parameter it will static use 15 seconds

    * Update watt.py

    - usage of given parameter for secondssincelastmetering
    - coding changed to ISO-8859-1
    - former debug switches removed
    - Debug output modified, now with timestamps

    * Update watt.py

    change of comment block

    * Update watt.py

commit 6130a11
Merge: fdcd36d 8c5250e
Author: benderl <benderl@users.noreply.github.com>
Date:   Thu Sep 30 17:00:52 2021 +0200

    Merge pull request snaptec#1581 from Flock82/kia_soc

    [Kia/Hyundai SoC] - Update App-ID/Stamps

commit fdcd36d
Merge: ee5efc8 9408e1d
Author: benderl <benderl@users.noreply.github.com>
Date:   Thu Sep 30 10:36:29 2021 +0200

    Merge pull request snaptec#1591 from LKuemmel/fix-plenticore

    fix plenticore

commit 9408e1d
Author: LKuemmel <lena.kuemmel@openwb.de>
Date:   Thu Sep 30 10:04:03 2021 +0200

    fix plenticore

commit ee5efc8
Merge: e652df6 0e4d561
Author: benderl <benderl@users.noreply.github.com>
Date:   Wed Sep 29 10:22:03 2021 +0200

    Merge pull request snaptec#1590 from benderl/soc_tesla

    SoC Tesla: fix tls on stretch

commit 0e4d561
Author: Lutz Bender <github@lutz-bender.de>
Date:   Wed Sep 29 10:20:58 2021 +0200

    SoC Tesla: fix tls on stretch

commit e652df6
Merge: 604af84 8d472c9
Author: benderl <benderl@users.noreply.github.com>
Date:   Wed Sep 29 10:09:31 2021 +0200

    Merge pull request snaptec#1589 from benderl/soc_tesla

    fix tesla soc

commit 8d472c9
Author: Lutz Bender <github@lutz-bender.de>
Date:   Wed Sep 29 10:04:46 2021 +0200

    fix tesla login

commit e628749
Author: Lutz Bender <github@lutz-bender.de>
Date:   Fri Aug 20 10:48:05 2021 +0200

    get vehicle by vin

commit 604af84
Merge: ffd3c0d 072bfeb
Author: snaptec <info@snaptec.org>
Date:   Tue Sep 28 08:08:58 2021 +0200

    Merge branch 'master' of https://github.com/snaptec/openWB

commit ffd3c0d
Author: snaptec <info@snaptec.org>
Date:   Tue Sep 28 08:08:16 2021 +0200

    URL Leaf SoC Modul angepasst

commit 072bfeb
Merge: d2a05ef 70529ff
Author: benderl <benderl@users.noreply.github.com>
Date:   Mon Sep 27 13:10:52 2021 +0200

    Merge pull request snaptec#1582 from DetMoerk/fixVartaSpeicher

    Speicher_varta Variable für 2. IP fehlt

commit d2a05ef
Author: okaegi <72255431+okaegi@users.noreply.github.com>
Date:   Mon Sep 27 13:10:09 2021 +0200

    smarthome Autoladen (snaptec#1583)

    * smarthome

    Autoladen Ausschalten
    Ist dahingehen geändert, dass ein Device bei einer Autloladung nicht hart ausgeschaltet wird sondern die AUsschlatschwelle auf 0 gesetzt wirde (wenn es vorher ein Bezug) war und dann die Steuerugn dem Smarthoemhandler überlassen wird.
    Die Anlauferkennung kann nun abgeschaltet werden

    * Smarthomeconfig

    Gui für bei Autoladen ausschalten auf Autoladen reduzieren geändert

commit 849b845
Author: LKuemmel <76958050+LKuemmel@users.noreply.github.com>
Date:   Mon Sep 27 12:16:43 2021 +0200

    python modules for counters (snaptec#1519)

    * python module for powerwall

    * python modules for fronius_sm, kostal_piko and _plenticore, go-e

    * python scripts for http, json, lg, powerfox, smartfox

commit 6eb1a40
Author: benderl <benderl@users.noreply.github.com>
Date:   Mon Sep 27 12:15:32 2021 +0200

    Bump version 1.9.249

commit 532529a
Merge: 4ee5ba0 23f9d32
Author: snaptec <36848507+snaptec@users.noreply.github.com>
Date:   Mon Sep 27 11:28:56 2021 +0200

    Merge pull request snaptec#1586 from DetMoerk/fix_wr_json

    fix wr_json für einschlafende WR

commit 23f9d32
Author: DetMoerk <76627235+DetMoerk@users.noreply.github.com>
Date:   Mon Sep 27 10:39:54 2021 +0200

    fix wr_json für einschlafende WR

    WR liefert kein numerisches Ergebnis.

commit 70529ff
Author: DetMoerk <76627235+DetMoerk@users.noreply.github.com>
Date:   Thu Sep 23 19:28:57 2021 +0200

    Variable für 2. IP fehlt

    Fix for https://openwb.de/forum/viewtopic.php?p=46101#p46101

commit 8c5250e
Author: Flock82 <81387035+Flock82@users.noreply.github.com>
Date:   Thu Sep 23 10:33:06 2021 +0200

    Update App-ID/Stamps

    AppId angepasst auf neue BluelinkApp
    GCM Sender ID aktualisiert (getrennt nach Kia/Hyundai)
    Neue Stamps generiert (gültig bis 22/09/2022)

commit 4ee5ba0
Author: snaptec <info@snaptec.org>
Date:   Tue Sep 21 06:20:58 2021 +0200

    Powerfox PV Modul
@DetMoerk DetMoerk deleted the FLexEVU branch January 16, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants