Skip to content

Switching fan speeds from HA is not reliable #18

@bvandenberg

Description

@bvandenberg

hi, I encountered the following behaviour.

When I want to switch fan speeds from Home Assistant UI, it ofter occurs that the ventilation box does not follow my command. In order to 'force' the box to the right speed I have to quickly toggle the HA UI from medium to high for example. This somehow forces the desired state to be sent.

I can't pinpoint the underlying logic but this is what I know:

  • When I first switch modes on the Physical RFT-remote (HIGH), the next command from the HA UI is always working (e.g. MEDIUM).
  • But then next speed command (e.g. HIGH) from HA does not come through.
  • I then have to quickly tap MEDIUM / HIGH in the HA UI in order to force the desired state.

Hope this explanation makes some sense. Here's my .yaml and a recent log for more context.


esphome:
  name: ventilatiebox-itho
  friendly_name: Ventilatiebox-Itho
  libraries:
    - SPI
    - Ticker

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "---------------------"

ota:
  - platform: esphome
    password: "--------------------------"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ventilatiebox-Itho"
    password: "-------------------"

captive_portal:

external_components:
  - source: 
      type: git
      url: https://github.com/CoMPaTech/esphome_ct
      ref: dev2
    # refresh: 3600s # only set this briefly otherwise it just refreshes daily, see https://esphome.io/components/external_components#external-components-refresh for setting refresh too low

fan:
  - platform: "cc1101"
    speed_count: 3
    name: "Mechanical Fan"
    data_pin: D1
    map_off_to_zero: True
    id: mech_fan

button:
  - platform: template
    name: "Send join command"
    on_press:
      then:
        - lambda: |-
            ((cc1101fan::CC1101Fan*)(&id(mech_fan)))->send_other_command(0);
  - platform: template
    name: "Run Timer for 10 Minutes"
    on_press:
      then:
        - lambda: |-
            ((cc1101fan::CC1101Fan*)(&id(mech_fan)))->send_other_command(1);
  - platform: template
    name: "Run Timer for 20 Minutes"
    on_press:
      then:
        - lambda: |-
            ((cc1101fan::CC1101Fan*)(&id(mech_fan)))->send_other_command(2);
  - platform: template
    name: "Run Timer for 30 Minutes"
    on_press:
      then:
        - lambda: |-
            ((cc1101fan::CC1101Fan*)(&id(mech_fan)))->send_other_command(3);
[17:38:36][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:36][D][c1101_fan:234]: Debug - RemoteID2: \xa5Z\xa6\xb5\x99f\xa9\x9a
[17:38:36][D][c1101_fan:235]: Debug - LastID: a5-5a-a6-b5-99-66-a9-9a
[17:38:36][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:36][D][c1101_fan:234]: Debug - RemoteID2: \xa5Z\xa6\xa5\x99f\xa9\x9a
[17:38:36][D][c1101_fan:235]: Debug - LastID: a5-5a-a6-a5-99-66-a9-9a
[17:38:43][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:43][D][c1101_fan:234]: Debug - RemoteID2: j\x99f\xaa\x9a\xa9Zf
[17:38:43][D][c1101_fan:235]: Debug - LastID: 6a-99-66-aa-9a-a9-5a-66
[17:38:43][D][c1101_fan:258]: 3 / High
[17:38:43][D][cc1101_fan:088]: Publishing state: 1 (was 1) from speed 3 (was 2) 
[17:38:43][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:43][D][c1101_fan:234]: Debug - RemoteID2: ii\xa6Y\x99\xa6i\x96
[17:38:43][D][c1101_fan:235]: Debug - LastID: 69-69-a6-59-99-a6-69-96
[17:38:44][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:44][D][c1101_fan:234]: Debug - RemoteID2: j\x99f\xaa\x9a\xa9Zf
[17:38:44][D][c1101_fan:235]: Debug - LastID: 6a-99-66-aa-9a-a9-5a-66
[17:38:44][D][c1101_fan:258]: 3 / High
[17:38:44][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:44][D][c1101_fan:234]: Debug - RemoteID2: j\x99f\xae\x9a\xa9Zf
[17:38:44][D][c1101_fan:235]: Debug - LastID: 6a-99-66-ae-9a-a9-5a-66
[17:38:44][D][c1101_fan:258]: 3 / High
[17:38:50][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:50][D][c1101_fan:234]: Debug - RemoteID2: \xa9i\xa6Y\x99\xa6i\x96
[17:38:50][D][c1101_fan:235]: Debug - LastID: a9-69-a6-59-99-a6-69-96
[17:38:55][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:55][D][c1101_fan:234]: Debug - RemoteID2: \xa9i\xa6Y\x99\xa6i\x96
[17:38:55][D][c1101_fan:235]: Debug - LastID: a9-69-a6-59-99-a6-69-96
[17:38:58][D][fan:021]: 'Mechanical Fan' - Setting:
[17:38:58][D][fan:024]:   State: ON
[17:38:58][D][fan:030]:   Speed: 2
[17:38:58][D][cc1101_fan:107]: Call state: ON, speed: 2
[17:38:58][D][cc1101_fan:123]: Setting speed to 2
[17:38:58][D][cc1101_fan:132]: RF called with 2 while last is 3 and speed assumed at 3
[17:38:58][D][cc1101_fan:088]: Publishing state: 1 (was 1) from speed 2 (was 3) 
[17:38:59][D][c1101_fan:233]: Debug - RemoteID1: 
[17:38:59][D][c1101_fan:234]: Debug - RemoteID2: �$e\x80�M;\x8c
[17:38:59][D][c1101_fan:235]: Debug - LastID: 12-24-65-80-4-4d-3b-8c
[17:39:05][D][c1101_fan:233]: Debug - RemoteID1: 
[17:39:05][D][c1101_fan:234]: Debug - RemoteID2: \xa9i\xa6Y\x99\xa6i\x96
[17:39:05][D][c1101_fan:235]: Debug - LastID: a9-69-a6-59-99-a6-69-96
[17:39:10][D][c1101_fan:233]: Debug - RemoteID1: 
[17:39:10][D][c1101_fan:234]: Debug - RemoteID2: \xa9i\xa6Y\x99\xa6i\x96
[17:39:10][D][c1101_fan:235]: Debug - LastID: a9-69-a6-59-99-a6-69-96
[17:39:10][D][fan:021]: 'Mechanical Fan' - Setting:
[17:39:10][D][fan:024]:   State: ON
[17:39:10][D][fan:030]:   Speed: 3
[17:39:10][D][cc1101_fan:107]: Call state: ON, speed: 3
[17:39:10][D][cc1101_fan:123]: Setting speed to 3
[17:39:10][D][cc1101_fan:132]: RF called with 3 while last is 3 and speed assumed at 2
[17:39:18][D][fan:021]: 'Mechanical Fan' - Setting:
[17:39:18][D][fan:024]:   State: ON
[17:39:18][D][fan:030]:   Speed: 2
[17:39:18][D][cc1101_fan:107]: Call state: ON, speed: 2
[17:39:18][D][cc1101_fan:123]: Setting speed to 2
[17:39:18][D][cc1101_fan:132]: RF called with 2 while last is 3 and speed assumed at 2
[17:39:19][D][fan:021]: 'Mechanical Fan' - Setting:
[17:39:19][D][fan:024]:   State: ON
[17:39:19][D][fan:030]:   Speed: 3
[17:39:19][D][cc1101_fan:107]: Call state: ON, speed: 3
[17:39:19][D][cc1101_fan:123]: Setting speed to 3
[17:39:19][D][cc1101_fan:132]: RF called with 3 while last is 2 and speed assumed at 2
[17:39:19][D][cc1101_fan:088]: Publishing state: 1 (was 1) from speed 3 (was 2) 
[17:39:26][D][c1101_fan:233]: Debug - RemoteID1: 
[17:39:26][D][c1101_fan:234]: Debug - RemoteID2: \xa9i\xa6Y\x99\xa6i\x96
[17:39:26][D][c1101_fan:235]: Debug - LastID: a9-69-a6-59-99-a6-69-96

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions