Mirabella Genio Smart Home

Thanks, I’ll check out those prebuilt images, I still like EasyESP though…

Hopefully I can get some time to work more on this soon, just moved interstate and started a new job so my play time is limited to an hour or two of an evening at the moment.

Thanks so3n,

I will give that config a go.

Cheers,

Justin

I finally got some time to put into this (and found my Raspberry Pi 3, moving sucks!), I have the Mirabella RGBW Globe, I used tuya-convert running on a Raspberry Pi 3 as per the instructions worked first time, no issues.

I setup Tasmota as a Generic Module using these pin assignments:

GPIO4 PWM1 (Red)
GPIO12 PWM2 (Green)
GPIO14 PWM3 (Blue)
GPIO5 PWM4 (White)

And finally configured Home Assistant like this:

    - platform: mqtt
      name: 'RGBW'
      state_topic: "stat/rgbw_38E678/POWER"
      command_topic: "cmnd/rgbw_38E678/POWER"
      brightness_state_topic: "stat/rgbw_38E678/DIMMER"
      brightness_command_topic: "cmnd/rgbw_38E678/DIMMER"
      brightness_value_template: "{{ value_json.brightness }}"
      brightness_scale: 100
      rgb_state_topic: "stat/rgbw_38E678/COLOR"
      rgb_command_topic: "cmnd/rgbw_38E678/COLOR"
      rgb_command_template: "{{ '%02x%02x%02x00' | format(red, green, blue) }}"
      qos: 1
      payload_on: "ON"
      payload_off: "OFF"
      retain: true

After restarting Home Assistant I have full RGBW control.

1 Like

this is me every night when i’m playing with home automation. after a long day at work and an evening cleaning up and time with the kids i have this small window of opportunity to do stuff, and then you find something new you didn’t know before and … it’s soooo late … but … :slight_smile:

The Bunnings “Brilliant” smart wifi plug for $20. it’s just another Tuya, so i’ve been installing tasmota using tuya-convert on my Ubuntu laptop. The procedure was identical to the Genio wifi plug from K-mart. the only difference is the GPIO settings in tasmota as they are wired slightly differently inside.

I’ve been testing ESPHome on my devices lately and am finding it a lot more stable than Tasmota, if anyone is interested in trying ESPHome this is my current config for the Genio RGB globes:

esphomeyaml:
  name: rgbw_e27_01
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: ''
  password: ''

# Enable logging
logger:

ota:
  password: ''

mqtt:
  broker: 192.168.1.60
  
web_server:
  port: 80

output:
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO4
  - platform: esp8266_pwm
    id: output_green
    pin: GPIO12
  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO14
  - platform: esp8266_pwm
    id: output_white
    pin: GPIO5

light:
  - platform: rgbw
    name: "rgbw_e27_01"
    red: output_red
    green: output_green
    blue: output_blue
    white: output_white

Note if you’ve never tried ESPHomelib, the above yaml is used to configure the ESPHome firmware, not to be added to a Home ASsistant config.

1 Like

Extending on from the ESPHome configuration posted by @bircoe for the RGB version of the Genio bulb, please find below mine for the both the tunable and cool white / warm white bulbs.

Thanks to the existing work by @so3n which this adaption is based on:(https://github.com/arendst/Sonoff-tasmota/wiki/Mirabella-Genio-Bulb)

Mirabella Genio Tunable (Warm - Cool - Day)

esphome:
  name: genio_cwww_1
  platform: ESP8266
  board: esp01_1m
  
  # Ensure the light turns on by default if the physical switch is actuated.
  # https://esphome.io/components/esphome#esphome-on-boot
  on_boot:
    priority: 100 # Highest priority, ensures light turns on without delay.
    then:
      - light.turn_on: light

wifi:
  ssid: ''
  password: ''

logger:

web_server:
  port: 80

api:

ota:

output:
  - platform: esp8266_pwm
    id: output_warm_white
    pin: GPIO13
  - platform: esp8266_pwm
    id: output_daylight
    pin: GPIO5

light:
  - platform: cwww
    id: light
    name: genio_cwww_1
    cold_white: output_daylight
    warm_white: output_warm_white
    cold_white_color_temperature: 153.84 mireds #6500k
    warm_white_color_temperature: 370.37 mireds #2700k

Mirabella Genio CW (Cool White) / WW (Warm White)

esphome:
  name: genio_cw_1
  platform: ESP8266
  board: esp01_1m

  # Ensure the light turns on by default if the physical switch is actuated.
  # https://esphome.io/components/esphome#esphome-on-boot
  on_boot:
    priority: 100 # Highest priority, ensures light turns on without delay.
    then:
      - light.turn_on: light

wifi:
  ssid: ''
  password: ''

logger:

web_server:
  port: 80

api:

ota:

output:
  - platform: esp8266_pwm
    id: light
    pin: GPIO13

light:
  - platform: monochromatic
    name: genio_cw_1
    output: light
1 Like

Nice one, I’m going to “borrow/steal” the on_boot bits…
I’m trying to start a repo of all my ESPHome configs, it’s pretty light on at the moment because most of my stuff is Wemos Mini D1 based custom so may not be very useful to other prople but I’ll get them all in there soon… if you don’t mind I can add yours, would be nice to have an all in one reference for Australian products.

The GPIO mapping in here would have saved me a bunch of time lol!

Maybe upload them to the esphome cookbook, pretty sure Otto would have them on their for everyone to use

I read in your Git that you are using tuya-convert and have switched from Tasmota to ESPhome. Are you going straight from the original firmware to ESPhome using the third party .bin instruction as per the bottom line of the readme? (replacing the .bin file with one downloaded from ESPhome?)

Of the 3 Tuya devices I’ve converted so far I started all of them with Tasmota, but yeah considering doing a generic preflash ESPHome image then OTA the final image.

I do plan on adding them but just wanted to make sure they are solid configs before adding them to the cookbook, the git is just a reference for now.

I’ve personally gone straight to uploading the complied ESPHome .bin using tuya-convert and skipping Tasmota all together. Worked flawlessly on the 6 Tuya based devices flashed.

Go right ahead! I’m going to do the same with your use of substitutions, neat :+1:

I wouldn’t mind, but as mentioned adding it to the cookbook is a better idea.

Yup!

i’ve successfully used tuya-convert to flash these with tasmota and it’s working perfectly. identical flashing procedure to the kmart genio, but the tasmota GPIO settings are slightly different.

The only thing i have not been able to find out is whether the USB port is controllable as in turn on/off

one of the tear-downs i read specified that the USB port was not connected to the ESP chip and ran directly from the AC power. i think this is a common tuya design as i’ve seen other tuya based devices with the same limitations.

i think the biggest problem would be that you want to pull a few amps from the USB and that couldn’t be supplied from the ESP chip - you’d need to use another relay to switch it.

You could wire in a transistor / MOSFET or similar to switch the USB power from an ESP output.

i purchased a bunch of Mirabella Genio bulbs to play around with in HA and used your config above. after playing around with the colours, i couldn’t get the bulb brightness up to the normal white as it came out of the box. i eventually worked it out - you need to have separate controls for the “white” channel for this bulb.

i added in the appropriate lines and it started working, however i noticed that the controls in HA seemed “out of sync” with what was going on. i went back to the tasmota/HA documentation and found a much better configuration. i’ve combined this with the white channel below and now it works beautifully.

i also discovered you can do “effects” to automatically cycle colours and also a disco mode :slight_smile:

note - in order for my config below to work, open up the console on your tasmotised mirabella RGBW bulb and issue the console commands:

SetOption17 1   - This enables decimal colors
SetOption59 1   - This enables sending of tele//STATE on POWER and light related commands

see my working config below:

light:
  - platform: mqtt
    name: "Mirabella RGBW 01"
    command_topic: "cmnd/MiraRGB01/POWER"
    state_topic: "tele/MiraRGB01/STATE"
    state_value_template: "{{value_json.POWER}}"
    availability_topic: "tele/MiraRGB01/LWT"
    brightness_command_topic: "cmnd/MiraRGB01/Dimmer"
    brightness_state_topic: "tele/MiraRGB01/STATE"
    brightness_scale: 100
    on_command_type: "brightness"
    brightness_value_template: "{{value_json.Dimmer}}"
    rgb_command_topic: "cmnd/MiraRGB01/Color2"
    rgb_state_topic: "tele/MiraRGB01/STATE"
    rgb_value_template: "{{value_json.Color.split(',')[0:3]|join(',')}}"
    white_value_state_topic: "tele/MiraRGB01/STATE"
    white_value_command_topic: "cmnd/MiraRGB01/White"
    white_value_scale: 100
    white_value_template: "{{ value_json.Channel[3] }}"
    effect_command_topic: "cmnd/MiraRGB01/Scheme"
    effect_state_topic: "tele/MiraRGB01/STATE"
    effect_value_template: "{{value_json.Scheme}}"
    effect_list:
      - 0
      - 1
      - 2
      - 3
      - 4
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    qos: 1
    retain: false

effect 0 = no effect
effect 1 = dim and go brighter - white
effect 2 = colour clockwise
effect 3 = colour anti-clockwise
effect 4 = disco

cheers, wizdude.

@wizdude this is exactly why I’ve switched to using ESPHome, so I can avoid the config garbage and just get on with using my devices, you just need to configure the ESPHome firmware with the correct channels and it auto configures HA via mqtt discovery, or API if that is more your thing.