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
70k stars 29.08k 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

Githubthings commented 1 year ago

I have the same issue with Home Assistant. The EV JuiceNet app is also showing “disconnected” as well as the browser web login at home.juice.net/Portal

Dystaxia commented 1 year ago

Confirmed. Same situation.

Edit: The app is absolute garbage.

😆

jesserockz commented 1 year ago

Yeah I received an email notification from them saying they are shutting down the Juicenet portal and the Juicenet App which I assume meant the API that Home Assistant is using. Considering the API is mostly undocumented and I started this integration based on reverse engineering, I don't think it will be easy to migrate/update to use their new API.

I myself also do not use (or even have) a juicenet charger any more so I am not going to be of any use here.

home-assistant[bot] commented 1 year ago

juicenet documentation juicenet source

MrDrew514 commented 1 year ago

Let's hope that a developer was using this integration and will be updating it to the new api #fingerscrossed

michaelwoods commented 1 year ago

I took a look using a SSL/MITM proxy and couldn't make much sense of the APIs used. They seem to issue POSTs with no response and then possibly receive (gRPC?) data over Google APIs, maybe a firebase offering. I can't see too much further as the SSL isn't transparent between Google Play Services and their servers.

aravindtri commented 1 year ago

Having the same issue and the new app is terrible

barrymichels commented 1 year ago

Spoke with support and they confirmed the API is going away and they have no plans in offering a similar product. I asked if they could submit a suggestion/request for one in the future This is one of the reasons I went with a JuiceBox. 😢

MrDrew514 commented 1 year ago

I'm guessing no API doesn't mean no integration. Is there still hope for this?

barrymichels commented 1 year ago

At this point, no. I hope enough customers request this feature so they see the demand and bring a new API online.

MrDrew514 commented 1 year ago

image

Reached the support and sent a complaint for the API removal.

barrymichels commented 1 year ago

My chat with support on Jan 30th:

(09:37:31 PM) Spencer Simpson joined the chat (09:40:53 PM) Spencer Simpson: Hello Barry,

Your devices not connecting to home.juice.net is normal, and the phantom device in your app is a common product of the migration. After JuiceBoxes are moved to the server, they cease all communications with the home.juice.net server, and we are still moving on a timeline of completely shuttering it from Feb. 20th on. We can resolve the phantom JuicePass box by removing the unit from your home.juice.net account, leaving only the entry for your JuicePass account. (09:41:35 PM) Barry Michels: Ok. thank you. (09:42:24 PM) Barry Michels: So, is home.juice.net going away? I'm using that API to integrate the data into my Home Assistant server to log/monitor the energy delivered to my car. (09:43:01 PM) Spencer Simpson: Yes, it is going away, and there is definitely not a planned browser/web-based dashboard replacement. As for the status of a general residential user API, I am not able to confirm whether it is a planned feature at this time.

MrDrew514 commented 1 year ago

A decrease in the features will certainly affect customers experience, I contacted them to know if they plan on working on it since I primary bought it for that case and if they are offering a refund regarding this problem.

owen2 commented 1 year ago

We also lost the ability to manage load groups, so I complained about that and the API being unavailable. I was about to buy a 2nd charger and wire it to the same circuit. In the old system, it would limit the total amperage of the group to the rated amperage through software, and that isn't a feature in the new app... so fire risk, tripped breakers if you had that setup during the migration? yikes.

aravindtri commented 1 year ago

We also lost the ability to manage load groups, so I complained about that and the API being unavailable. I was about to buy a 2nd charger and wire it to the same circuit. In the old system, it would limit the total amperage of the group to the rated amperage through software, and that isn't a feature in the new app... so fire risk, tripped breakers if you had that setup during the migration? yikes.

I lost the ability to control charge current via juice pro but figured out a way to control it from Tesla.

wmoss commented 1 year ago

Got this today, so they don't seem to have their story straight but maybe there is hope.

image
dtrop1 commented 1 year ago

I hope they re-enable this. The new app is garbage.

CharlieDelta6 commented 1 year ago

We have a load group of 2 JB40 and still seem to be on the old system. Haven't received any migration email yet.

I did copy source locally and hard code max amp value at 40. That value was not being fetched correctly and would error (unable to set, valid range 6-0). Didn't want to dig too deep and fix properly due to the unknown status of the API.

niharmehta commented 1 year ago

If you have been impacted by this change, you can request support move you back to the old platform. It took a few weeks and requires a new token. It appears they know this migration has been a huge issue for their customers and they offered to move my system back. Not only did the new app/platform break the API, but it's TOU scheduling is broken, as well as load sharing capability doest not exist anymore either.

tomayac commented 1 year ago

I started a reverse-engineering effort of the new Enel X Way API and have put my findings in a public Gist. Help is very much welcome! So far I have the endpoints, but need to understand authentication, potentially request signing, etc.

MrDrew514 commented 1 year ago

I started a reverse-engineering effort of the new Enel X Way API and have put my findings in a public Gist. Help is very much welcome! So far I have the endpoints, but need to understand authentication, potentially request signing, etc.

Looks promising, is there a way to request an API after the migration?

tomayac commented 1 year ago

[I]s there a way to request an API after the migration?

Not that I know of. It’s all private.

I don’t want to share their code, since it’s probably copyrighted, but what I did was download the app’s .apk, and then decompiled it with an online tool. I think it’s written in Flutter, so more targeted techniques could potentially reveal better results, but I didn’t get to that yet.

cgraf commented 1 year ago

Any update on this one? I just got forced to the Enel X Way app and lost JuiceNet access including the mobile app, webapp, and HA integration.

Happy to help contribute if I can. Wondering if there is any additional understanding of the auth component. I believe JuiceNet creds work for the Enel X app, so wondering if the JuiceNet tokens still work with Enel X. Enel X appears to have their own account system at my.enelx.com but the JuiceNet creds don't work there, and there's no apparent way to create an account. It would seem at first glance like the Enel X Way app is still using JuiceNet for auth, but I have not really looked at it all. Just at the point of realizing I got migrated and everything broke.

Scott8586 commented 1 year ago

I don't know if this is helpful, but port 2000 is open for telnet to the Gecko OS of the JuiceBox - I tried to expose the web server on the wlan interface, and reboot, but the Juicebox seems to reset it to the softap/default on reboot. Maybe someone more industrious can figure out a way to expose something useful? I suspect you could really screw things up if you tried, so play around at your own risk...

$ telnet 192.168.35.xxx 2000
Trying 192.168.35.xxx...
Connected to gecko_os-afb.xxx.net.
Escape character is '^]'.
EMWERK-JB201-1.0.46, Gecko_OS-STANDARD-4.2.7-11064, WGM160P
> get ht s i
get ht s i
default
> set ht s i wlan
set ht s i wlan
Set OK
> network_restart -i wlan
network_restart -i wlan
Connection closed by foreign host.
wmoss commented 1 year ago

I played around with Gecko as well, but I don't think it's going to get you anywhere. The Gecko OS itself is only aware of the GPIO pins on the Gecko chip, what matters is the custom software that Enel is running under Gecko OS and how that's interacting with the GPIO pins and the data that it's sending up to the cloud. Even if you could reverse engineer that piece of software, I doubt you could run something on the Gecko system to monitor it.

cgraf commented 1 year ago

FWIW, I was told by Enel X support that I could no longer request to be switched back to JuiceNet once I switch to the new app. I decided to sell my charger, and get one that remains open for integrations, but soon found that in Enel X Way there is no longer a way to transfer ownership of a device. I wrote to support again and asked that they remove my ownership of the device so that I could resell it, at which point they were nice enough to move me back to JuiceNet.

kindly note that I have been successful in motivating that you be migrated back to EV JuiceNet so that you can continue using the web platform home.juice.net and API functions as you normally did, at least up unit the Enel X Way app is updated to support these features.

So there is hope. I busted out a new automation that automatically sets the amperage of my charger based on the remaining charge of my Powerwall. Works great except that charge_now off does not seem to work. It toggles in HA, but does not actually turn off. Oh well. Glad to have this much of an integration working so that car charging does not burn through my battery overnight or on cloudy days.

emilecantin commented 1 year ago

It looks like I've been moved automatically to the new platform. I never even installed their new app, the charger just started showing "unavailable" a few days ago.

@cgraf I just got off the chat with support, and they told me they ended the contract with the provider for the old platform. I would assume they'll probably force everyone on the new platform in the next few weeks.

This is very frustrating, as I bought that device specifically for the Home Assistant integration... I imagine I'm not the only one in that situation.

cgraf commented 1 year ago

This is very frustrating, as I bought that device specifically for the Home Assistant integration... I imagine I'm not the only one in that situation.

Yuck. Now that I've been using the HA integration to control amperage of the Juice Box based on remaining Powerwall charge, I will sell the Juice Box and get something that can be integrated. Sucks, but what can you do.

emilecantin commented 1 year ago

@cgraf Any idea what can be integrated? The most promising integration I can see is OpenEVSE, but they say they won't export to Canada (missing UL listing, I believe).

cgraf commented 1 year ago

Heh. I was just reading the forum to see what I would buy, and was specifically looking at OpenEVSE. Where do you read that they don't export to Canada? I was reading their discussion forums, and it looks like lots of users with with outdoor installations in Canada.

My charger is in the garage in Texas, so not the same level of concern. I did find an interesting thread about UL listing https://openev.freshdesk.com/support/discussions/topics/6000068314. It appears that all of their components are UL listed, but the device itself cannot be without expensive recertification each time they update the firmware, which kind of defeats the purpose of an open platform. They also mention that electrical inspection is not required for plug-in devices, only for hard-wired.

Please do share if you find some other Home Assistant compatible for North America.

cgraf commented 1 year ago

Where do you read that they don't export to Canada?

Ah yeah I see now "Not Available for export to Canada." listed right on the product. Could always order the kit which does not mention any export restrictions... :)

thivyan commented 12 months ago

Just got booted off the old platform as well (charger showing unavailable for the last 3 days). I'm assuming no one has found a workaround for this yet? They don't even have a web version of the app to scrape manually...

derekgates commented 12 months ago

Chiming in that I have also lost connectivity... opened app on phone to troubleshoot and was migrated to new system.

Thank you for the link to OpenEVSE.

tedzhouhk commented 11 months ago

Lost mine two days ago, called support and they said they cannot put me in the old service. For me I just need TOU and RestAPI override. However, this doesn't seem possible now. Temporarily, I can override using adb simulated touch input on my old android phone (yes, this is dumb and not a reliable method...)

Platup commented 11 months ago

Same here.
I posted a few 1 star reviews on different sellers to warn people there was a forced app migration and Home Assistant was no longer supported. And a negative app review, etc... I'm just hoping for the squeaky wheel effect.

tedzhouhk commented 11 months ago

For those who got the charger from Costco, you can return it even after the return period. I just returned mine after 14 months of use.

kintaroju commented 11 months ago

Just got booted off JuiceNet, and still pending migration to JuicePass :(. This was clearly a poorly planned migration from the get go, and to top it off never got a notification about it, even though their support team said I got an "app notification". I hope someone will be able to figure this, or at least remove the integration from HA

mskwik commented 11 months ago

So I got annoyed with the whole API thing today and did some network sniffing and came up with this solution for now. Don't know how stable or robust it is, but it's giving me status and energy readings again.

#!/usr/bin/perl

$data{'V'}="voltage";
$data{'L'}="lifetime_power";
$data{'T'}="temperature";
$data{'f'}="frequency";
$data{'E'}="session_power";
$data{'A'}="current";
$data{'S'}="charging";

use IO::Socket::INET;
$sock=IO::Socket::INET->new(LocalPort=>'8051',Proto=>'udp');
$ups=IO::Socket::INET->new(PeerAddr=>'juicenet-udp-prod4-usa.enelx.com:8051',Proto=>'udp');
use JSON;

use IO::Select;
$ss=IO::Select->new();
$ss->add($sock);
$ss->add($ups);

while(@r=$ss->can_read()){
 foreach $sk(@r){
  if($sk==$sock){
   $sock->recv($data,1024);
   $status->{'current'}=0;$status->{'session_power'}=0;
   @d=split(/,/,$data);foreach $d(@d){$s=$data{substr($d,0,1)};
    if($s ne ''){$status->{$s}=substr($d,1);}
    if($s eq 'voltage' || $s eq 'current'){$status->{$s}.='00';}
    if($s eq 'frequency'){$status->{$s}=substr($d,1,2).".".substr($d,3);}
    if($s eq 'charging'){if(substr($d,1,1) eq '0'){$status->{$s}="OFF";}else{$status->{$s}="ON";}}
   }mqtt("juicebox/sensor/state",encode_json($status));
   print ">>> ".$data."\n";$ups->send($data);
  }
  if($sk==$ups){
    $ups->recv($data,1024);
    print "<<< ".$data."\n";
    $sock->send($data);
  }
 }
}

It does require a DNAT rule on the router redirecting any outgoing UDP on port 8051 from the Juicebox to the machine running the script. I pulled the endpoint from where mine was connecting to, YMMV in different areas.

It also seems to work temporarily without forwarding the traffic on to the enelx server, but the Juicebox keeps trying to reconnect to different spots if it doesn't get a response and eventually tries on different ports. I would imagine it also breaks what app functionality there is if you don't let any traffic out.

My auto discovery for HA looks like this:

#!/usr/bin/perl

mqttr("homeassistant/sensor/juicebox/voltage/config","{\"dev_cla\":\"voltage\",\"unit_of_meas\":\"mV\",\"stat_cla\":\"measurement\",\"value_template\": \"{{ value_json.voltage}}\",\"name\":\"Supply Voltage\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_voltage\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/lifetime_power/config","{\"dev_cla\":\"energy\",\"unit_of_meas\":\"Wh\",\"stat_cla\":\"total_increasing\",\"value_template\": \"{{ value_json.lifetime_power}}\",\"name\":\"Lifetime Energy\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_lifetime_power\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/temperature/config","{\"dev_cla\":\"temperature\",\"unit_of_meas\":\"°C\",\"stat_cla\":\"measurement\",\"value_template\": \"{{ value_json.temperature}}\",\"name\":\"Temperature\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_temperature\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/frequency/config","{\"dev_cla\":\"frequency\",\"unit_of_meas\":\"Hz\",\"stat_cla\":\"measurement\",\"value_template\": \"{{ value_json.frequency}}\",\"name\":\"Supply Frequency\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_frequency\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/session_power/config","{\"dev_cla\":\"energy\",\"unit_of_meas\":\"Wh\",\"stat_cla\":\"total\",\"value_template\": \"{{ value_json.session_power}}\",\"name\":\"Session Energy\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_sesion_power\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/current/config","{\"dev_cla\":\"current\",\"unit_of_meas\":\"mA\",\"stat_cla\":\"measurement\",\"value_template\": \"{{ value_json.current}}\",\"name\":\"Current Amperage\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_current\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/binary_sensor/juicebox/charging/config","{\"dev_cla\":\"plug\",\"value_template\": \"{{ value_json.charging}}\",\"name\":\"Status\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_charging\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
cgraf commented 11 months ago

Nice work mskwik. Any insight into whether write access is possible? There are probably a few people that use their integrations to control charging by changing the amperage.

mskwik commented 11 months ago

The packets that it is picking up look like this:

>>> 08xxxxxxxxxxxxxxxxxxxxxx03:v07,s0211,u48788,V2445,L0005745528,S0,T26,M40,m40,t29,i17,e0000,f5997,X0,Y0!65F:
<<< CMD41446A40M40C008S212!KLL$
>>> 08xxxxxxxxxxxxxxxxxxxxxx03:v07,s0212,u51788,V2444,L0005745528,S0,T26,M40,m40,t29,i18,e0000,f5998,X0,Y0!Z1J:
<<< CMD41447A40M40C244S213!TMH$

It appears that there is some sort of checksum/signature at the end that I didn't touch. Would need to figure out what that is and how to generate it to be able to change any values while passing the data through.

MrDrew514 commented 11 months ago

Nice find! Could that information be helpful to make a new custom integration for the average user? Looking forward to be able to monitor my charger again, haha! Thanks for your results.

skyemoor commented 11 months ago

I responded to a chat (that took them forever to respond to so I abandoned the chat and they sent me an email form letter extolling their new app, ignoring my point question about the API);

I have been interfacing with the Juicenet API with my Home Assistant energy monitoring module, and now suddenly the interface is unavailable. What has happened and how will the API be restored or modernized? https://github.com/home-assistant/core/tree/dev/homeassistant/components/juicenet

We are purchasing another EV, and was planning on getting another Juicebox, though that is on hold until I hear that this capability is about to be restored

I suggest everyone who hasn't pinged them yet with consternation about the dropping of the API do so in order to generate user feedback to drive the feature backlog.

1.844.JUICEBX | support@evcharging.enelx.com

mschwartz commented 11 months ago

I gave the new app 1 star on iTunes and left a scathing review.

did the same on Amazon.

JCae2798 commented 10 months ago

Bummer. Just sent them an email as follows:

To whom it may concern –

I’m writing to you as a customer who wishes you restore API as you have in the past using JuiceNet for example. There is a very large and responsible community who runs custom integrations with their homes, lives, etc where these APIs make using products like yours super simple, more convenient, and also adds extra quality of life improvements. Please take this into serious consideration and support your clients. I’ve seen a ton of negative comments online telling new customer to avoid your product and services due to the lack of this simple yet very important feature many depend on or make their buying decisions based on.

For more details on what I am referring to please see: https://github.com/home-assistant/core/tree/dev/homeassistant/components/juicenet

Thank you.

strawless commented 10 months ago

So I got annoyed with the whole API thing today and did some network sniffing and came up with this solution for now. Don't know how stable or robust it is, but it's giving me status and energy readings again.

#!/usr/bin/perl

$data{'V'}="voltage";
$data{'L'}="lifetime_power";
$data{'T'}="temperature";
$data{'f'}="frequency";
$data{'E'}="session_power";
$data{'A'}="current";
$data{'S'}="charging";

use IO::Socket::INET;
$sock=IO::Socket::INET->new(LocalPort=>'8051',Proto=>'udp');
$ups=IO::Socket::INET->new(PeerAddr=>'juicenet-udp-prod4-usa.enelx.com:8051',Proto=>'udp');
use JSON;

use IO::Select;
$ss=IO::Select->new();
$ss->add($sock);
$ss->add($ups);

while(@r=$ss->can_read()){
 foreach $sk(@r){
  if($sk==$sock){
   $sock->recv($data,1024);
   $status->{'current'}=0;$status->{'session_power'}=0;
   @d=split(/,/,$data);foreach $d(@d){$s=$data{substr($d,0,1)};
    if($s ne ''){$status->{$s}=substr($d,1);}
    if($s eq 'voltage' || $s eq 'current'){$status->{$s}.='00';}
    if($s eq 'frequency'){$status->{$s}=substr($d,1,2).".".substr($d,3);}
    if($s eq 'charging'){if(substr($d,1,1) eq '0'){$status->{$s}="OFF";}else{$status->{$s}="ON";}}
   }mqtt("juicebox/sensor/state",encode_json($status));
   print ">>> ".$data."\n";$ups->send($data);
  }
  if($sk==$ups){
    $ups->recv($data,1024);
    print "<<< ".$data."\n";
    $sock->send($data);
  }
 }
}

It does require a DNAT rule on the router redirecting any outgoing UDP on port 8051 from the Juicebox to the machine running the script. I pulled the endpoint from where mine was connecting to, YMMV in different areas.

It also seems to work temporarily without forwarding the traffic on to the enelx server, but the Juicebox keeps trying to reconnect to different spots if it doesn't get a response and eventually tries on different ports. I would imagine it also breaks what app functionality there is if you don't let any traffic out.

My auto discovery for HA looks like this:

#!/usr/bin/perl

mqttr("homeassistant/sensor/juicebox/voltage/config","{\"dev_cla\":\"voltage\",\"unit_of_meas\":\"mV\",\"stat_cla\":\"measurement\",\"value_template\": \"{{ value_json.voltage}}\",\"name\":\"Supply Voltage\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_voltage\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/lifetime_power/config","{\"dev_cla\":\"energy\",\"unit_of_meas\":\"Wh\",\"stat_cla\":\"total_increasing\",\"value_template\": \"{{ value_json.lifetime_power}}\",\"name\":\"Lifetime Energy\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_lifetime_power\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/temperature/config","{\"dev_cla\":\"temperature\",\"unit_of_meas\":\"°C\",\"stat_cla\":\"measurement\",\"value_template\": \"{{ value_json.temperature}}\",\"name\":\"Temperature\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_temperature\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/frequency/config","{\"dev_cla\":\"frequency\",\"unit_of_meas\":\"Hz\",\"stat_cla\":\"measurement\",\"value_template\": \"{{ value_json.frequency}}\",\"name\":\"Supply Frequency\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_frequency\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/session_power/config","{\"dev_cla\":\"energy\",\"unit_of_meas\":\"Wh\",\"stat_cla\":\"total\",\"value_template\": \"{{ value_json.session_power}}\",\"name\":\"Session Energy\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_sesion_power\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/sensor/juicebox/current/config","{\"dev_cla\":\"current\",\"unit_of_meas\":\"mA\",\"stat_cla\":\"measurement\",\"value_template\": \"{{ value_json.current}}\",\"name\":\"Current Amperage\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_current\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");
mqttr("homeassistant/binary_sensor/juicebox/charging/config","{\"dev_cla\":\"plug\",\"value_template\": \"{{ value_json.charging}}\",\"name\":\"Status\",\"stat_t\":\"juicebox/sensor/state\",\"uniq_id\":\"juicebox_charging\",\"dev\":{\"name\":\"juicebox\",\"ids\":\"juicebox\"}}");

I converted this to Python and put it out at https://github.com/strawless/Juicebox. I also gave a small snippet of how to perform the iptables update and added another hop so send the ACK from the cloud server back to the Juicebox.

kintaroju commented 10 months ago

This might sound stupid but instead of doing that could you not use the telnet connection to poll the unit:

https://docs.google.com/document/u/0/d/1glb0frXwtitHtmxyqn421CCzy00uOyyfiyygrqNgaRk/mobilebasic

I’ve had to telnet into the unit to debug that connection issue only to find out it wasn’t a connection issue but to find out it was Enel x migrating my unit to the crap new system lol

If you are able to use the telnet functionality this could kill 2 birds with one stone I hope

strawless commented 10 months ago

From what I could tell about the telnet approach, it only gave you access to the gecko os which would just control install the software or configuring the WiFi. It didn’t have access to the data from the installed software.

shimonenator commented 10 months ago

That needs to be verified because GeckoOS allows to expose metrics and sensors, so the question is whether these are exposed. There's also a root cert on the file system, so you could try to man-in-the-middle and capture UDP traffic to the server in Charles, or even point it to your own proxy server

kintaroju commented 10 months ago

When I have the car at home and plugged in, I'll do a "get all" command and see if it shows anything useful in terms of charge state. But from the get all command I noticed the udp port that it claims to be communicating out of which could be potentially useful as you mention the port changes.

tomayac commented 10 months ago

If I understand correctly, the solution found in https://github.com/home-assistant/core/issues/86588#issuecomment-1682740998 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.