sidoh / esp8266_milight_hub

Replacement for a Milight/LimitlessLED hub hosted on an ESP8266
MIT License
948 stars 220 forks source link

Use FUT007 remote as standalone device without any controller. #770

Open kodifan opened 2 years ago

kodifan commented 2 years ago

I have 2 milight controllers (fut036 with fut007 remote) I find it very good remote (fut007), perfectly fits my needs (on/off, dim,spectrum change and 4 groups on/off). I have search for similar one that uses zigbee or wifi but cannot find with exactly the same (the closest is AWOX\EGLO smart remote - look very similar , works on zigbee but have two very annoying properties: doesn't support long press, and sends additional on command for almost every button) So getting to the point: Im not sure if its even possible, but im wondering if using this (or maybe another ?) integration and nodemcu mother board i can use milight smart remote standalone ? To control other zigbee devices (like IKEA bulbs and others) ?

akowalski commented 10 months ago

It's been a long time and you probably don't need it, but I was facing the same problem when I discovered the cool FUT089 remote and managed to integrate it with the rest of the system. Maybe someone else will be looking as well, so I'll leave it here, especially I didn't find any solution. Thanks to this project, you can control anything you have for example in Home Assistant. You do it via MQTT. This is a little more difficult because you're not using a separate device or entity and you actually must write it line by line in YAML, but you can program any button and action, for FUT089 it's 14 buttons (and 8 of them has on/off separate, so it's 22 buttons in fac Using this trigger:

trigger:
  - platform: mqtt
    topic: milight/updates/0x151E/fut089/1

Then use trigger.payload_json.command or another attribute. Here is an example for my Yeelight lamp, maybe it's not perfect, but works.

alias: button 1 salon
trigger:
  - platform: mqtt
    topic: milight/updates/0x151E/fut089/1
condition: []
action:
  - variables:
      state: "{{ trigger.payload_json.state  }}"
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ state == 'OFF' }}"
        sequence:
          - service: light.turn_off
            target:
              area_id: salon
            data:
              transition: 1
      - conditions:
          - condition: template
            value_template: "{{ state == 'ON' }}"
        sequence:
          - service: light.turn_on
            target:
              area_id: salon
            data:
              transition: 0.5
              color_temp: 301
              brightness: 189
      - conditions:
          - condition: template
            value_template: "{{ trigger.payload_json.command == 'set_white' }}"
        sequence:
          - service: light.turn_on
            target:
              area_id: salon
            data:
              transition: 0.5
              color_temp: 301
              brightness: 189
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.payload_json.color_temp is defined and
              state_attr('light.yeelight_salon_1', 'color_mode')=='color_temp'
              }}
        sequence:
          - service: light.turn_on
            target:
              area_id: salon
            data:
              transition: 0.2
              color_temp: "{{ trigger.payload_json.color_temp * 2 - 153 }}"
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.payload_json.brightness is defined and
              states('light.yeelight_salon_1')=='on' }}
        sequence:
          - service: light.turn_on
            target:
              area_id: salon
            data:
              transition: 0.2
              brightness: >-
                {% if trigger.payload_json.brightness == 0 %} 2 {% else %} {{
                trigger.payload_json.brightness }} {% endif %}
      - conditions:
          - condition: template
            value_template: >-
              {{ (trigger.payload_json.hue is defined or
              trigger.payload_json.saturation is defined) and
              states('light.yeelight_salon_1')=='on' }}
        sequence:
          - service: light.turn_on
            target:
              area_id: salon
            data:
              transition: 0.2
              hs_color:
                - >-
                  {% if trigger.payload_json.hue is defined
                  %}{{trigger.payload_json.hue}}{% else %}
                  {{state_attr('light.yeelight_salon_1', 'hs_color')[0]}} {%
                  endif %}
                - >-
                  {% if trigger.payload_json.saturation is defined %}
                    {% if trigger.payload_json.saturation >= 90 %}100
                    {% elif trigger.payload_json.saturation <=10 %}0
                    {% else %}{{trigger.payload_json.saturation}}
                  {% endif %} {% else %} {{state_attr('light.yeelight_salon_1',
                  'hs_color')[1]}} {% endif %}           
mode: single