# ¶ Prerequisites

You will need:

- A log in for the wallbox online interface
- The ip of your cofybox in your local network. This can be found from either:
  - the balena dashboard
  - using a network scanning app such as fing

# ¶ Charger settings

1. You might need to update the charger's network to point at your home wifi, if it doesn't already. This can be done via the wallbox app, with a local bluetooth connnection.

2. Log into the wallbox online interface.

3. Click on your charger, and go to the OCPP tab

4. Update the web address: You will need to change the url to `ws://192.168.***.***:80/ocpp/` where the asterisks are the ip of your cofybox on your local network. Leave the Charge point identity as `charger` and the Password empty.

5. Click on the radio button:
   on the top right of the websocket connection box to turn OCPP on.

# ¶ Homeassistant settings

1. Log into your homeassistant instance, via:
   - `10.42.0.1` when connected to the cofybox's wifi network
   - at the ip address we used above when connected to your home network (in the example above, `192.168.175`)
   - at the remote url which can be found in the cofycloud or from the Balena dashboard
2. Add the OCPP integration
   a. Go to settings, then Devices & Services
   b. Click Add Integration and search for ocpp
   c. leave all settings as default
3. Click on the new device (via the 2 devices under the integration, or the Devices tab)
   Here the fields should be Unknown or filled with data (not Unavailable). This may take a few minutes.
4. From here you can turn charging on and off with the `Charge_Control` toggle, if your car is plugged in. You can also add automations etc. if you wish.

# ¶ Resetting the charger

In the case of a problem charging via homeassistant, you can:

1. Go back into the wallbox online interface.
2. Go into the OCPP tab (see above).
3. Turn off OCPP using the radio button on the top right of the websocket connection box (see above).

# ¶ Technical details

If you want to reinstate the behaviour of charging as soon as the car is plugged in, you can set up an automation such as:

    - id: '1656434780155'
      alias: Instant car charging
      description: ''
      trigger:
      - platform: state
        entity_id:
        - sensor.qn01zg24_status_connector
        from: Available
        to: Preparing
      condition: []
      action:
      - type: turn_on
        device_id: 36c0b6365cfe255731d1af5d70f06d59
        entity_id: switch.qn01zg24_charge_control
        domain: switch
      mode: single