You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm interested at the moment in the REMAINING_TIME attribute only and observed very noisy estimates for that value. Could it be a bug?
Another question, can you elaborate more on how parsing of the packets work? Is there any specification I can consult?
Here is a code I'm running:
import asyncio
import bleak
from ecoflow import Delta2
async def main():
mac = "00:00:00:00:00:00"
ble_client = bleak.BleakClient(mac, timeout=15)
async with Delta2(ble_client) as dev:
await dev.start_state_stream(print_state)
await asyncio.sleep(40)
await dev.stop_state_stream()
async def print_state(data):
print("state update...")
for k, v in data.items():
print(f"{k} = {v}")
print("-"*20)
asyncio.run(main())
The output is as bellow:
skipped a data page 69
state update...
StateField.CHARGE_TH_MIN = 0
StateField.CHARGE_TH_MAX = 100
StateField.REMAINING_TIME = Time(hrs=98, mins=59)
--------------------
skipped a data page 123
state update...
--------------------
state update...
StateField.CHARGE_SPEED = 1200
--------------------
skipped a data page 70
state update...
--------------------
skipped a data page 123
state update...
--------------------
skipped a data page 69
state update...
StateField.CHARGE_TH_MIN = 52
StateField.CHARGE_TH_MAX = 80
StateField.REMAINING_TIME = Time(hrs=149, mins=27)
--------------------
skipped a data page 123
state update...
--------------------
skipped a data page 70
skipped a data page 123
state update...
--------------------
state update...
StateField.CHARGE_SPEED = 1200
--------------------
skipped a data page 69
state update...
StateField.CHARGE_TH_MIN = 89
StateField.CHARGE_TH_MAX = 61
StateField.REMAINING_TIME = Time(hrs=334, mins=34)
The text was updated successfully, but these errors were encountered:
Hi @taras-sereda ,
Unfortunately there is no BLE API documented for the device, or at least, I'm not aware of any in open access. Initially I sniffed a couple of requests between Delta 2 and a mobile app which were most stable but now it can be out of date.
Packet structure seems to change from time to time so looking at your logs it seems that some of data items shifted to another place in packet, on instance even these below. MAX definitely should be > MIN but it is not.
Moreover in recent firmware updates the way of communication establishment was changed so currently I cannot execute any command for my Delta 2 and I do not know an easy way of figuring out how to establish connection.
Hi and thanks for this tiny lib!
I'm interested at the moment in the
REMAINING_TIME
attribute only and observed very noisy estimates for that value. Could it be a bug?Another question, can you elaborate more on how parsing of the packets work? Is there any specification I can consult?
Here is a code I'm running:
The output is as bellow:
The text was updated successfully, but these errors were encountered: