snicker / juicepassproxy

Proxy UDP requests to/from Juicebox EV chargers to MQTT discoverable by Home Assistant
25 stars 8 forks source link

first version that can control current locally without enelx servers #69

Open ivanfmartinez opened 1 month ago

ivanfmartinez commented 1 month ago

Not for merging now, but others can start testing to see and give feedback

ivanfmartinez commented 1 month ago

Working to control the charging current based on solar power availability

Screenshot_2024-06-02_13-02-59

ivanfmartinez commented 1 month ago

Sample HA automation to Pause/Start charging, working fine in my environment, in my case I resume with 12 amps and other automation that controls current by solar will take place to control.

In my case the minumum value must be 11 because the Bolt use a different behaviour when thinks that are connected to a portable chager when value is 10 or lower.

I dont know if this kind of sample can go on README or we must have a different file for information about this.

alias: EVSE - Enable / Pause Charging by schedule
description: ""
trigger:
  - platform: state
    entity_id:
      - schedule.horario_carregamento_evse
condition: []
action:
  - choose:
      - conditions:
          - condition: and
            conditions:
              - condition: state
                entity_id: schedule.horario_carregamento_evse
                state: "on"
              - condition: numeric_state
                entity_id: number.juicebox_max_charging_current
                below: "1"
        sequence:
          - service: number.set_value
            metadata: {}
            data:
              value: "12"
            target:
              entity_id: number.juicebox_max_charging_current
      - conditions:
          - condition: and
            conditions:
              - condition: state
                entity_id: schedule.horario_carregamento_evse
                state: "off"
              - condition: numeric_state
                entity_id: number.juicebox_max_charging_current
                above: 1
        sequence:
          - service: number.set_value
            metadata: {}
            data:
              value: "0"
            target:
              entity_id: number.juicebox_max_charging_current
mode: single
ivanfmartinez commented 1 month ago

Energy session reset on pause

Screenshot_2024-06-07_08-42-58

markgergely commented 3 days ago

do you have a docker tag with these changes? id love to test this as i have a similar usecase to yours

ivanfmartinez commented 3 days ago

@markgergely

do you have a docker tag with these changes? id love to test this as i have a similar usecase to yours

I dont have the environment to build and publish this docker containers, I'm just using -volumes on my docker-compose to override the files.

Maybe @Snuffy2 can create a tag like the async branch.

Here is my docker-compose.override.yaml file

services:
  juicepassproxy_tst:
    volumes:
      - ./tests/juicepassproxy.py:/juicepassproxy/juicepassproxy.py:ro
      - ./tests/juicebox_mqtthandler.py:/juicepassproxy/juicebox_mqtthandler.py
      - ./tests/juicebox_checksum.py:/juicepassproxy/juicebox_checksum.py
      - ./tests/juicebox_exceptions.py:/juicepassproxy/juicebox_exceptions.py
      - ./tests/juicebox_message.py:/juicepassproxy/juicebox_message.py
      - ./tests/juicebox_mitm.py:/juicepassproxy/juicebox_mitm.py
Snuffy2 commented 3 days ago

Sure, I can get it into an alternate docker tag. Is it to a point where it is ready for others who are interested to start testing it?

Snuffy2 commented 3 days ago

image: ghcr.io/snicker/juicepassproxy:juicebox_commands

markgergely commented 3 days ago

thanks for the quick turnaround, I am already running it, will report back

ivanfmartinez commented 3 days ago

Sure, I can get it into an alternate docker tag. Is it to a point where it is ready for others who are interested to start testing it?

It's working fine in my environment very stable. Sure others can test, but we need to decide if I went to correct direction.

After more people test, with more firmware versions, we will know if the JuiceboxMessage class works for other versions and that code can be used to replace the current parsing of messages.