gehört hier wohl auch in die Sammlung: man kann das Teil auch über Tasmota Script auslesen und steuern.. leider nur auf der Weboberfläche steuern, per MQTT kommen Spannung / Strom etc. .
Ich hab allerdings nicht die 485-Version
Also Tasmota mit diesen Optionen in der user_config compilen
#ifndef USE_WEBSERVER
#define USE_WEBSERVER
#endif
#ifndef USE_SCRIPT
#define USE_SCRIPT
#endif
#ifndef USE_SCRIPT_WEB_DISPLAY
#define USE_SCRIPT_WEB_DISPLAY
#endif
#ifndef USE_SML_M
#define USE_SML_M
#endif
#ifndef USE_SML_SCRIPT_CMD
#define USE_SML_SCRIPT_CMD
#endif
#ifdef USE_RULES
#undef USE_RULES
#endif
#ifndef SUPPORT_MQTT_EVENT
#define SUPPORT_MQTT_EVENT
#endif
#ifndef USE_SCRIPT_SUB_COMMAND
#define USE_SCRIPT_SUB_COMMAND
#endif
Auf WEMOS D1 mini flashen, D1/D2 und GND mit dem DPM8650 (in meinem Fall) verbinden, Modus 5CS- auf 1 stellen. Unter Edit Script das hier unten einfügen und aktivieren:
>D
Vmax=60
Cmax=24
v=0 ;store device voltage state (targeted)
V=0 ;store WebUI voltage state (targeted)
c=0 ;store device current state (targeted)
C=0 ;store WebUI current state (targeted)
sw=0 ;store device switch state
SW=0 ;store WebUI switch state
rV="01060000" ;ModBus register (voltage)
vV="" ;store hex value of V to append to rV
rC="01060001" ;ModBus register (current)
vC="" ;store hex value of C to append to rC
rSW="01060002000" ;ModBus register (switch)
vSW="" ;store hex value of SW to append to rSW
>B
tper=10
smlj=0 ;disable publishing at MQTT teleperiod, on boot
->sensor53 r
>R
smlj=0 ;disable publishing at MQTT teleperiod, on reboot
>S
if upsecs>30
then
smlj=1 ;re-enable publishing at MQTT teleperiod, after boot
endif
>W
bu(SW "DPM ON" "DPM OFF") ;toggle switch via WebUI
nm(0.0 60.0 0.01 V "DPM out (V)" 200 2) ;set voltage output via WebUI
nm(0.0 24.0 0.01 C "DPM out (A)" 200 2) ;set current output via WebUI
>T
sw=DC#sSwitch ;load switch state from ModBus variable >M
v=DC#sVolt ;load voltage state from ModBus variable >M
c=DC#sCur ;load voltage state from ModBus variable >M
if ((chg[sw]>0) and (SW!=sw)) ;update WebUI based on physical input (switch)
then
SW=sw
endif
if ((chg[v]>0) and (V!=v)) ;update WebUI based on physical input (voltage)
then
V=v
endif
if ((chg[c]>0) and (C!=c)) ;update WebUI based on physical input (current)
then
C=c
endif
if chg[V]>0 ;update ModBus register based on WebUI input (voltage)
then
if V>Vmax ;prevent out of bound value (voltage max)
then
V=Vmax
endif
if V<0 ;prevent out of bound value (voltage min)
then
V=0
endif
vV=rV+sb(hx((V*100)) 4 4)
sml(1 3 vV)
endif
if chg[C]>0 ;update ModBus register based on WebUI input (current)
then
if C>Cmax ;prevent out of bound value (current max)
then
C=Cmax ;prevent out of bound value (current min)
endif
if C<0
then
C=0
endif
vC=rC+sb(hx((C*1000)) 4 4)
sml(1 3 vC)
endif
if ((chg[SW]>0) and (sw!=SW) ;update ModBus register based on WebUI input (switch)
then
vSW=rSW+s(SW)
sml(1 3 vSW)
endif
>M 1
+1,4,m,16,9600,DC,5,2,010300000001,010300010001,010300020001,010310010001,010310020001 ;ModBus register taken from JT-DPM86XX_Communication_protocol_2022-07-06.pdf provided by Joy-IT
1,010302SSssxxxx@i0:100,Voltage (set),V,sVolt,2
1,010302SSssxxxx@i1:1000,Current (set),A,sCur,2
1,010302SSssxxxx@i2:1,Switch (set),,sSwitch,0
1,010302SSssxxxx@i3:100,Voltage (disp),V,dVolt,2
1,010302SSssxxxx@i4:1000,Current (disp),A,vCur,2
#