Studer Xtender XTM mit Xcom-232i Kommunikationsmodul / RS232 in fhem

Begonnen von holle75, 10 März 2016, 12:50:42

Vorheriges Thema - Nächstes Thema

osid-timo

Hallo,
der Tipp war gut
mit dem Schreiben des max. Ladestromes kommt
scom.exe --port=COM3 --verbose=3 write_property src_addr=1 dst_addr=101 object_type=2 object_id=1138 property_id=5 format=FLOAT value=2.0

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=101
object_type=0x2
object_id=1138
property_id=5
length=4
data=
000| 00 00 00 40


debug: tx bytes:
000| AA 00 01 00 00 00 65 00 00 00
010| 0E 00 73 79 00 02 02 00 72 04
020| 00 00 05 00 00 00 00 40 BE 1A
debug: rx bytes:

error (3): RESPONSE_TIMEOUT


ein Versuch das Schreiben ins Flash zu verhindern kommt auch ein Fehler
scom.exe --port=COM3 --verbose=3 write_property src_addr=1 dst_addr=101 object_type=2 object_id=1550 property_id=5 format=BOOL value=0

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=101
object_type=0x2
object_id=1550
property_id=5
length=1
data=
000| 00


debug: tx bytes:
000| AA 00 01 00 00 00 65 00 00 00
010| 0B 00 70 73 00 02 02 00 0E 06
020| 00 00 05 00 00 1C B0

debug: rx bytes:
000| AA 23 65 00 00 00 01 00 00 00
010| 0C 00 94 86 03 02 02 00 0E 06
020| 00 00 05 00 22 00 41 34


error (34): OBJECT_ID_NOT_FOUND


Ich hatte den Verdacht das die nötige SW Version nicht ausreicht, aber das auslesen der Version bringt mich auch nicht weiter:
scom --port=COM3 --verbose=3 write_property src_addr=1 dst_addr=101 object_type=1 object_id=3130 property_id=5 format=FLOAT value=0

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=101
object_type=0x1
object_id=3130
property_id=5
length=4
data=
000| 00 00 00 00


debug: tx bytes:
000| AA 00 01 00 00 00 65 00 00 00
010| 0E 00 73 79 00 02 01 00 3A 0C
020| 00 00 05 00 00 00 00 00 4D E6
debug: rx bytes:
000| AA 23 65 00 00 00 01 00 00 00
010| 0A 00 92 82 02 02 01 00 3A 0C
020| 00 00 05 00 4F C6

scom --port=COM3 --verbose=3 write_property src_addr=1 dst_addr=101 object_type=1 object_id=3131 property_id=5 format=FLOAT value=0

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=101
object_type=0x1
object_id=3131
property_id=5
length=4
data=
000| 00 00 00 00


debug: tx bytes:
000| AA 00 01 00 00 00 65 00 00 00
010| 0E 00 73 79 00 02 01 00 3B 0C
020| 00 00 05 00 00 00 00 00 4E F0
debug: rx bytes:
000| AA 23 65 00 00 00 01 00 00 00
010| 0A 00 92 82 02 02 01 00 3B 0C
020| 00 00 05 00 50 CC

waren wg der SW Version es die richtigen Befehle?

noch bin ich ratlos, was das schreiben verhindert.
Jeder weitere Tipp ist willkommen

Gruß osid-timo
FHEM Pi3: 1* CUL, 30* Homematic, 10* EnOcean
FHEM Pi3: IR-Lesekopf, BT->SMA
FHEM Pi3: ZHK, 1-wire, 1* VBus   Resol DeltaSol BS

satprofi

SW u. andere Infos nicht mit "write" , sondern mit "read"

scom.exe --port=COM3 --verbose=3 read_property src_addr=1 dst_addr=101 object_type=1 object_id=3000 property_id=1 format=FLOAT   #Battery Spg.
scom.exe --port=COM3 --verbose=3 read_property src_addr=1 dst_addr=101 object_type=1 object_id=3130 property_id=1 format=FLOAT  # ID SOFT msb
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

osid-timo

Danke für die schnelle Antwort
Parameter lesen geht mit dem read_property!!! ich konnte die Version auslesen: 1.6.34, damit ist es die aktuelle

mit jedem write verliere ich die Kommunikation (bisher nur die Paramter 1550 und 1138 getestet)
muss man sich mit einem xcom-232 erst Rechte zu beschreiben geben? wenn ja wie, wenn nein was ist mein Problem

kann die property_id helfen?

Gruß Oswald
FHEM Pi3: 1* CUL, 30* Homematic, 10* EnOcean
FHEM Pi3: IR-Lesekopf, BT->SMA
FHEM Pi3: ZHK, 1-wire, 1* VBus   Resol DeltaSol BS

satprofi

gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

osid-timo

