Skip to content

Commit

Permalink
Revert "Modbus: don't render rtu: false for Modbus TCP (#9915)" (#10046)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Sep 24, 2023
1 parent d58706e commit c920893
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions charger/phoenix-em-eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ func init() {
// NewPhoenixEMEthFromConfig creates a Phoenix charger from generic config
func NewPhoenixEMEthFromConfig(other map[string]interface{}) (api.Charger, error) {
cc := struct {
URI string
ID uint8
Meter struct {
modbus.TcpSettings `mapstructure:",squash"`
Meter struct {
Power, Energy, Currents bool
}
}{
URI: "192.168.0.8:502", // default
ID: 180, // default
TcpSettings: modbus.TcpSettings{
URI: "192.168.0.8:502", // default
ID: 180, // default
},
}

if err := util.DecodeOther(other, &cc); err != nil {
Expand Down
1 change: 1 addition & 0 deletions util/templates/modbus.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ rtu: true
{{- else if or (eq .modbus "tcpip") .tcpip }}
# Modbus TCP
uri: {{ .host }}:{{ .port }}
rtu: false
{{- else }}
# configuration error - should not happen
modbusConnectionTypeNotDefined: {{ .modbus }}
Expand Down

1 comment on commit c920893

@FreedimBeet
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
first of all thank you for providing the super evcc application. For me, the control of the wallbox and the PV system with a Raspberry Pi runs very well.
For this I have a small comment. I use the Phoenix Contact EM-CP-PP-ETH charging controller. After the change from version 0.119.5 to version 0.120.3 I noticed that in the evcc.yaml the ID is not set to 180 but to 255 during configuration and therefore evcc does not get a connection to the EM-CP-PP-ETH. Maybe someone can fix this.

Please sign in to comment.