[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 )