Code Monkey home page Code Monkey logo

Comments (5)

hencou avatar hencou commented on August 23, 2024

Hi,

Nice remote, I was not aware of it. Seems most compatible with "fut089".

from esphome_components.

GertVanderstukken avatar GertVanderstukken commented on August 23, 2024

I think this is related to #20 and #22.
When you press OFF, it say': value: '{"command":"mode_speed_up"}'

This is because the packet's are interpreted as rgb_cct packets.
In your case, I guess you actually configured rgb_cct as device_type?

can you try to set the device_type to fut089?
However: I'm afraid that you will get the same result...

from esphome_components.

szupi-ipuzs avatar szupi-ipuzs commented on August 23, 2024

@GertVanderstukken , yes, seems to be the same problem, I do have it setup as rgb_cct. Will later try all of them and see which matches the best. However, I am worried a little about this problem:

Brightness(?) button - no reaction, no keypress decoded (there is even no "Received packet" log).

@hencou Any way to debug this?

from esphome_components.

szupi-ipuzs avatar szupi-ipuzs commented on August 23, 2024

No, fut089 doesn't seem to work at all for me. However I get a bit better result with fut091 - this time pressing "off" correctly causes

value: '{"state":"OFF"}'

although the decoded group id is 5... However pressing "color", also results in

value: '{"state":"OFF"}'

but with group id 15...

Pressing "brightness" does not trigger any reaction again.

Here's my yaml:

substitutions:
  device_name: mi-rf-remote-handler
  friendly_name: Mi RF Remote Handler

esphome:
  name: $device_name
  # platformio_options:                     #optional, to set additional build flags
  #   build_flags:                          #optional, to set additional build flags
  #     - "-D USE_ESP32_ALTERNATE_SPI"      #optional, to use the alternate HSPI SPI bus instead of the default VSPI on an ESP32 board
  #     - "-D ALT_SPI_MISO_PIN=15"          #optional, if HSPI bus is used, alternate pins can also be defined
  #     - "-D ALT_SPI_MOSI_PIN=14"
  #     - "-D ALT_SPI_SCLK_PIN=12"
  #     - "-D ALT_SPI_SS_PIN=4"

external_components:
  - source: github://hencou/esphome_components
    components: mi

esp8266:
  board: nodemcuv2

# Enable logging
logger:
  level: VERY_VERBOSE

captive_portal:

mdns:

api:
  password: ""

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: $device_name
    password: !secret fallback_wifi_password

mi:
  id: mi1  #optional
  ce_pin: D2 #required, default: 4
  csn_pin: D8 #required, default: 15
  reset_pin: 0 #optional, default: 0, only needed with LT8900 radio
  radio_interface_type: nrf24 #optional, default: nrf24, possible values: nrf24,lt8900
  packet_repeats: 50 #optional, default: 50, total of sended packets per command
  listen_repeats: 20 #optional, default: 20, amount of received packets needed for a incoming command from other remote
  state_flush_interval: 5000 #optional, default: 10000, time in miliseconds to send the latest state report to HomeAssistant
  packet_repeat_throttle_threshold: 200 #optional, default: 200, threshold to limit the amount of packets in a second
  packet_repeat_throttle_sensitivity: 0 #optional, default: 0
  packet_repeat_minimum: 3 #optional, default: 3
  enable_automatic_mode_switching: false #optional, default: false
  rf24_power_level: MAX #optional, default: MAX, possible values: MIN, LOW, HIGH, MAX
  rf24_listen_channel: HIGH #optional, default: LOW, possible values: LOW, MID, HIGH
  packet_repeats_per_loop: 10 #optional, default: 10, repeat packets sended per loop
  resend_last_command: true #optional, default: true, repeats the latest command after a random time between 2 and 3 seconds again
  rf24_channels: #optional, 1-3 values required when used, default: LOW-MID-HIGH, possible values: LOW, MID, HIGH
    - LOW
    - MID
    - HIGH
  on_command_received: #optional, useful to send remote commands to HA and process them further there in automations
    - homeassistant.event:
        event: esphome.mi_command_received
        data:
          device_id: !lambda "return format_hex(data.device_id);"
          group_id: !lambda "return data.group_id;"
          remote_type: !lambda "return data.remote_type.c_str();"
          command: !lambda "return data.command.c_str();"




light:
  - platform: mi #required
    id: light1 #required
    name: ${friendly_name} #required
    device_id: 0xAB01 #required, hexadacimal value of MiLight id
    group_id: 1 #required, 1-4 or 1-8, depending on remote type
    remote_type: fut091 #required, possible values: rgb_cct, rgb, cct, rgbw, fut089, fut091, fut020
    default_transition_length: 0s #optional, but 0s gives a better behaviour instead the default 200ms
  # Set these to calibrate the color temperature of your light, measured with an external color temp. sensor or app
  # optional, [153, 370] mireds is the range miboxer uses internally ([6535, 2702] K)
    #cold_white_color_temperature: 6500 K
    #warm_white_color_temperature: 2700 K
# optional variables: all variables of ESPHome base light component

from esphome_components.

hencou avatar hencou commented on August 23, 2024

Lets proceed om #22

from esphome_components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.