CJNE / pymyenergi

An async python library for interfacing with MyEnergi devices
MIT License
19 stars 14 forks source link

Incorrect boost times shown with zappi #19

Open plord12 opened 8 months ago

plord12 commented 8 months ago

With my zappi and no scheduled boosts set, the script returns invalid data -

myenergi zappi show
...
Boost with -1kWh
Smart Boost start at 17:-1 add 5kWh
Minimum green level: 100%

In this case API response from cgi-boost-time was -

{
    "boost_times": [
        {
            "bdd": "00000000",
            "bdh": 0,
            "bdm": 0,
            "bsh": 0,
            "bsm": 0,
            "slt": 11
        },
        {
            "bdd": "00000000",
            "bdh": 0,
            "bdm": 0,
            "bsh": 0,
            "bsm": 0,
            "slt": 12
        },
        {
            "bdd": "00000000",
            "bdh": 0,
            "bdm": 0,
            "bsh": 0,
            "bsm": 0,
            "slt": 13
        },
        {
            "bdd": "00000000",
            "bdh": 0,
            "bdm": 0,
            "bsh": 0,
            "bsm": 0,
            "slt": 14
        }
    ]
}
plord12 commented 8 months ago

even with a boost time set, I see the same -

myenergi zappi show
...
Boost with -1kWh
Smart Boost start at 17:-1 add 5kWh
Minimum green level: 100%

cgi-boost-time returned -

{
    "boost_times": [
        {
            "bdd": "00000100",
            "bdh": 1,
            "bdm": 0,
            "bsh": 23,
            "bsm": 0,
            "slt": 11
        },
        {
            "bdd": "00000000",
            "bdh": 0,
            "bdm": 0,
            "bsh": 0,
            "bsm": 0,
            "slt": 12
        },
        {
            "bdd": "00000000",
            "bdh": 0,
            "bdm": 0,
            "bsh": 0,
            "bsm": 0,
            "slt": 13
        },
        {
            "bdd": "00000000",
            "bdh": 0,
            "bdm": 0,
            "bsh": 0,
            "bsm": 0,
            "slt": 14
        }
    ]
}
jwillemsen commented 4 months ago

Looks the cli.py doesn't use the fetch_boost_data as part of zappi.py, it uses some other fields from the returned data

jwillemsen commented 1 month ago

https://github.com/CJNE/pymyenergi/pull/41 has made a first step, now the data must be used