You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
; use this if you only have only one phase meter values
4061
+
;c1p=cpwr/3
4062
+
;c2p=cpwr/3
4063
+
;c3p=cpwr/3
4064
+
4065
+
; calculate phase currents
4066
+
c1c=c1p/230
4067
+
c2c=c2p/230
4068
+
c3c=c3p/230
4069
+
4070
+
if once==0 {
4071
+
; start mdns for Shelly second parameter "-" means use device mac
4072
+
res=mdns("shellypro3em-" "-" "shelly")
4073
+
; start udp rpc handler on port 1010 or on port 2220 (for b2500)
4074
+
res=udp(0 1010)
4075
+
;res=udp(0 2220)
4076
+
once=1
4077
+
}
4078
+
4079
+
; evaluate udp input
4080
+
str=udp(1)
4081
+
if str!="" {
4082
+
;print udp rpc payload=%str%
4083
+
res=ins(str "EM.GetStatus")
4084
+
if res>=0 {
4085
+
=#getsrc
4086
+
=#getstat
4087
+
udp(2 header mstr1 mstr2)
4088
+
;print >> %header%
4089
+
;print >> %mstr1%
4090
+
;print >> %mstr2%
4091
+
break
4092
+
}
4093
+
4094
+
res=ins(str "Shelly.GetDeviceInfo")
4095
+
if res>=0 {
4096
+
=#getsrc
4097
+
=#getdefi
4098
+
udp(2 header mstr1 mstr2)
4099
+
;print >> 1 %mstr1%
4100
+
;print >> 2 %mstr2%
4101
+
break
4102
+
}
4103
+
4104
+
res=ins(str "EM.GetConfig")
4105
+
if res>=0 {
4106
+
=#getsrc
4107
+
=#getcfg
4108
+
udp(2 header mstr1)
4109
+
;print >> 1 %mstr1%
4110
+
break
4111
+
}
4112
+
4113
+
res=ins(str "EMData.GetStatus")
4114
+
if res>=0 {
4115
+
=#getsrc
4116
+
=#egetstat
4117
+
udp(2 header mstr1)
4118
+
;print >> 1 %mstr1%
4119
+
break
4120
+
}
4121
+
}
4122
+
4123
+
; adapt your own meter descriptor here
4124
+
>M 1
4125
+
+1,5,o,16,9600,eBZ,4
4126
+
1,1-0:1.8.0*255(@1,Verbrauch,kWh,E_in,3
4127
+
1,1-0:2.8.0*255(@1,Einspeisung,kWh,E_out,3
4128
+
1,1-0:16.7.0*255(@1,akt. Leistung,W,Power,0
4129
+
1,1-0:36.7.0*255(@1,Leistung L1,W,36_7_0,0
4130
+
1,1-0:56.7.0*255(@1,Leistung L2,W,56_7_0,0
4131
+
1,1-0:76.7.0*255(@1,Leistung L3,W,76_7_0,0
4132
+
1,1-0:32.7.0*255(@1,Spannung L1,V,32_7_0,1
4133
+
1,1-0:52.7.0*255(@1,Spannung L2,V,52_7_0,1
4134
+
1,1-0:72.7.0*255(@1,Spannung L3,V,72_7_0,1
4135
+
1,1-0:96.1.0*255(@#),Identifikation,,96_1_0,0
4136
+
#
4137
+
```
4138
+
3908
4139
### Sorel LTDC (CANBus)
3909
4140
3910
4141
Compile firmware with #define ```USE_SML_CANBUS```. Use a proper CAN transceiver. You need a 120Ohms resistor in the second CAN port of the controller, otherwise ESP32 device will not decode anything on the bus, the baudrate is 250 KBITS.
0 commit comments