[APP][PRO] Mennekes modbus

Hello Tjar,

This last document you’ve provided. I went through but this doesn’t help. Doesn’t correspond with my charger type according to me.

My charger is clearly working via the LAN network since I can get to it to configure parameters.
Into the image from my charger in my Garage, I show you my model and some DATA from the first screen I get when connected directly with this charging station.
Onto the same IP-network segment from the charging station, my Homey-Pro is situated as well as my SMA Home Manager 2.0. This SMA Home Manager 2.0 can clearly CONTROL my charger. The charger when set into ENERGY MANAGER mode, can follow the charging level my SMA HM 2.0 pushes : based onto the level of solar-power available.
So there’s clearly a communication ongoing at that moment. But if this via a MODBUS communication, that I don’t know. Tried several times but don’t get any MODBUS tool showing me anything…

Getting this charger to communicate with my Homey Pro was actually one from the main reasons why I bought this Homey Pro.
I keep hoping that somehow a solution pops up…
Regards, Walter

If your device has ModbusTCP enabled and you know the Port and device ID… and you know the Modbus registers/types (provided by the manufacturers Modbus documentation), you could use rhis app:

This app allows to use HomeyPro to read/write Modbus registers. But that only makes sense if you know your device allows Modbus access and you know the registers to use for.

Hello RonnyW,

I’ve tried what you suggested but don’t directly see any progress in this.

I’ve just replied to Tjar ( as to my understanding, the developer from the APP for Mennekes Amtron within Homey Pro ) .
Thanks

Hello Tjar,

The winter-period is now kind of passed-by.
During the winter-period, controlling my charging station is kind of important.
Controlling my charging station from within Homey-Pro would be great.

But last winter-period that was not possible. I had to do things myself, manually.
This works relative well but naturally it takes daily attention.
But every now and then I make a small mistake, I forget something somewhere and then, things can go a bit wrong or call it different then what I wanted to happen.
By this I’ve had every month somewhere a small moment that I charged my car with to high power so that I pull a lot from the grid in a short time.
In Belgium we have a special mechanism called : CAPACITEITSTARIEF
That is used to calculate a kind of extra cost.

Now the summer period starts, I have a lot of solar energy so charging my car is now normally purely by solar-power and by that, I have less issues since my charger does perform this intelligent. So charging goes fine.
But by the next winter-period it would be nice to have a CONTROL capability via Homey-Pro.

So I keep asking, begging you to please : have a look into this topic as we discussed before and please try to get my charging station type ( from Mennekes ) to be included as a functioning solution.

Thanks for your efforts

Kind regards,
Walter

Hi,

so because of very limited time I’m not capable of maintaining apps. Also for myself.

So I have a different solution using a Modbus gateway from teletonika (about $100).

It’s the TRB256 which will sit between Homey’s (internal) MQTT broker and (any) Modbus device. It will auto retrieve the data from your Modbus device and send in to your MQTT broker, where you can pick it up with MQTT HUB and MQTT client.

So, you login to your dataserver and just configure your ModbusTCP client

  1. Service>Modbus>Modbus TCP Client

There you define your endpoints and the device you want to communicate

(scroll down) And the registers (and types) you want to have automatically read. Make sure the request name is logical as we’ll make that available in the MQTT payload.

You may test individual request by using the “testing” method below.

==============================================================================

So, now you’ve tested the request locally we can now setup the MQTT connection. Goto Services>Data To Server

Here you create a new COLLECTION which can hold multiple requests, so just “ADD” a new collection

You first configure the “collector” properties with a name, an interval period (1sec) and the type of payload.

And then you configure the MQTT broker, mines is served from within Homey Pro. Choose a logical Topic for the collector to publish to.

Then you add a new data configuration to the collector to publish retrieved data automatically to the MQTT broker.

Just apply now and connect to the broker using a client like MQTTX and you’ll see messages like:

{"ModbusTCP":{ "Amtron":
   { "ChargeCurrent": 
      { "data":[32] 
     }
   }
 }
}
====================================================================
{"ModbusTCP":{ "Amtron":
   { "AC": 
      { "data":[30976004,-1,-1,0,-1,-1,3,0,0,30976004,0,224,-1,-1] 
     }
   }
 }
}
====================================================================

==============================================================================

Now getting it into Homey:

Setup the MQTT HUB and MQTT Client in Homey (lots of details to find).

Create a MQTT Device, skip the capability configuration for now just create it.

Now edit the device and paste the following configuration:

{
  "evcharger_charging_state": {
    "capability": "evcharger_charging_state",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {if(value.ModbusTCP.Amtron.State.data[0] === 0) return 'plugged_out'; if(value.ModbusTCP.Amtron.State.data[0] === 1) return 'plugged_in'; if(value.ModbusTCP.Amtron.State.data[0] === 6) return 'plugged_in_charging'; if(value.ModbusTCP.Amtron.State.data[0] === 9) return 'plugged_in_paused';  }",
    "outputTemplate": "",
    "displayName": "Status"
  },
  "measure_number.target_current": {
  "capability": "measure_number",
  "stateTopic": "Teltonika",
  "setTopic": "",
  "valueTemplate": "(value) => { return value.ModbusTCP.Amtron.ChargeCurrent.data[0]; }",
  "outputTemplate": "",
  "displayName": "Current limit",
  "units": "A"
  },
  "evcharger_charging": {
    "capability": "evcharger_charging",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {if(value.ModbusTCP.Amtron.State.data[0] === 6) return 1; return 0  }",
    "outputTemplate": "",
    "displayName": "Charging"
  },
  "measure_current.L1": {
    "capability": "measure_current",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.AC.data[6] /1000}",
    "outputTemplate": "",
    "displayName": "L1 current"
  },
  "measure_current.L2": {
    "capability": "measure_current",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.AC.data[7] /1000}",
    "outputTemplate": "",
    "displayName": "L2 current"
  }, 
  "measure_current.L3": {
    "capability": "measure_current",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.AC.data[8] /1000}",
    "outputTemplate": "",
    "displayName": "L3 current"
  },
  "measure_power.total": {
    "capability": "measure_power",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.AC.data[0] /1000}",
    "outputTemplate": "",
    "displayName": "Power",
     "units": "kW"
  },
  "measure_voltage.L1": {
    "capability": "measure_voltage",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.AC.data[11]}",
    "outputTemplate": "",
    "displayName": "L1 Volt"
  },
  "measure_voltage.L2": {
    "capability": "measure_voltage",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.AC.data[12]}",
    "outputTemplate": "",
    "displayName": "L2 Volt"
  },
  "measure_voltage.L3": {
    "capability": "measure_voltage",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.AC.data[13]}",
    "outputTemplate": "",
    "displayName": "L3 Volt"
  },
  "meter_power.session": {
    "capability": "meter_power",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.Session.data[0] / 1000}",
    "outputTemplate": "",
    "displayName": "Session",
     "units": "kWh"
  },
  "measure_number": {
    "capability": "measure_number",
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.Session.data[1]}",
    "outputTemplate": "",
    "displayName": "Session time",
    "units": "s"
  },
  "meter_power.total": {
    "capability": "meter_power",
    "energy": {"cumulative": true },
    "stateTopic": "Teltonika",
    "setTopic": "",
    "valueTemplate": "(value) => {return value.ModbusTCP.Amtron.AC.data[9] / 1000}",
    "outputTemplate": "",
    "displayName": "Total Energy",
     "units": "kWh"
  },
  "target_temperature.target_current": {
  "capability": "target_temperature",
  "stateTopic": "Teltonika",
  "setTopic": "Teltonika/Amtron/ChargeCurrent/set",
  "valueTemplate": "(value) => { return value.ModbusTCP.Amtron.ChargeCurrent.data[0]; }",
  "outputTemplate": "(value) => { return String(value); }",
  "displayName": "Current Limit",
  "units": "A"
 }
}

And then you’ll see:

Write for current limit is something I still have to do. Should be from an advanced flow using Something like:

{
  "cookie": 2,
  "type": 0,
  "host": "192.168.2.205",
  "port": 502,
  "timeout": 2,
  "server_id": 255,
  "function": 6,
  "register_number": 1000,
  "value": 10
}

Using a flow this can be done by:

That should be published to a topic corresponding to the settings in Services>Modbus>Mqtt Modbus Gateway

This results in:

and the ack:

image

Hello,

Into this other TOPIC : RE: Information regarding MENNEKES - AMTRON app within Homey-Pro ( email with engineer from that company )

I have placed a message that I managed via the standard MODBUS app within Homey-Pro to get my connection with my Mennekes Amtron Xtra charging station operational.

It was a challenge but it works now.

Kind regards,

Walter :grinning_face_with_smiling_eyes:

Hi @WalterST(and @Tjar)
I see you managed to get your Amtron Xtra working. But you are linking to a post that doesn’t exist or atleast i cannot find it. How did you end up getting it fixed in the end?

I would love to have my Menekkes Amtron 4Business 710 working, but sadly it doesn’t go as planned and Homey cannot connect. I understand and respect that Tjar doesn’t have time for it so i was wondering what te solution was for you!

Kinds regards,

Bram

Hello Bram,

I’m willing to give you some feedback.
Now I’m not at home. Please give me some time to respond. I’ve just searched a bit for details on your charger. Mine is already a bit older. Mine is connected via LAN-Cable and the communication is MODBUS.

I’ve installed the standard MODBUS app on my Homey.
Together with the MENNEKES documentation from the MODBUS Registers, and with the help from my Pall ( ChatGPT :wink: ) I’ve managed to get it working.

I’m not a specialist but it works just fine.
My EV is now charging intelligently my Solar Capture.
I love it.
Actually, initially I bought my Homey-Pro, mainly for THAT reason and I was disappointed when it didn’t working the app made by Tjar.

But it works.
I can’t promise but will try to assist but, … you need to be a bit technical and willing to work/search.

You can start to download the MODBUS Registry parameters for … important… exactly YOUR charger.
Please check correctly since there might be small differences.

I’m from the Flemisch area of Belgium ( Dutch speaking ).

Kind regards

Thanks Walter,

Geen haast hoor, maar wanneer je een keer tijd hebt is je hulp welkom.

Ik ben zelf een weekend weg nu , dus ik zal maandag de eerste stappen zetten. Die register had ik al voorbij zien komen ergens dus die kan ik zo weer vinden.

Ik denk dat het principe wel op dezelfde manier werkt als bij jouw lader, maar dat inderdaad de juiste registers gebruikt moeten worden.

Alvast bedankt voor het meedenken. Het zou mooi zijn als ik binnenkort ook actief op zonne energie kan sturen

Dag Bram,

Kunnen we dit niet beter buiten dit forum bespreken.
Ik ben wel technisch maar als ik sommige bijdragen lees denk ik dat ik er niets van Ken.
Misschien het ook beter rechtstreeks te “spreken” of via een of andere ZOOM connectie werken.
Lijkt me vlotter te werken. Gewoon een gemeenschappelijk tijdstip vinden.
We ( of jij ) kunnen dan achteraf misschien beter algemene TIPS/INFO hierrond delen binnen dit onderwerp, in het Engels. Lijkt me beter.
Ik zie vele onderwerpen die compleet onoverzichtelijk zijn. 20 pagina’s, honderden bijdragen en soms ergetussenin zit er iets nuttigs in maar door de hoeveelheid, niet interessant waardoor je ook dikwijls niet net dat kan vinden wat er nodig is.

Gebruik jij een MENNEKES app?
Ik wel, maar nog weinig nu ik alles via mijn Homey kan.
Ik hoop dat je rechtstreeks toegang hebt binnen je eigen netwerk op je
Laadstation en ook daar toch een beetje weg kent.
Beetje handig met je Homey enz…

Groeten
Walter ( Limburg )

Hey Bram

Ik ben me niet bewust van enige feedback

Groeten Walter

Dag Bram,

Het is je mogelijks zelf gelukt met de info die je reeds had.

Fijn dan.

Groeten, Walter

Thanks Tjar! Saved me an expensive meter! Goal was to flatten the peeks at 11kw to avoid extra costs. Works like a charm!

Hello Tjar,

I’ve used the code from your app to make an modified version that works with the newer Mennekes Amtron 4You chargers. I would like to publish the app, but since it is based on your app, I would like to aks you if you have any objection to me publishing the modified version.

Kind regards

Christiaan

hi christiaan

good work! really! please do publish! if you have an account ID then I can request a transfer.

​I have a Mennekes Amtron 4You 400 and I’m trying to connect to it. I entered the charger’s IP address, but no data is coming through.

​Has anyone encountered this issue before, or know how to fix it? Thanks in advance!

only the professional line is supported. I’m waiting for someone who I can hand over the app. I justdont have the time to maintain.

Hello,

Possibly I’m missing the point here

I’ve used this existing apo for my new Mennekes Amtron 4You and it works really good. Have no ( well, … limited, see further ) issues with it as far as I’m aware.
At first I tried to make my own conversations via MODBUS ( via the standard MODBUS app that I already use for other things ) but there I had a few issues and I wasn’t happy with the result so I returned to this app.

Since two months I’m using this app and I feel OK with it.

A side step : I’m using the TAGs with this charger but that’s purely for my own statistical overview since I have two EV’s that charge via this charger and by using the TAG’s, for each car its own, I can easily keep the charging sessions identified but that only within the Mennekes Amtron communication ( not within Homey so far ). I know exactly what charge goes into what car. Like to use that every now and then to calculate the REAL consumption from primary energy for my EV. Then I really know how many kWh per 100 km. But that’s just for fun.

So by this my feedback that I am currently satisfied with this app and the connectivity with my charging station.

BUT, there is a remark : I charge the EV’s via the CURRENT value that I set to the charging station. I have a MONO-fase solution and can charge up to 7200 Watt or 32A max. The minimum value is 6A . During my own programmed MODBUS solution I had one problem that I couldn’t solve and this was, when I send a new CURRENT value and this value was un-even, my charging station crashed ( had to restart ) . I searched at first for the reason. At a certain moment I realised that everytime I passed a un-even value as current ( so 7A or 9A or 11A … 31 A ) my charging station crashed. Passing an even-value as current ==> all worked well. Then I made ( for fun ) a round-down routine that whatever valid value I would pass to the charging station, and if this would be un-even ( calculate my charging value based on verious parameters so the end-result could become an un-even value… ) , this un-even value would be rounded down to the even value just before. Then all was working fine. But this was only for testing. Finally I decided to give up on my own MODBUS configuration to control my charging station and returned to the APP mentioned in the beginning.
But funny, … also there I found one un-even value that would crach my charging station.
My final , currently used solution is : I use this Mennekes-app within Homey but I keep also using my round-down routine to overcome any crash.

Despite the crash only happens with one un-even value via the app, I only pass now charging-currents with even values . So : 6A or 8A or 10A … 30A or 32A. Have not searched for a reason why it would crash with that un-even value but… the strange thing in my situation : When I have used the Mennekes app itself on my Mobile phone ( so not homey but the real Mennekes app for this charging station … ) , also there I managed to crach my charger with that un-even value. So possibly a fault from Mennekes… or … somewhere a Register that is written or filled wrong. Then I’ve reported this to Mennekes but never got any response and left it there.

Bottomline : I’m now using this Mennekes Amtron 4You station with this FW-version : 1.6.46 and it’s working via my Homey over the Mennekes Homey-app as I’ve shown above into the picture. Since about 2 months I control this charging station purely and only via Homey.

Good luck with your usage

Walter