Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding fan speed error #214

Open
RikBast opened this issue Feb 26, 2024 · 0 comments
Open

Adding fan speed error #214

RikBast opened this issue Feb 26, 2024 · 0 comments

Comments

@RikBast
Copy link

RikBast commented Feb 26, 2024

Using the SwiCago/HeatPump Arduino libary to talk to the unit directly via the internal CN105 connector. All works, just adding the fan speed seems a problem.

I am trying to write software to esp32 board with adding fan speed. I get this error all the time:

Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/cu.usbserial-02M3J84W with baud rate 115200
[19:29:41][I][logger:351]: Log initialized
[19:29:41][C][ota:473]: There have been 0 suspected unsuccessful boot attempts.
[19:29:41][D][esp32.preferences:114]: Saving 1 preferences to flash...
[19:29:41][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[19:29:41][D][MitsubishiHeatPump:620]: Ping request received
[19:29:41][I][app:029]: Running through setup()...
[19:29:41][D][template.select:014]: Setting up Template Select
[19:29:41][D][template.select:017]: State from initial: Auto
[19:29:41][D][select:015]: 'Fan mode': Sending state Auto (index 0)
[19:29:41][D][climate:011]: 'mideahvac' - Setting
[19:29:41][D][climate:024]: Fan: AUTO
[19:29:41]Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
[19:29:41]
[19:29:41]Core 1 register dump:
[19:29:41]PC : 0x400f0835 PS : 0x00060e30 A0 : 0x800f08b9 A1 : 0x3ffb2220
WARNING Decoded 0x400f0835: HeatPump::lookupByteMapIndex(char const**, int, char const*) at /Users/rikbastiaens/Documents/ESPHome/.esphome/build/mitsubishi-slaapkamer/.piolibdeps/mitsubishi-slaapkamer/HeatPump/src/HeatPump.cpp:455
[19:29:41]A2 : 0x00000000 A3 : 0x9f31c0cd A4 : 0x00000006 A5 : 0x3f408a76
[19:29:41]A6 : 0x00000000 A7 : 0x00000000 A8 : 0x9f31c0cd A9 : 0x3ffb21a0
[19:29:41]A10 : 0x0003ad10 A11 : 0x00000028 A12 : 0x0000006d A13 : 0x00000028
[19:29:41]A14 : 0x3f4035ca A15 : 0x00000010 SAR : 0x00000004 EXCCAUSE: 0x0000001c
[19:29:41]EXCVADDR: 0x9f31c0cd LBEG : 0x40089965 LEND : 0x40089975 LCOUNT : 0xfffffff5
[19:29:41]
[19:29:41]
[19:29:41]Backtrace:0x400f0832:0x3ffb22200x400f08b6:0x3ffb2240 0x400dc681:0x3ffb2260 0x400dc76c:0x3ffb2280 0x400d9e51:0x3ffb22a0 0x400e7e0b:0x3ffb22c0 0x400e7984:0x3ffb2380 0x400e7889:0x3ffb23c0 0x400e7830:0x3ffb2420 0x400de6bc:0x3ffb24b0 0x400df571:0x3ffb2530 0x400df5b6:0x3ffb2590 0x400e63c4:0x3ffb25b0 0x4017019d:0x3ffb25d0 0x400e5fe4:0x3ffb25f0 0x400e8a7a:0x3ffb2620 0x400f3ada:0x3ffb2820


I use a yaml file, but I don't know if that is causing the issue.
See below:

substitutions:
node_name: mitsubishi_slaapkamer # Use a unique name.
node_id: mitsubishi_slaapkamer_ac # Use a unique id.
friendly_node_name: "Split Mitsubishi"

sensor:

  • platform: template
    name: ${friendly_node_name} fan mode
    id: ${node_id}_fan_mode
    internal: true
    update_interval: 10s
    lambda: !lambda |-
    if (id(${node_id}_my_climate).fan_mode == 2)
    {
    if (id(${node_id}_select_fan_mode).state != "Auto")
    {
    auto call = id(${node_id}_select_fan_mode).make_call();
    call.set_option("Auto");
    call.perform();
    }
    }
    else if (id(${node_id}_my_climate).fan_mode == 3)
    {
    if (id(${node_id}_select_fan_mode).state != "Low")
    {
    auto call = id(${node_id}_select_fan_mode).make_call();
    call.set_option("Low");
    call.perform();
    }
    }
    else if (id(${node_id}_my_climate).fan_mode == 4)
    {
    if (id(${node_id}_select_fan_mode).state != "Medium")
    {
    auto call = id(${node_id}_select_fan_mode).make_call();
    call.set_option("Medium");
    call.perform();
    }
    }
    else if (id(${node_id}_my_climate).fan_mode == 5)
    {
    if (id(${node_id}_select_fan_mode).state != "High")
    {
    auto call = id(${node_id}_select_fan_mode).make_call();
    call.set_option("High");
    call.perform();
    }
    }
    return id(${node_id}_my_climate).fan_mode;

Select

select:

  • platform: template
    name: "Fan mode"
    id: ${node_id}_select_fan_mode
    icon: mdi:fan
    optimistic: true
    options:
    • Auto
    • Low
    • Medium
    • High
      on_value:
      then:
      • lambda: |-
        auto call = id(${node_id}_my_climate).make_call();
        call.set_fan_mode(x.c_str());
        call.perform();

esphome:
name: ${node_name}
friendly_name: ${friendly_node_name}

Set platform options to use c++ 17 instead of 11

platformio_options:
build_unflags:
- "-std=gnu++11"
build_flags:
- "-std=gnu++17"

esp32:
board: wemos_d1_mini32
framework:
type: arduino

Enable logging

logger:
# Component esphome.coroutine took a long time for an operation
logs:
component: ERROR

Native API and remote logging

api:
services:
- service: set_remote_temperature
variables:
temperature: float
then:
- lambda: 'id(${node_id}_my_climate).set_remote_temperature(temperature);'

- service: use_internal_temperature
  then:
    - lambda: 'id(${node_id}_my_climate).set_remote_temperature(0);'

ota:
password: !secret ota_password

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

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: "${friendly_name} Hotspot"
password: !secret wifi_fallback_ap_password

captive_portal:

web_server:
port: 80

external_components:

  • source: github://nathanjw/esphome-mitsubishiheatpump@unformat-select

climate:

  • platform: mitsubishi_heatpump
    #name: ${friendly_name}
    #id: hp
    id: ${node_id}_my_climate # Use a unique id
    name: ${node_name}

    vertical_vane_select:
    name: Vertical Vane

    Optional

    hardware_uart: UART2
    baud_rate: 2400
    update_interval: 500ms

    Supported features

    supports:
    mode: ["HEAT_COOL", "COOL", "HEAT", "FAN_ONLY", "DRY"]
    fan_mode: ["AUTO", "LOW", "MEDIUM", "HIGH"]
    swing_mode: ["OFF", "VERTICAL"]
    visual:
    min_temperature: 16
    max_temperature: 31
    temperature_step: 0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant