home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71k stars 29.65k forks source link

Enel X migrating from JuiceNet to JuicePass #86588

Open W0GER opened 1 year ago

W0GER commented 1 year ago

The problem

Enel X is migrating from JuiceNet to JuicePass.

Received email stating:

To provide you with the best user experience and new functionalities, we are transitioning to a new and improved platform for charging management. Your charging station will be migrated to the new JuicePass app (Enel X Way app). The EV JuiceNet app along with web browser access to your charger via home.juice.net will no longer be supported after February 20, 2023. Configurability and control of your chargers must be done via the new JuicePass app (Enel X Way app) which can be downloaded on iOS or Android.

since migrating my account, the JuiceNet app shows “disconnected” while their new app JuicePass shows the current data.

Is there a plan to update the Home Assistant core JuiceNet integration to work with JuicePass?

What version of Home Assistant Core has the issue?

2022.12.5

What was the last working version of Home Assistant Core?

2022.12.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

mschwartz commented 1 year ago

Wireshark is perfect for analyzing the two way communication between the app and the device and servers.

FWIW

owen2 commented 1 year ago

A generic Gecko component would be neat.

MrDrew514 commented 1 year ago

Flashing a custom firmware into the device for local control after what they did would be the perfect futur proof solution! #dreaming

strawless commented 1 year ago

If I understand correctly, the solution found in #86588 (comment) allows for reading. My main use case would be to dynamically change the charging power based on the current grid load, and thus writing to the device. Turn the oven on → charge with less power and vice versa. Did anyone figure out if this could be done?

The native Enel X Way app allowed for changing the power while a charging session was ongoing for a while, but it was buggy and only let you lower the power, but not boost it up again (what a sh1tshow). It now has completely disappeared from said hilarious app again.

You should be able to do this with the man in the middle process using port 8051. This is what is sent from the Enel Server to the Juicenet box. You can adjust the Max AMPs by changing the 40 to a lower value here b'CMD21838A0040M040C006S150!23H$

kintaroju commented 12 months ago

ok, just managed to plug the car in and did a telnet with a "get all", unfortunately nothing useful appear in terms of voltage or power usage.

ninoz commented 11 months ago

I emailed the EnelX support desk and explained I need API access for automation, they put in a request and a few days later I was able to add the charger using the old app with full API access.

No idea how long this will be live for or if they will move me again.

barrymichels commented 11 months ago

I asked the same thing a few months ago and they said no way. I wish I could sell mine and buy a different unit, but I can't afford to do that. Stuck with this one.

On Sun, Sep 24, 2023 at 3:53 PM ninoz @.***> wrote:

I emailed the EnelX support desk and explained I need API access for automation, they put in a request and a few days later I was able to add the charger using the old app with full API access.

No idea how long this will be live for or if they will move me again.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/86588#issuecomment-1732655445, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHJZP3EQMPH4NIAB2FI5MLX4CFS5ANCNFSM6AAAAAAUFWZFKY . You are receiving this because you commented.Message ID: @.***>

mschwartz commented 11 months ago

I emailed the EnelX support desk and explained I need API access for automation, they put in a request and a few days later I was able to add the charger using the old app with full API access.

No idea how long this will be live for or if they will move me again.

The API stopped working for me, though data was available up to the time my charger went offline and I was forced to migrate to the new app.

I read somewhere that they were contracting for the old app and API and that they weren't going to anymore.

I did email their support about the API being missing today.

CharlieDelta6 commented 11 months ago

Still on the old system here with our 2 unit load group. Maybe that's a way to get back on the old API?

mschwartz commented 11 months ago

I had no choice but to migrate. My charger just wen offline by itself. When I called support, they said I had to migrate to the new app.

I got a reply to my request for a public API (again) and they gave me a link to how to use the charger with Alexa and Siri. I replied that I really want to use software to access the API for good reason.

The reply to that was "forward to our system guys for further consideration."

EDIT: my last reply to them was to ask if they could move me back to the old system :)

The API still works - I can poll it and get data. The data just stopped about the same time I was forced to migrate.

jon6fingrs commented 10 months ago

If I understand correctly, the solution found in #86588 (comment) allows for reading. My main use case would be to dynamically change the charging power based on the current grid load, and thus writing to the device. Turn the oven on → charge with less power and vice versa. Did anyone figure out if this could be done? The native Enel X Way app allowed for changing the power while a charging session was ongoing for a while, but it was buggy and only let you lower the power, but not boost it up again (what a sh1tshow). It now has completely disappeared from said hilarious app again.

You should be able to do this with the man in the middle process using port 8051. This is what is sent from the Enel Server to the Juicenet box. You can adjust the Max AMPs by changing the 40 to a lower value here b'CMD21838A0040M040C006S150!23H$

You are a genius. I had never used the Juicebox integration to control the device, but instead just like receiving data, primarily whether or not the device is plugged in. Both my wife and I have pluggable cars and I have an integration to alert one of us as to whether or not the other is plugged in behind the house so the other person knows to park elsewhere when returning home.

I did a few things differently, however, to get things set up.

FIrst, I did not need to set any firewall rules. Through telnet, I simply changed the hard-coded DNS address of the device to make sure it pointed to my adguard instance which rewrote the server and redirected it back to a proxmox container with a udp server set up.

Through telnet, one can do the following:


set wlan.static.dns <ip address of local dns>

save

In telnet, if you use the "list" command, you'll see the udp stream where the device is sending its data.

Mine is "juicenet-udp-prod3-usa.enelx.com:8047"

Then in my adguard server, I rewrote

juicenet-udp-prod3-usa.enelx.com

to point to my proxmox container.

That was all I needed to do to have the data sent to the correct place.

Then I tried your python script after changing the port to 8047. The container received data and printed the total power used but nothing else. I do not know python and so it was tough for me to figure out what was going on. Instead I went with a generic udp server script I found online and made a modification so that the string of data was forwarded to home assistant where I am far more comfortable slice and dicing.

https://pythontic.com/modules/socket/udp-client-server-example

I took that server script and modified it like so:

import socket
import requests
#from urllib.parse import urlencode 
import json

localIP     = "0.0.0.0"

localPort   = 8047

bufferSize  = 1024

msgFromServer       = "Hello UDP Client"

bytesToSend         = str.encode(msgFromServer)

# Create a datagram socket

UDPServerSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)

# Bind to address and ip

UDPServerSocket.bind((localIP, localPort))

print("UDP server up and listening")

# Listen for incoming datagrams

while(True):

    bytesAddressPair = UDPServerSocket.recvfrom(bufferSize)

    message = bytesAddressPair[0]

    address = bytesAddressPair[1]

    clientMsg = "Message from Client:{}".format(message)
    clientIP  = "Client IP Address:{}".format(address)

    print(clientMsg)
    print(clientIP)

    url = 'http://<ha ip address>/api/webhook/<webhook name>'
    myobj = {'raw_data': clientMsg }

    x = requests.post(url, json={'raw_data': clientMsg})

    print(x.text)

    # Sending a reply to client

    UDPServerSocket.sendto(bytesToSend, address)

In Home assistant, I set up a simple automation where the webhook took the json data and saved it as an input_String.

alias: juicebox receiver
description: ""
trigger:
  - platform: webhook
    allowed_methods:
      - POST
      - PUT
    local_only: true
    webhook_id: juicebox
condition: []
action:
  - service: input_text.set_value
    data:
      value: "{{ trigger.json.raw_data.split(\":\")[2] }}"
    target:
      entity_id: input_text.juicebox_raw_data
mode: single

So now, 'input_text.juicebox_raw_data' is continuously updated with the most recent string sent by the juicebox. Now it was just a matter of making 7 template sensors based on the information from your original python script where you parsed out what did what.

juicebox status

{% set status = states('input_text.juicebox_raw_data').split(",")[5] %}

{% if status == 'S0' %}
  unplugged
{% elif status == 'S1' %}
  plugged
{% elif status == 'S2' %}
  charging
{% endif %}

juicebox current

{% if states('sensor.juicebox_plugged') == 'charging' %}
  {{ states('input_text.juicebox_raw_data').split(",")[16].split("A")[1]|float(default=0) }}
{% else %}
  0.0
{% endif %}

juicebox frequency

{{ states('input_text.juicebox_raw_data').split(",")[12].split("f")[1]|float(default=0)*0.01 }}

juicebox lifetime power

{{ states('input_text.juicebox_raw_data').split(",")[4].split("L")[1]|float(default=0) }}

juicebox session power


{% if states('sensor.juicebox_plugged') == 'charging' %}
  {{ states('input_text.juicebox_raw_data').split(",")[15].split("E")[1]|float(default=0) }}
{% else %}
  0.0
{% endif %}

juicebox temperature (i changed to Fahrenheit)

{{ states('input_text.juicebox_raw_data').split(",")[6].split("T")[1]|float(default=0)*1.8+32 }}

juicebox voltage

{{ states('input_text.juicebox_raw_data').split(",")[3].split("V")[1]|float(default=0)*0.1 }}

Now I just had to set the proxmox container to start automatically and started the python script with systemd. The juicebox is otherwise blocked from the internet and the integration has gone from cloud polling to local push, albeit, without the ability to control it at this time.

Hope this helps someone.

MrDrew514 commented 10 months ago

If I understand correctly, the solution found in #86588 (comment) allows for reading. My main use case would be to dynamically change the charging power based on the current grid load, and thus writing to the device. Turn the oven on → charge with less power and vice versa. Did anyone figure out if this could be done? The native Enel X Way app allowed for changing the power while a charging session was ongoing for a while, but it was buggy and only let you lower the power, but not boost it up again (what a sh1tshow). It now has completely disappeared from said hilarious app again.

You should be able to do this with the man in the middle process using port 8051. This is what is sent from the Enel Server to the Juicenet box. You can adjust the Max AMPs by changing the 40 to a lower value here b'CMD21838A0040M040C006S150!23H$

You are a genius. I had never used the Juicebox integration to control the device, but instead just like receiving data, primarily whether or not the device is plugged in. Both my wife and I have pluggable cars and I have an integration to alert one of us as to whether or not the other is plugged in behind the house so the other person knows to park elsewhere when returning home.

I did a few things differently, however, to get things set up.

FIrst, I did not need to set any firewall rules. Through telnet, I simply changed the hard-coded DNS address of the device to make sure it pointed to my adguard instance which rewrote the server and redirected it back to a proxmox container with a udp server set up.

Through telnet, one can do the following:


set wlan.static.dns <ip address of local dns>

save

In telnet, if you use the "list" command, you'll see the udp stream where the device is sending its data.

Mine is "juicenet-udp-prod3-usa.enelx.com:8047"

Then in my adguard server, I rewrote

juicenet-udp-prod3-usa.enelx.com

to point to my proxmox container.

That was all I needed to do to have the data sent to the correct place.

Then I tried your python script after changing the port to 8047. The container received data and printed the total power used but nothing else. I do not know python and so it was tough for me to figure out what was going on. Instead I went with a generic udp server script I found online and made a modification so that the string of data was forwarded to home assistant where I am far more comfortable slice and dicing.

https://pythontic.com/modules/socket/udp-client-server-example

I took that server script and modified it like so:

import socket
import requests
#from urllib.parse import urlencode 
import json

localIP     = "0.0.0.0"

localPort   = 8047

bufferSize  = 1024

msgFromServer       = "Hello UDP Client"

bytesToSend         = str.encode(msgFromServer)

# Create a datagram socket

UDPServerSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)

# Bind to address and ip

UDPServerSocket.bind((localIP, localPort))

print("UDP server up and listening")

# Listen for incoming datagrams

while(True):

    bytesAddressPair = UDPServerSocket.recvfrom(bufferSize)

    message = bytesAddressPair[0]

    address = bytesAddressPair[1]

    clientMsg = "Message from Client:{}".format(message)
    clientIP  = "Client IP Address:{}".format(address)

    print(clientMsg)
    print(clientIP)

    url = 'http://<ha ip address>/api/webhook/<webhook name>'
    myobj = {'raw_data': clientMsg }

    x = requests.post(url, json={'raw_data': clientMsg})

    print(x.text)

    # Sending a reply to client

    UDPServerSocket.sendto(bytesToSend, address)

In Home assistant, I set up a simple automation where the webhook took the json data and saved it as an input_String.

alias: juicebox receiver
description: ""
trigger:
  - platform: webhook
    allowed_methods:
      - POST
      - PUT
    local_only: true
    webhook_id: juicebox
condition: []
action:
  - service: input_text.set_value
    data:
      value: "{{ trigger.json.raw_data.split(\":\")[2] }}"
    target:
      entity_id: input_text.juicebox_raw_data
mode: single

So now, 'input_text.juicebox_raw_data' is continuously updated with the most recent string sent by the juicebox. Now it was just a matter of making 7 template sensors based on the information from your original python script where you parsed out what did what.

juicebox status

{% set status = states('input_text.juicebox_raw_data').split(",")[5] %}

{% if status == 'S0' %}
  unplugged
{% elif status == 'S1' %}
  plugged
{% elif status == 'S2' %}
  charging
{% endif %}

juicebox current

{% if states('sensor.juicebox_plugged') == 'charging' %}
  {{ states('input_text.juicebox_raw_data').split(",")[16].split("A")[1]|float(default=0) }}
{% else %}
  0.0
{% endif %}

juicebox frequency

{{ states('input_text.juicebox_raw_data').split(",")[12].split("f")[1]|float(default=0)*0.01 }}

juicebox lifetime power

{{ states('input_text.juicebox_raw_data').split(",")[4].split("L")[1]|float(default=0) }}

juicebox session power


{% if states('sensor.juicebox_plugged') == 'charging' %}
  {{ states('input_text.juicebox_raw_data').split(",")[15].split("E")[1]|float(default=0) }}
{% else %}
  0.0
{% endif %}

juicebox temperature (i changed to Fahrenheit)

{{ states('input_text.juicebox_raw_data').split(",")[6].split("T")[1]|float(default=0)*1.8+32 }}

juicebox voltage

{{ states('input_text.juicebox_raw_data').split(",")[3].split("V")[1]|float(default=0)*0.1 }}

Now I just had to set the proxmox container to start automatically and started the python script with systemd. The juicebox is otherwise blocked from the internet and the integration has gone from cloud polling to local push, albeit, without the ability to control it at this time.

Hope this helps someone.

Thank you for helping! I'm just wondering if there is a way of archieving this without the use of adguard, I'm currently on unraid. I'm guessing your adguard instance is intercepting the traffic before it's sent to enelx and redirects it to your container running your udp server?

jon6fingrs commented 10 months ago

AdGuard really has nothing to do with it. It’s just what I use for a dns server. This method would require you to be able to at least overwrite specific dns entries through your router software of local dns server.

snicker commented 10 months ago

Just found this thread tonight after finally deciding to investigate why I wasn't getting data from my Juicebox for the last few months. What a drag!

thanks @jon6fingrs and @mskwik and @Scott8586 though for digging into this, I'm definitely standing on the shoulders of giants, but I built a slightly more robust solution for people to use in the meantime while we continue to poll EnelX on fixing their API.

https://github.com/snicker/juicepassproxy