Hallo,
es sieht so aus als wenn ich den XCOM232 sowohl auf Expert wie Installer stellen kann

>scom.exe --port=COM3 --verbose=3 write_property src_addr=1 dst_addr=501 object_type=2 object_id=5012 property_id=8 format=ENUM value=0x0030

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=501
object_type=0x2
object_id=5012
property_id=8
length=2
data=
000| 30 00


debug: tx bytes:
000| AA 00 01 00 00 00 F5 01 00 00
010| 0C 00 02 DA 00 02 02 00 94 13
020| 00 00 08 00 30 00 E2 C3

debug: rx bytes:
000| AA 23 F5 01 00 00 01 00 00 00
010| 0A 00 23 2B 02 02 02 00 94 13
020| 00 00 08 00 B4 13


>scom.exe --port=COM3 --verbose=3 read_property src_addr=1 dst_addr=501 object_type=2 object_id=5012 property_id=8 format=ENUM

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=501
object_type=0x2
object_id=5012
property_id=8
length=0
data=

debug: tx bytes:
000| AA 00 01 00 00 00 F5 01 00 00
010| 0A 00 00 D6 00 01 02 00 94 13
020| 00 00 08 00 B1 F6

debug: rx bytes:
000| AA 23 F5 01 00 00 01 00 00 00
010| 0C 00 25 2F 02 01 02 00 94 13
020| 00 00 08 00 30 00 E3 D0


response:
device_addr=501
object_type=0x2
object_id=5012
property_id=8
length=2
data=48


Ich kann auch die Xtender Infos auslesen Spannung, Strom, SOC..
scom.exe --port=COM3 --verbose=3 read_property src_addr=1 dst_addr=101 object_type=1 object_id=3007 property_id=1 format=FLOAT value=2.0

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=101
object_type=0x1
object_id=3007
property_id=1
length=0
data=

debug: tx bytes:
000| AA 00 01 00 00 00 65 00 00 00
010| 0A 00 6F 71 00 01 01 00 BF 0B
020| 00 00 01 00 CC BA

debug: rx bytes:
000| AA 22 65 00 00 00 01 00 00 00
010| 0E 00 95 7F 02 01 01 00 BF 0B
020| 00 00 01 00 00 FE FF 43 0E 41

response:
device_addr=101
object_type=0x1
object_id=3007
property_id=1
length=4
data=511.984


sobald ich aber auf einen Parameter zugreife read wie write
bekomme ich Fehler
scom.exe --port=COM3 --verbose=3 read_property src_addr=1 dst_addr=101 object_type=2 object_id=1138 property_id=5 format=FLOAT

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=101
object_type=0x2
object_id=1138
property_id=5
length=0
data=

debug: tx bytes:
000| AA 00 01 00 00 00 65 00 00 00
010| 0A 00 6F 71 00 01 02 00 72 04
020| 00 00 05 00 7D D9

debug: rx bytes:

error (3): RESPONSE_TIMEOUT

oder
scom.exe --port=COM3 --verbose=3 read_property src_addr=1 dst_addr=101 object_type=2 object_id=1550 property_id=5 format=FLOAT

debug: verbose_level=3
debug: port=COM3

send property_request:
device_addr=101
object_type=0x2
object_id=1550
property_id=5
length=0
data=

debug: tx bytes:
000| AA 00 01 00 00 00 65 00 00 00
010| 0A 00 6F 71 00 01 02 00 0E 06
020| 00 00 05 00 1B 8B

debug: rx bytes:
000| AA 23 65 00 00 00 01 00 00 00
010| 0C 00 94 86 03 01 02 00 0E 06
020| 00 00 05 00 22 00 40 29


error (34): OBJECT_ID_NOT_FOUND


wer hat noch einen Tipp das Problem zu lösen oder welche Konfiguration verhindert den Parameterzugriff?

Gruß osid-timo
FHEM Pi3: 1* CUL, 30* Homematic, 10* EnOcean
FHEM Pi3: IR-Lesekopf, BT->SMA
FHEM Pi3: ZHK, 1-wire, 1* VBus   Resol DeltaSol BS

osid-timo

Hallo,
nach einem Software Update von XTM und XCOM232i kann ich nun auf die Parameter lesend zugreifen.

den XCOM232 konnte ich in den Expert Mode mit scom.exe --port=COM3 --verbose=3 write_property src_addr=1 dst_addr=501 object_type=2 object_id=5012 property_id=8 format=ENUM value=0x0020
versetzten.
den Parameter 1550 (kein schreiben ins Flash) konnte ich mit scom.exe --port=COM3 --verbose=3 write_property src_addr=1 dst_addr=101 object_type=2 object_id=1550 property_id=5 format=BOOL value=0
auf false setzten.

