Hi,
took some time to integrate my Mennekes Amtron Xtra Wallbox via Modbus.
If you want to do the same, check my github repo.
https://github.com/mfaust78/AmtronXtraModbus
Feedback is welcome.
Hi,
took some time to integrate my Mennekes Amtron Xtra Wallbox via Modbus.
If you want to do the same, check my github repo.
https://github.com/mfaust78/AmtronXtraModbus
Feedback is welcome.
That is actually pretty cool, thanks @mfaust78. I have individual modbus sensors and it can indeed sometimes be a bit flaky so I may also try your approach with the structure!
And if you add the two holding registers below in the modbus sensors yaml, you can also modify Customer Current Limitation and change the Charge State from HA by just assigning the right values to these sensors (and with that I was actually able to implement surplus charging in HA via pyscript).
modbus:
- name: Amtron
type: tcp
host: <PutYourAmtronIPhere>
port: 502
retry_on_empty: true
retries: 1
timeout: 10
delay: 1
sensors:
- name: "Amtron Registers"
address: 0x0300
slave: 255
scan_interval: 120
lazy_error_count: 1
input_type: input
count: 38
data_type: custom
structure: ">2h15H22B10H"
- name: "Amtron Customer Current Limitation"
unique_id: amtron_customer_current_limitation
slave: 255
address: 0x0400
count: 1
data_type: uint16
input_type: holding
unit_of_measurement: A
device_class: current
- name: "Amtron Change Charge State"
unique_id: amtron_change_charge_state
slave: 255
address: 0x0401
count: 1
data_type: uint16
input_type: holding
P.S. any reason you didnât include the charging session meter count at register at 0x030D-0x030E? I find that also interesting to know.
@whd Thanks for the addition of the two holing registers.I didnât do that as my car is a bit flaky when Amtron restricts the current - works better if I set the current on the car. Iâll add it to github.
0x030D-0x030E is included. I just used a bit shorter name: âAmtron Energyâ.
Works nicely on the HA energy dashboard as individual device to know how much energy was used for charing.
Hi,
just tried to use your code and added it in the configuration.yaml.
I own a AMTRON Premium, Software 1.13 is installed, latest HA version installed as well. Amtron IP in your code is set.
I edited the configuration.yaml before successfully for other reasons ⌠i think i did i right this time, too.
nevertheless ⌠i see this errors.
do you have an idea why this is not working?
Logger: homeassistant.config
Source: config.py:1294
First occurred: 3:31:27 AM (1 occurrences)
Last logged: 3:31:27 AM
Invalid config for âmodbusâ at configuration.yaml, line 27: required key âbaudrateâ not provided, please check the docs at Modbus - Home Assistant Invalid config for âmodbusâ at configuration.yaml, line 27: required key âbytesizeâ not provided, please check the docs at Invalid config for âmodbusâ at configuration.yaml, line 27: required key âmethodâ not provided, please check the docs at Invalid config for âmodbusâ at configuration.yaml, line 27: required key âparityâ not provided, please check the docs at Invalid config for âmodbusâ at configuration.yaml, line 27: required key âstopbitsâ not provided, please check the docs at https Modbus - Home Assistant Invalid config for âmodbusâ at configuration.yaml, line 28: not a valid value for dictionary value âmodbus->0->typeâ, got âtcpâ, please check the docs at Invalid config for âmodbusâ at configuration.yaml, line 29: âhostâ is an invalid option for âmodbusâ, check: modbus->0->host, please check the docs at Invalid config for âmodbusâ at configuration.yaml, line 31: âretry_on_emptyâ is an invalid option for âmodbusâ, check: modbus->0->retry_on_empty, please check the docs at /integrations/modbus Invalid config for âmodbusâ at configuration.yaml, line 48: Amtron Current Limitation: count
illegal with data_type: uint16
âmodbus->0->sensors->1â, got {ânameâ: âAmtron Current Limitationâ, âunique_idâ: âamtron_current_limitationâ, âslaveâ: 255, âaddressâ: 1024, âcountâ: 1, âdata_typeâ: âuint16â, âinput_typeâ: âholdingâ, âunit_of_measurementâ: âAâ, âdevice_classâ: âcurrentâ}, please check the docs at integrations/modbus Invalid config for âmodbusâ at configuration.yaml, line 57: Amtron Change Charge State: count
illegal with data_type: uint16
âmodbus->0->sensors->2â, got {ânameâ: âAmtron Change Charge Stateâ, âunique_idâ: âamtron_change_charge_stateâ, âslaveâ: 255, âaddressâ: 1025, âcountâ: 1, âdata_typeâ: âuint16â, âinput_typeâ: âholdingâ}, please check the docs at
configuration.yaml screenshot
Hi there,
This looks great and Iâd love to use it for my Mennekes Wallbox.
I just tried loading this as a user defined repository in HACS. However, I got the following failure message â <Integration mfaust78/AmtronXtraModbus> Repository structure for main is not compliantâ.
Am I trying to load this incorrectly, or did the HACS compliance rules change, or âŚ.
Thanks for your help.