This tool

  1. is a full MITM UDP proxy- you will retain mobile app functionality
  2. creates MQTT autodiscoverable entities in Home Assistant using the awesome https://github.com/unixorn/ha-mqtt-discoverable library
  3. as @strawless pointed out, this also should be able to support setting amperage and "charge now" in the future from HA by masquerading to the client device as the server (does not do this yet, but it's possible) (eg the b'CMD21838A0040M040C006S150!23H$) message

Try it out, file issues, I will try to add functionality but welcome PRs since I'm not interested myself in the control functionality, just monitoring at the moment, and it seems to be working!

image
jon6fingrs commented 10 months ago

Wow this is really impressive. Btw, does all of this mean that information from our houses is being transmitted unencrypted through the internet? I mean, I guess it's nothing super personal but somebody could use it as a surrogate marker to know when we are home. I'm sure there are other examples of nefarious uses too.

pgenera commented 10 months ago

I have two units and an overnight packet capture of both of them running in load sharing group from before the backend switch from juicenet to enel x (trash). The load group functionality in JuicePass, although they can set it up manually, does not work at all (chargers won't start charging and won't share load). I haven't the patience to dig through the command format yet, but here it is if anyone finds it useful.

enelx-packets.zip

jon6fingrs commented 10 months ago

I noticed that my webhook stopped receiving data. When I telnet'ed into the device, I saw that it began trying a different server- jbv1.emotowerks.com port 8042. Had to add a local dns entry and a second process for the udp server to set up on port 8042 but working again as before. I have my charger blocked from the internet probably why it started trying a different server. Will see if it tries changing again after some more time.

eduspina commented 10 months ago

Mine came back to the old app, maybe that's why the different server.

Em dom., 5 de nov. de 2023 18:27, jon6fingrs @.***> escreveu:

I noticed that my webhook stopped receiving data. When I telnet'ed into the device, I saw that it began trying a different server- jbv1.emotowerks.com port 8042. Had to add a local dns entry and a second process for the udp server to set up on port 8042 but working again as before. I have my charger blocked from the internet probably why it started trying a different server. Will see if it tries changing again after some more time.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/86588#issuecomment-1793850825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU4GHYCOFPCNXEWG6ZOMWTLYC7ZDPAVCNFSM6AAAAAAUFWZFK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTHA2TAOBSGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MrDrew514 commented 10 months ago

Is there any way to archieve the local solution without setting up a custom dns? It seems like my router is not allowing custom dns (ex: AdGuard). I'd need to find a workaround or change my isp router

jon6fingrs commented 10 months ago

Is there any way to archieve the local solution without setting up a custom dns? It seems like my router is not allowing custom dns (ex: AdGuard). I'd need to find a workaround or change my isp router

You wouldn't need your whole network to use the local dns. You could set up pihole or AdGuard somewhere with that one change and then use telnet to change the hard coded dns address in the charger to your local one.

jesserockz commented 10 months ago

Nice work @snicker .

I did the same thing years ago but in node-red and stored every sent and received packet in MySQL.

Never got around to deciphering how they generate the checksum at the end of the string though so could never control the device to make it fully local. Otherwise I would have integrated that directly in HA.

Edit: I reached out for help a while back but never got any responses https://stackoverflow.com/questions/63518944/can-anyone-identify-and-reproduce-what-seems-like-a-checksum

MrDrew514 commented 10 months ago

Is there any way to archieve the local solution without setting up a custom dns? It seems like my router is not allowing custom dns (ex: AdGuard). I'd need to find a workaround or change my isp router

You wouldn't need your whole network to use the local dns. You could set up pihole or AdGuard somewhere with that one change and then use telnet to change the hard coded dns address in the charger to your local one.

Thank you for pointing this out!

Would really appreciate if someone could make a dockerhub/unraid container for the juicepassproxy if anyone is using these.

strawless commented 10 months ago

Is modifying the DNS settings working for everyone else? I tried the set wlan.static.dns save and even rebooted the box but I still see all of the traffic going to the two dns servers from get wlan.network.dns 8.8.8.8,8.8.4.4 when I do a tcpdump from my router.

My thought is it would be nice to have a single script that is all encompassing that could go off, scan all of your network for the juicebox with the open port 2000, then it could set up the dns, then it would spawn a DNS server that would just redirect to a local instance that would be in charge of interpreting the data for HASS or Sense in my case, and then also forward it on to the internet ports so the Enel X crappy application continues to work.

snicker commented 10 months ago

@strawless @mrdrew added a feature request for the built in DNS server: https://github.com/snicker/juicepassproxy/issues/7

could be easier to implement in a docker container as a separate process in the short term

the "scan network, telnet to device, set dns" thing is a grand idea too, but would require that feature implementation first

strawless commented 10 months ago

@strawless @MrDrew added a feature request for the built in DNS server: snicker/juicepassproxy#7

could be easier to implement in a docker container as a separate process in the short term

the "scan network, telnet to device, set dns" thing is a grand idea too, but would require that feature implementation first

@snicker to confirm, set wlan.static.dns save was all you had to do for it to use that ip address to try and get the dns lookups?

jon6fingrs commented 10 months ago

@strawless @MrDrew added a feature request for the built in DNS server: snicker/juicepassproxy#7

could be easier to implement in a docker container as a separate process in the short term

the "scan network, telnet to device, set dns" thing is a grand idea too, but would require that feature implementation first

@snicker to confirm,

set wlan.static.dns

save

was all you had to do for it to use that ip address to try and get the dns lookups?

That is all I did and the DNS setting has persisted across numerous reboots.

ryanbortoluzzi commented 9 months ago

@snicker Thanks for packaging up the juicepassproxy app and creating the docker container. I was able to get it up and running on my Unraid server with a few adjustments.

My first time using my JuiceBox 48 charger was last weekend. I thought I had a perfecting working solution with the old JuiceBox app and HA integration. Lo and behold I was forced over to the Enel X app and JuicePass to get my home charging session to start.

I just needed to make the following adjustments to the Unraid docker installation to get it working:

  1. Changed port to UDP 8043
  2. Forwarded port 8043 to the docker container.
  3. Add variables for my MQTT username and password.

Thanks again for the development. Let's hope unencrypted UDP transmission to the JuicePass cloud stays around for a while.

MrDrew514 commented 9 months ago

@snicker Thanks for packaging up the juicepassproxy app and creating the docker container. I was able to get it up and running on my Unraid server with a few adjustments.

My first time using my JuiceBox 48 charger was last weekend. I thought I had a perfecting working solution with the old JuiceBox app and HA integration. Lo and behold I was forced over to the Enel X app and JuicePass to get my home charging session to start.

I just needed to make the following adjustments to the Unraid docker installation to get it working:

  1. Changed port to UDP 8043
  2. Forwarded port 8043 to the docker container.
  3. Add variables for my MQTT username and password.

Thanks again for the development. Let's hope unencrypted UDP transmission to the JuicePass cloud stays around for a while.

I'm also using unraid, are you using a static ip for the juicebox device on your router?

ryanbortoluzzi commented 9 months ago

I'm also using unraid, are you using a static ip for the juicebox device on your router?

That's right. The Juicebox charger is assigned a fixed IP by my DHCP server (static IP via DHCP.)

Big-GH commented 9 months ago

Does anyone have a list of the Enel X Way servers that the EVSE should talk to? My EVSE has been offline in the Enel X Way app since 26th October, i cannot get Enel X Way to fix it, they just keep closing my support tickets without resolving the issue. If i telnet to my charger and do a "list" command i get

! # Type Info

0 UDPC jbv1.emotorwerks.com:8042 (9726)

I could be grasping at straws but that server no longer exists, there's no DNS record for it so i wonder if it needs changing. UK based if that makes a difference.

Snuffy2 commented 9 months ago

@tomayac from your examination of the apk were you able to determine anything about how the checksum is calculated at the end of the CMD strings? At least presumably it is a checksum.

For example: CMD00153A0040M040C242S963!YE8$ CMD Day of Week Hour Minute A Amps M Max Amps C Command S Counter ! Checksum $
CMD 0 01 53 A 0040 M 040 C 242 S 963 ! YE8 $
tomayac commented 9 months ago

@tomayac from your examination of the apk were you able to determine anything about how the checksum is calculated at the end of the CMD strings? At least presumably it is a checksum.

Unfortunately no. If someone wants to try, these steps worked for me for decompiling:

  1. Check the version number of the official app on the Play Store (4.3.42 at the time of this writing).
  2. Find an APK mirror that has this version (APKPure worked at the time of this writing).
  3. Find an online APK decompiler, decompile, and download the source files (Decompiler worked at the time of this writing).
  4. Open the source files in VS Code and search for api/, excluding .json files.
  5. Comb through the code to figure out how stuff works.

Screenshot 2023-11-23 at 10 04 18

bwoodworth commented 9 months ago

@snicker Thanks for the work on creating the proxy and dockerizing it. I have it running and it is connecting to my Juicebox just fine, but the entities in HA are not getting created like I would expect. It just created the device with one entity Last Debug Message. Do I need to initiate a charging session for the rest of the entities to show up? image

FIXED - My JuiceBox and HA were on separate VLANS. Once I put the JuiceBox on the same VLAN as HA everything started working.

naiming-zededa commented 8 months ago

@snicker very good project! i brought it up docker container running, and fed mqtt data into my HA, but the 'status' and 'current' values don't seem to be right. I have the car plugged in, and is charging (from the EnelX app), the the output, some of the value like 'Energy-Lifetime' seems ok, wondering why:

from docker logs: 2023-12-17 20:55:11,260 INFO UDPC IP correct 2023-12-17 20:55:58,244 INFO Setting Current to 0 using hmd/sensor/JuiceBox/Current/state 2023-12-17 20:55:58,244 INFO Setting Energy (Session) to 0 using hmd/sensor/JuiceBox/Energy--Session-/state 2023-12-17 20:55:58,244 INFO Setting Voltage to 211.3 using hmd/sensor/JuiceBox/Voltage/state 2023-12-17 20:55:58,244 INFO Setting Energy (Lifetime) to 5523958.0 using hmd/sensor/JuiceBox/Energy--Lifetime-/state 2023-12-17 20:55:58,244 INFO Setting Status to Unplugged using hmd/sensor/JuiceBox/Status/state 2023-12-17 20:55:58,245 INFO Setting Temperature to 64.4 using hmd/sensor/JuiceBox/Temperature/state 2023-12-17 20:55:58,245 INFO Setting Frequency to 59.98 using hmd/sensor/JuiceBox/Frequency/state 2023-12-17 20:55:58,245 INFO Setting Power to 0.0 using hmd/sensor/JuiceBox/Power/state

macjeff commented 7 months ago

any update on the actual API being updated?

barrymichels commented 7 months ago

@snicker Thanks for the proxy! I've been asking for API updates periodically for the last year. After my last time asking and getting another "it's coming eventually" response, I decided to try the proxy. It's running so well that in addition to getting data in HA again, my charging sessions start so much faster now. Before, when I plugged in my car, I wouldn't hear the beep from the garage until I had taken my shoes off and come inside (30-45 seconds). Now, it beeps within 5 seconds of plugging in. I guess the delay was DNS related.

macjeff commented 6 months ago

anyone willing to help me get this going for a small fee? I have home assistant running fine. Just no luck on this.

carrel-gr commented 6 months ago

Wow, this is great! Thanks so much. With Juicepassproxy, I can now see my EVSE in HA.

Dystaxia commented 6 months ago

Just set up it up... Juicepassproxy for the win!!! Thanks!

dambrosioj commented 6 months ago

Is anyone that is using juicepassproxy having issues with interruptions documented here : https://github.com/snicker/juicepassproxy/issues/43

I am hesitant to set it up, seems problematic.

pgenera commented 6 months ago

unrelated to the proxy, but I've discovered that if I block outbound port 443 from my chargers they'll remain registered to juice.net, which gives me the working load sharing that I need.

On Tue, Feb 20, 2024 at 8:45 PM dambrosioj @.***> wrote:

Is anyone that is using juicepassproxy having issues with interruptions documented here : snicker/juicepassproxy#43 https://github.com/snicker/juicepassproxy/issues/43

I am hesitant to set it up, seems problematic.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/86588#issuecomment-1955716400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3GOK2RRBLJW6P3HZTH5LYUVGUVAVCNFSM6AAAAAAUFWZFK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJVG4YTMNBQGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dambrosioj commented 6 months ago

Has anyone tried setting up a DNAT rule with unifi or within pihole? I tried doing a port forward within unifi to forward 8047 from the juicebox to the docker container on 8047, but that doesn't seem to be working. Does it only send data when the charger starts charging?

ivanfmartinez commented 6 months ago

Has anyone tried setting up a DNAT rule with unifi or within pihole? I tried doing a port forward within unifi to forward 8047 from the juicebox to the docker container on 8047, but that doesn't seem to be working. Does it only send data when the charger starts charging?

Mine is using 8042, and I have it working on mikrotik. It keeps sending data after connected to wifi network, not only when charging

dambrosioj commented 6 months ago

Has anyone tried setting up a DNAT rule with unifi or within pihole? I tried doing a port forward within unifi to forward 8047 from the juicebox to the docker container on 8047, but that doesn't seem to be working. Does it only send data when the charger starts charging?

Mine is using 8042, and I have it working on mikrotik. It keeps sending data after connected to wifi network, not only when charging

Do you have a screenshot of your rule? I am new to unifi, previously this would have been simple in pfsense. When I telnet into the juicebox and did a list it was on 8047 maybe ill have to check again just to make sure

ivanfmartinez commented 6 months ago

Has anyone tried setting up a DNAT rule with unifi or within pihole? I tried doing a port forward within unifi to forward 8047 from the juicebox to the docker container on 8047, but that doesn't seem to be working. Does it only send data when the charger starts charging?

Mine is using 8042, and I have it working on mikrotik. It keeps sending data after connected to wifi network, not only when charging

Do you have a screenshot of your rule? I am new to unifi, previously this would have been simple in pfsense. When I telnet into the juicebox and did a list it was on 8047 maybe ill have to check again just to make sure

I have my rules in this issue that I made in the proxy to add this kind of information in documentation : https://github.com/snicker/juicepassproxy/issues/50

You have to make the DNAT rule, depending of your networks you have to make the MASQUERADE and FORWARD rules. If the juicenet is on same network of the proxy you must have the MASQUERADE rule.

dambrosioj commented 6 months ago

I was able to get it working through pihole and redirecting the dns traffic. Thanks all!

Derdzyan commented 6 months ago

Am I seeing all correct that Juicenet and home.juice.net are working as they were a year ago?

Screenshot 2024-02-24 at 3 19 38 PM
dambrosioj commented 6 months ago

Am I seeing all correct that Juicenet and home.juice.net are working as they were a year ago? Screenshot 2024-02-24 at 3 19 38 PM

Thats interesting. Did you have to readd yours back to juicenet? I thought once you moved to the new app there was no way to go back.

wguerlich commented 6 months ago

Can confirm what Derdzyan wrote... for me it's working just fine (never was migrated to JuicePass though)

macjeff commented 6 months ago

I moved over because they sent so many emails that it would stop working by March. It stopped working then and I tried to go back and it wont let me so for me its not working. I also could not get this hack working so doing without it. Their NEW app is working fine for me.