jesserockz / python-juicenet

MIT License
12 stars 10 forks source link

Added stopCharging support #8

Closed SwedishNinja closed 3 years ago

SwedishNinja commented 4 years ago

Sets the energy_to_add to 1. This effectivly limits charging to 1W.

SwedishNinja commented 4 years ago

Same as before. Added the stopCharging function. But removed the part where it figured out how much was already added. It just sets the energy_to_add to the smallest number possible, 1.

jesserockz commented 4 years ago

I was playing around with the Android app. It looks like it only changes the override timestamp when you switch between start charging, smart charging and stop charging and the wh_to_add is always set to the max for the current vehicle.

jesserockz commented 4 years ago

This was my data from 16 December 2019 21:03:51 UTC

Charge now
{
    "override_time": 1576529031,
    "energy_at_plugin": 0,
    "energy_to_add": 12000,
    "device_id": "XXXX",
    "token": "XXXX",
    "cmd": "set_override",
    "account_token": "XXXX"
}

Smart
{
    "override_time": 1576544686,
    "energy_at_plugin": 0,
    "energy_to_add": 12000,
    "device_id": "XXXX",
    "token": "XXXX",
    "cmd": "set_override",
    "account_token": "XXXX"
}

Smart 1am
{
    "override_time": 1576544860,
    "energy_at_plugin": 0,
    "energy_to_add": 12000,
    "device_id": "XXXX",
    "token": "XXXX",
    "cmd": "set_override",
    "account_token": "XXXX"
}

Stop
{
    "override_time": 1608066316,
    "energy_at_plugin": 0,
    "energy_to_add": 12000,
    "device_id": "XXXX",
    "token": "XXXX",
    "cmd": "set_override",
    "account_token": "XXXX"
}
SwedishNinja commented 3 years ago

Really old and pretty useless as I can just set the amp limit to 0! Thanks for the project!