Ein schreiben der Parameter z.B 1138 gelingt mir immer noch nicht, den Befehl habe ich aus dem Manual kopiert,
scom.exe --port=COM3 --verbose=3 write_property src_addr=1 dst_addr=101 object_type=2 object_id=1138 property_id=5 format=FLOAT value=12.0

mit anderen property_id habe ich auch keinen Erfolg.

hat noch jemand eine Idee?
Gruß osid-timo

FHEM Pi3: 1* CUL, 30* Homematic, 10* EnOcean
FHEM Pi3: IR-Lesekopf, BT->SMA
FHEM Pi3: ZHK, 1-wire, 1* VBus   Resol DeltaSol BS

satprofi

lädt er mit 12 A?
eine abfrage geht ja nur vom eintrag im flash, der ändert sich nicht, wenn du zugriff sperrst. ich habe 2A im flash, also startet er mit 2A, den rest stelle ich über xcom ein
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

osid-timo

Hallo,
ich habe jetzt den Strom auf 2A begrenzt und damit wird geladen.
jetzt bleibt nur die Frage wie ich den max Strom dynamisch erhöhen kann um die Ladung zu steuern.
welche Kommandos verwendet Ihr?

und habt Ihr den Parameter 1550 auf true or false?
Gruß osid-timo
FHEM Pi3: 1* CUL, 30* Homematic, 10* EnOcean
FHEM Pi3: IR-Lesekopf, BT->SMA
FHEM Pi3: ZHK, 1-wire, 1* VBus   Resol DeltaSol BS

satprofi

na dann klappts ja. 1550 muss off sein, den jeder befehl an den studer wird sonst in flash geschrieben.
steuern musst du halt bei jedem neuen überschuss
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

osid-timo

Hallo,
Mittlerweile konnte ich mit den Infos von Satprofi der tollen Xcom API: https://gogs.es-lab.de/mueller_to/Xcom-API
einen scom Nachbau für Linux zu realisieren und man muss nicht immer den USB-Adapter umstecken. Die Lösung hat noch Prototypen Status und es ist einiges an Test Code enthalten, ich möchte es trotzdem hier mal zurückgeben, falls noch Bedarf besteht.
Die Befehlstruktur ist an scom angelehnt und kann über FHEM in meinem Fall ein DOIF oder die Kommandozeile genutzt werden. ACHTUNG das Python Programm schreibt einen Status an mein DOIF "XtenderDO" zurück.

Befehlsbeispiel für die Kommandozeile: python3 /usr/local/bin/Studer/XtenderPara.py write parameter 1124 value_qsp bool 0

hier mein DOIF mit um zyklisch Xtender Daten holen um die Visiualsierung über FHEM zu integrieren und die entsprechende Ladesteuerung.
([+[$SELF:P_time]]) ##schrittweises einlesen der Xtender infos, variabel damit bei zusätzlichen Befehlen über die Konsole weniger Konflikte entstehen
(IF ([$SELF:P_Step] == 0) ("python3 /usr/local/bin/Studer/XtenderPara.py read info 3000 value float")) ##BattU
(IF ([$SELF:P_Step] == 1) ("python3 /usr/local/bin/Studer/XtenderPara.py read info 3005 value float")) ##BattIavg
(IF ([$SELF:P_Step] == 2) ("python3 /usr/local/bin/Studer/XtenderPara.py read info 3137 value float")) ##InputACPower
(IF ([$SELF:P_Step] == 3 and [$SELF:P_Step1] == 0) ("python3 /usr/local/bin/Studer/XtenderPara.py read info 3004 value float")) ##BattIwant
(IF ([$SELF:P_Step] == 3 and [$SELF:P_Step1] == 1) ("python3 /usr/local/bin/Studer/XtenderPara.py read info 3095 value float")) ##BattIcurr
(IF ([$SELF:P_Step] == 3 and [$SELF:P_Step1] == 2) ("python3 /usr/local/bin/Studer/XtenderPara.py read info 3006 value float")) ##BattUrip
(IF ([$SELF:P_Step] == 3 and [$SELF:P_Step1] == 3) ("python3 /usr/local/bin/Studer/XtenderPara.py read info 3078 value float")) ##BattDischarge
(setreading $SELF P_Step {([$SELF:P_Step] + 1)}) ##next Step
(IF ([$SELF:P_Step] >= 4) (setreading $SELF P_Step 0,setreading $SELF P_Step1 {([$SELF:P_Step1] + 1)}))
(IF ([$SELF:P_Step1] >= 4) (setreading $SELF P_Step1 0))
##
DOELSEIF ([$SELF:Lader] eq "on"
and (([MyEnergieEl:EasymeterQ3C_power] < -200 and [$SELF:Xtender_Batt_A] < 8)
or  ([MyEnergieEl:EasymeterQ3C_power] < -50   and [$SELF:Xtender_Batt_A] == 6)))
  ("python3 /usr/local/bin/Studer/XtenderPara.py Ladestrom 8", setreading $SELF Xtender_Batt_A 8)()
##3
DOELSEIF ([$SELF:Lader] eq "on"
and (([MyEnergieEl:EasymeterQ3C_power] < -150 and [$SELF:Xtender_Batt_A] < 6)
or   ([MyEnergieEl:EasymeterQ3C_power] < -50  and [$SELF:Xtender_Batt_A] == 4) ##auframpen
or   ([MyEnergieEl:EasymeterQ3C_power] > -10  and [$SELF:Xtender_Batt_A] == 8))) ##abrampen
  ("python3 /usr/local/bin/Studer/XtenderPara.py Ladestrom 6", setreading $SELF Xtender_Batt_A 6)()
##4
DOELSEIF ([$SELF:Lader] eq "on"
and (([MyEnergieEl:EasymeterQ3C_power] < -100 and [$SELF:Xtender_Batt_A] <4) ##auframpen
or   ([MyEnergieEl:EasymeterQ3C_power] < -50  and [$SELF:Xtender_Batt_A] == 2) ##auframpen
or   ([MyEnergieEl:EasymeterQ3C_power] > -10  and [$SELF:Xtender_Batt_A] == 6))) ##abrampen
("python3 /usr/local/bin/Studer/XtenderPara.py Ladestrom 4", setreading $SELF Xtender_Batt_A 4)()
##5
DOELSEIF ([$SELF:Lader] eq "on"
and (([MyEnergieEl:EasymeterQ3C_power] < -50 and [$SELF:Xtender_Batt_A] < 2) ##auframpen
or   ([MyEnergieEl:EasymeterQ3C_power] > -10 and [$SELF:Xtender_Batt_A] == 4))) ##abrampen
  ("python3 /usr/local/bin/Studer/XtenderPara.py Ladestrom 2", setreading $SELF Xtender_Batt_A 2)()
##6
DOELSEIF ([$SELF:Lader] eq "on" and [MyEnergieEl:EasymeterQ3C_power] > 10 and [$SELF:Xtender_Batt_A] > 0) ##0A laden
   ("python3 /usr/local/bin/Studer/XtenderPara.py Ladestrom 0", setreading $SELF Xtender_Batt_A 0)()
##7
DOELSEIF ([$SELF:P_mybutton] eq "on" or [[myTwilight:sr_weather]]) ("python3 /usr/local/bin/Studer/XtenderPara.py Lader on",setreading $SELF Lader on,$SELF cmd_6)
##8
DOELSEIF ([$SELF:P_mybutton] eq "off" or [[myTwilight:ss_weather]]) ("python3 /usr/local/bin/Studer/XtenderPara.py Lader off",setreading $SELF Lader off,set $SELF cmd_6)
##9
DOELSEIF ([$SELF:P_mybutton] eq "InverterOn") ("python3 /usr/local/bin/Studer/XtenderPara.py Inverter on")
##10
DOELSEIF ([$SELF:P_mybutton] eq "InverterOff") ("python3 /usr/local/bin/Studer/XtenderPara.py Inverter off")
##11
DOELSEIF ([$SELF:P_mybutton] eq "init") (setreading $SELF P_myPythonCmd "python3 /usr/local/bin/Studer/XtenderPara.py ) (setreading $SELF P_Step 0)(setreading $SELF P_Step1 0)
##12
DOELSEIF ([$SELF:P_mybutton] eq "disable") (setreading $SELF P_Step {([$SELF:P_Step] + 1)})
##
DOELSEIF ([$SELF:P_mybutton] eq "x1")("python3 /usr/local/bin/Studer/XtenderPara.py User Expert") ##XCOM auf Experte
##
DOELSEIF ([$SELF:P_mybutton] eq "xx")("python3 /usr/local/bin/Studer/XtenderPara.py write parameter 1138 value_qsp float 2.0") ##Ladestrom


Gruß osid-timo
FHEM Pi3: 1* CUL, 30* Homematic, 10* EnOcean
FHEM Pi3: IR-Lesekopf, BT->SMA
FHEM Pi3: ZHK, 1-wire, 1* VBus   Resol DeltaSol BS

satprofi

#55
hallo.
klappt das auch mit python2 ?

LG
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

osid-timo

Hallo,
kann mit Anpassungen des COM Interfaces auch mit Python2 klappen
Die XtenderPara, habe ich aus eigenen und fremden Quellen zusammen gezogen und ist in meinem letzten Post zum Herunterladen
FHEM Pi3: 1* CUL, 30* Homematic, 10* EnOcean
FHEM Pi3: IR-Lesekopf, BT->SMA
FHEM Pi3: ZHK, 1-wire, 1* VBus   Resol DeltaSol BS

satprofi

gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram