My New Motion integration EV Charging from Shell newmotion

There also appears to be a local interface for the Newmotion charge point. At least mine, a Home Advanced 11Kw, has one. It is at http://IP-address:12800

Shows information about the current session, and a list of the most recent sessions. I have not been able to find whether there is an opportunity to start and stop sessions, but that may well be part of an API that is not exposed

UPDATE:
http://ipaddress:12800/user/status returns a JSON with details about current session. See the example below

{
   "cpid":"#####",
   "serial":"####",
   "model":"HOMEADVANCED",
   "imsi":"####",
   "iccid":"#####",
   "meterSerial":"####",
   "meterType":"3f_Inepro",
   "ocppType":"JOCPP15",
   "ocppEndpoint":"wss://chargenetwork.thenewmotion.com/ocppws/",
   "ocppProtocolType":"ocpp/json",
   "ocppStatus":"Accepted",
   "modemStatus":"Modem not active with csq +CSQ: 99,99 not connected ip: ####",
   "connectors":[
      {
         "id":1,
         "type":"Type2 Cable",
         "status":"ON",
         "max":{
            "phases":"PHASE1",
            "current":16.0,
            "currentArray":[
               16.0,
               0.0,
               0.0
            ]
         },
         "plugMax":{
            "phases":"PHASE3",
            "current":53.0,
            "currentArray":[
               53.0,
               53.0,
               53.0
            ]
         },
         "limit":{
            "phases":"PHASE1",
            "current":16.0,
            "currents":[
               16.0,
               0.0,
               0.0
            ],
            "currentArray":[
               16.0,
               0.0,
               0.0
            ]
         },
         "chargingRate":"Charging rate: 0kw 3 phase [0A pf ] ",
         "chargingNeed":"Need: 36.57kw 3 phase [53A ] ",
         "errors":[
            
         ],
         "warnings":[
            
         ],
         "transaction":{
            "privateId":###,
            "publicId":"###",
            "status":"CHARGING",
            "consumed":16150.0,
            "token":"###########",
            "start":1662309285835,
            "statusCar":"idle",
            "fullPotential":true
         }
      }
   ],
   "maxLimit":{
      "phases":"PHASE1",
      "current":32.0,
      "currentArray":[
         32.0,
         0.0,
         0.0
      ]
   },
   "status":"ON",
   "version":"###",
   "errors":[
      
   ],
   "warnings":[
      
   ]
}
3 Likes

Good catch, would be an easy way to start reading out what the charger is doing locally. I directly got enthusiastic and wanted to connect, until I remembered that my home advanced is actually not connected via LAN, but via GPRS. Am almost sure that means it can only be accessed by the provider(as I didnt find any public IP which would anyhow be a security no-go).

Checked the manual (Salesforce) and found out it actually has an ethernet port that can be connected to any router with internet access.

Was your chargepoint already setup for using your LAN or did you connected it (yourself) afterwards?

To the rest of the readers, anyone tried connecting the LAN cable on your own (yes this is kind of “dont try this at home” unless you know 100% what you are doing and tipple checked that the power is really off :wink:

BTW saw in de docs that they is also a P1 port (aka slimme meter) compatible with DSMR > 4.0. This would also be an easy option to at least read out the consumption.

Hi there,

FYI, I couldn’t wait and went ahead with connecting my homeadvanced charger to LAN. Actually just a matter of plugin in the LAN cable as documented. I didnt even bother to open my firewall as the instructions say opening a.o. port 80 bi directionally and for the request (http://ipaddress:12800/user/status) mentioned by ps-nl there is no authentication in place which would expose all this and maybe more.

Am now at the same point ps-nl is. Wondering whether anyone is beyond this step, like having the configuration entries to extract the usefull as sensors. My first attempt did quite do the trick but when time will keep on trying. likely just a matter of defining the correct value_template.

What i have working is:

  - platform: rest
    resource: http://<ipaddress>:12800/user/status
    name: EV Charger Status
    unique_id: ev.status 
    value_template: "{{ value_json.status }}"

not yet working:

  - platform: rest
    resource: http://<ipaddress>:12800/user/status
    name: EV Charger Session
    unique_id: ev.session 
    value_template: "{{ value_json.connectors[0].transaction.statusCar }}"
2 Likes

Hi all,
First of all: many thanks to all of you and especially @35e for what has been posted here, it seems you’re achieving what I was looking for alrady for some time, adding some intelligence to the dumb newmotion chargers via HA.
Now, being a real newby on nodered, I only succeed to get it working partially. Not sure I succeed in the correct setup. I can stop and reset the charger via flow.json from github (wout.json doesn’t seem to work at all), yet when trying to start the charger, I get an error as Shell return 2 charging cards (I do have 2 indeed), while the flow just expects 1, resulting in the error. No clue where to adjust to code to work with an arrea and select e.g. the first card. Anyone solved a similar issue?
Next, also not sure whether my setup is ok, as for chargerID and cardID numeric fields are expected, while mine are actually alphanumeric (or an uuid). Any help on this? I changed the fiels to strings so far.
Many thanks in advance and apologies for the newby questions!

Not sure whether you might have spotted the documentation inside the subflow which explains the setup process. I’ve pasted this into the Github repository readme file now. This will explain the ChargerID and CardID stuff for you.

I have fiddled with this from time to time so I’ve updated the version in use here chez 35E on Github (as above) which you could try. Suffice to say it reliably charges my car each night from 12.30 am when wired up to other Node-RED gubbins. The Shell Recharge app seems to be getting updates of late which might mean you won’t need to use this solution going forward…

2 Likes

OK, setup issues solved, it’s a bit of read the f***ing manual :slight_smile: so my mistake. It is working!! Thanks for the help!

Yes, mine was always hooked up via UTP. No GPRS reception at the location where my charge point is.

I have the current rest sensors:

- platform: rest
  name: newmotion_current
  unique_id: newmotion_current
  resource: http://IP:12800/user/status
  json_attributes_path: "$.['connectors'].[0].['transaction']"
  json_attributes:
    - consumed
    - start
    - status
  value_template: "{{ value_json['connectors'][0]['transaction']['consumed'] | int / 1000 }}"
  state_class: "total_increasing"
  device_class: "energy"
  unit_of_measurement: "kWh"


- platform: rest
  name: newmotion_total
  unique_id: newmotion_total
  resource: http://IP:12800/user/transactions
  value_template: "{{ value_json['value'][19]['meterStop'] | int / 1000 }}"
  unit_of_measurement: "kWh"
  state_class: "total_increasing"
  device_class: "energy"

As to the P1-port: that is not for read-out purposes. It is for hooking the charge-point up to your Smart Meter so the chargepoint knows the max draw of your home. That is used for power balancing the max power delivered by the chargepoint. Needs to be activated by Newmotion in the back end.

2 Likes

Thanks to all for providing the information to read information from the NewMotion/Shell recharge EV chargers.

With the help of the info in this topic I have defined the below rest sensors.
It requires the charger to be connected to the LAN using an UTP ethernet cable and should also work without an active subscription.
My total consumption is increasing while charging (Instead of updated at the end of the charge session)

# NewMotion/Shell Recharge json sensor
rest:
  - resource: http://charger.local:12800/user/status
    method: GET
    scan_interval: 10
    sensor:
      - name: evcharger_nmha_chargerStatus
        value_template: >
          {% if value_json.connectors.0.transaction is defined %}
            {{ value_json.connectors.0.transaction.status }}
          {% else %}
            {{ "Disconnected" }}
          {% endif %}
        icon: mdi:ev-station
      - name: evcharger_nmha_carStatus
        value_template: >
          {% if value_json.connectors.0.transaction is defined %}
            {{ value_json.connectors.0.transaction.statusCar }}
          {% else %}
            {{ "Disconnected" }}
          {% endif %}
        icon: mdi:ev-station
      - name: evcharger_nmha_consumed_session
        value_template: >
          {% if value_json.connectors.0.transaction is defined %}
            {{ value_json.connectors.0.transaction.consumed | float | multiply(0.001) | round(2) }}
          {% else %}
            {{ 0 }}
          {% endif %}
        device_class: energy
        unit_of_measurement: "kWh"
        icon: mdi:ev-plug-type2
      - name: evcharger_nmha_chargeRate
        value_template: >
          {% set pattern = '\d+.?\d+' %}
          {{ value_json.connectors.0.chargingRate | regex_findall_index(pattern) if value_json.connectors.0.chargingRate is search(pattern) else 0 }}
        device_class: power
        unit_of_measurement: "kw"
      - name: evcharger_nmha_chargeNeed
        value_template: >
          {% set pattern = '\d+.?\d+' %}
          {{ value_json.connectors.0.chargingNeed | regex_findall_index(pattern) if value_json.connectors.0.chargingNeed is search(pattern) else 0 }}
        device_class: power
        unit_of_measurement: "kw"

  - resource: http://charger.local:12800/user/transactions
    method: GET
    scan_interval: 10
    sensor:
      - name: evcharger_nmha_consumed_total
        value_template: >
          {% set pattern = '\d+.?\d+' %}
          {% if value_json.value.19.meterStop is defined %}
            {{ value_json.value.19.meterStop | regex_findall_index(pattern) | int / 1000 if value_json.value.19.meterStop is search(pattern) }}
          {% else %}
            {% if value_json.value.19.meterStart is defined %}
              {% set totalconsumedtemp = value_json.value.19.meterStart | regex_findall_index(pattern) | int / 1000 + states('sensor.evcharger_nmha_consumed_session') | float %}
              {{ totalconsumedtemp | round(2) if totalconsumedtemp is search(pattern) }}
            {% else %}
              {{ states('sensor.evcharger_nmha_consumed_total') | float }}
            {% endif %}
          {% endif %}
        device_class: "energy"
        unit_of_measurement: "kWh"
        state_class: "total_increasing"
        icon: mdi:ev-plug-type2

charger.local should automatically resolve to your charger IP using MDNS (multicast DNS) so it does not require a static IP or DHCP IP reservation.

4 Likes

This is super! Thanks Joop!

To send reboot command:
http://charger.local:12800/user/reboot

now turn it in a rest_command:

rest_command:
  reboot_shell_evcharger:
    url: http://charger.local:12800/user/reboot
1 Like

thanks a lot for this development! However I have no experience with Node-red. Would it be possible to launch this program as HACS integration?

2 Likes

If you add the stuff from Joop Martens in configuration.yaml
(RESTful Sensor - Home Assistant)
you will get something like:

1 Like

I’ve an older Home Advanced charging station (circa 7 yearsold). I dismantled it, and this version has just 1 LAN connection (where is see in the manual of the Homeadvanced 2.0, there are two). As I would have to buy a quite long UTP cable to test it (and make holes in walls): Does anyone know whether I can connect with this port to get energy data? Or is it just for loadbalancing (the port is situated right next to the p1 connector)

thank you @JustDoingSomething. The home charger however is not accessible by TCP. Can the RESTful Sensor also be used for access to the Shell Recharge Server?

I’m not familiar with the older version of the Home Advanced charger but my 2.1 version also has 1 ethernet connection. I guess you have a good chance that your ethernet port will work for your LAN connection and provides access to the energy data.

Possibly you can first give it a try with a (borrowed) wifi bridge or powerline adapter before installing an ethernet cable?

My rest example only works for the local LAN ethernet connection using an UTP ethernet cable. It does not connect to the Shell recharge cloud service because it does not include authentication with the Shell recharge cloud service. On the local LAN webinterface of the charger the json data is available without authentication which allows a much easier integration.


The images might give you an idea where to find the port.
I missed the right screw driver so was a bit creative accessing the ethernet port.

1 Like

Hello,

Thx all for the work done to get the values in HA.

Is there a way to decrease the charging power ?

I use it in single phase 230V, charging at about 7kW but I would like to adjust the power dynamically. (There is a Dynamic power management module connected to it. NewMotion Advanced 3.0)

Greetings

McNally installed a Type 2 20KW 3-phase Wi-Fi car charger in the summer of 2022. Last night after a few days of minus 3/7 degree temps, the car charger unit continually locks out and fails. The fuse box is OK and we have tested the Audi ETRON EV with a 13 amp plug charger and all works fine. We have isolated the problem to the charger. Has any member experienced this problem with a New Motion car charger?