svenerbe / ecoflow_dynamic_power_adjustment

Service Description: EcoFlow Device API Integration for Power Stream Control
56 stars 6 forks source link

PowerStream gets "stuck" after some time #10

Closed Keff789 closed 6 months ago

Keff789 commented 6 months ago

Hello,

my powerstream seems to get stuck after the script is running for 10-12h i would say. It only helps to completely unplug the powerstream, then it is all back to normal. Has somebody else encountered this? I have not changed the pyscript and this is my automation:

alias: Nulleinspeisung
description: ""
trigger:
  - platform: time_pattern
    seconds: /10
condition:
  - type: is_battery_level
    condition: device
    device_id: xxxxx
    entity_id: xxxx
    domain: sensor
    above: 30
action:
  - service: pyscript.set_ef_powerstream_custom_load_power
    data:
      SerialNumber: HWxxxxxxxxxxxxxx
      TotalPower: "{{states('sensor.netzleistung') | float | round(0)}} "
      Automation: true
mode: single
Keff789 commented 6 months ago

After enabling logging i get these messages:

2024-05-03 20:35:30.403 DEBUG (MainThread) [custom_components.pyscript.eval] file.set_ef_powerstream_custom_load_power.set_ef_powerstream_custom_load_power: calling executor(<function put at 0x7fa8110040>, "https://api.ecoflow.com/iot-open/sign/device/quota", {'headers': {'accessKey': 'xxx', 'nonce': '592355', 'timestamp': '1714761330391', 'sign': 'xxx'}, 'json': {'sn': 'xxx', 'cmdCode': 'WN511_SET_PERMANENT_WATTS_PACK', 'params': {'permanentWatts': 6000}}}) 2024-05-03 20:35:30.431 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Unsupported EcoPacket cmd id 4 2024-05-03 20:35:30.431 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Found another frame in payload 2024-05-03 20:35:30.432 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Found 3 fields 2024-05-03 20:35:30.581 DEBUG (MainThread) [custom_components.pyscript.eval] file.set_ef_powerstream_custom_load_power.set_ef_powerstream_custom_load_power: calling json(, {}) 2024-05-03 20:35:31.555 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Unsupported EcoPacket cmd id 32 2024-05-03 20:35:32.476 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Unsupported EcoPacket cmd id 4 2024-05-03 20:35:32.476 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Found another frame in payload 2024-05-03 20:35:32.477 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Found 2 fields 2024-05-03 20:35:34.421 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Unsupported EcoPacket cmd id 4 2024-05-03 20:35:34.421 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Found another frame in payload 2024-05-03 20:35:34.422 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Found 3 fields 2024-05-03 20:35:36.467 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Unsupported EcoPacket cmd id 4 2024-05-03 20:35:36.467 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Found another frame in payload 2024-05-03 20:35:36.468 INFO (Thread-5 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Found 2 fields 2024-05-03 20:35:37.183 INFO (MainThread) [aioshelly.rpc_device.wsrpc] Connected to 192.168.1.138

Maybe someone could shed some light :/

svenerbe commented 6 months ago

Hi, Strange. For me it’s working since weeks. The log entry’s in your case is coming from the EcoFlow_cloud integration. I can see similar log entry in my setup. I trigger the service pyscript.set_ef_powerstream_custom_load_power in my setup every 5 seconds without any issues. Maybe you have to enable debug logging for pyscript. See readme.

svenerbe commented 6 months ago

looks for me is not related to this script. i will close this issue.

ChristianFFB commented 6 months ago

Hi, i can confirm this. As soon as the 600W limit is reached the script / the control stops working until the output power is manually lowered in the App.