Replace the software of the Rituals Genie ESP with ESPhome

Have it working with led, fan speed control and the rear button manually starts the fan.
The LED turns blue when connected to wifi,red if it disconnects.
And green when fan is running.

I sett up time schedule in node red. But can also be done in HA automations to :slight_smile:

This is the code so far: Perfume-Genie-ESPhome/Perfume Genie ESPhome at 5e1ffc9faecd8e48a1c18e438b2195dc82aeeae8 · Echnics/Perfume-Genie-ESPhome · GitHub

I didn’t include the top part of it because i’m not shure about the api encryption key and stuff like that.
So if anybody know how to properly share code,and every user gets his unique keys and stuff. Let me know :slight_smile:

1 Like

Wow!

Very cool stuff @echnics! Will test when im home again :tada:

Why don’t you put it up on devices.esphome.io ?

Sadly i didn’t know about that :see_no_evil: :sweat_smile:
Kinda new at this thing :slight_smile:
And i’m currently trying to write up a guide,not done with that.
But i will for sure look into that when i finish the guide :slight_smile:
Thanks for the tip :slight_smile:

Is the API key something that should be unique to each device in my network?
Or can i have same key for all my devices, so that can be stored in secrets?

You can use the same one.

Hi @echnics,

Im trying to flash it via esphome webtools but it doenst connect.
im using a different board, but that shouldt matter right?
image
The voltage is set to 3.3v

in your drawing the blue line from GND is connected to IO2 of the ESP but in the text you write IO0 which one is correct?
deleted wrong old / wrong image

1 Like

That should be the IO0 like in the text.
Crap, thanks, and sorry for my mistake :confounded:

The error should be fixed at github now.

But i think with a serial adapter you should cross the TX and RX wires.
When using NodeMCU it said you should not do that.

So when you get the IO0 right, and it does’nt work.
Try swapping TX and RX on the adapter.

I think normaly you should go RX to TX, but not when using the NodeMCU as programmer. NodeMCU probably had them switched around. Not shure

RX = Receive
TX = transceive

2 Likes

Ah yes!

i had tryed both IO0 and IO2 but didnt try changing the TX and RX, after connecting GND to IO0 and swapping TX and RX (so TX-RX and RX-TX) it worked! :tada:

The config also worked great, you’ve made my day :slight_smile: very happy that i can ditch the Rituals cloud integration now

1 Like

That’s very good :slight_smile:
And the nice thing is that it can be updated over the ait from esphome :slight_smile:

And thanks to you to with the work you had put in. It was the only post i found when searching for it. And your info gave me the push to go further :smiley:

1 Like

Great work! Well thats the power of the community :grinning:

1 Like

Hello, I miss the slider for fan speed control in HA. Before I flash my Genie, I wanted to test the confi.yaml on an ESP8266 with HA Core 2024.9.2 and ESPHome 2024.9.0. Everything worked right away, but I only have three entities in HA. A switch for the FAN, firmware and wifi status. Is that right? Thanks in advance for the answer

Where is your yaml, or are you using one that is already published?

I’m using the yaml from “echnics” and sorry for my mistake. I found the slider behind the on/off switch in HA. I thought it was a separate slider like in the Rituals integration of HA. Everything works fine, thanks for that.
I also have a first generation Genie with a built-in battery, which I don’t really need. But I noticed that the fan only has three cables and I think that the cable for the fan speed control is not controlled with PWM, probably via voltage. I haven’t tested whether the cable goes directly to a pin of the ESP. In this case, would there also be a way to control the speed via ESPHome? Can someone help me with a yaml code snippet or better with an adapted version from “echnics”. Unfortunately, I’m not very knowledgeable about this. Thanks

If you sort out the wiring someone will sort the software for you

Out of curiosity.
Wouldn’t it be easier to just swap out the board with a new esp and prigram it from scratch?
The app is useless as it is and a new card could be easy to fix.

For anyone who is interested. I dared to flash the first generation Genie with the yaml from “echnics”. The buttons and the RGB LED work well. Only the fan speed control doesn’t respond properly, but it didn’t do that before either. The previous measurement on IO4 showed 1.3V, 1.6V and 2.3V for the three adjustable speeds with a DC voltage measurement. The frequency was 20 kHz.

The yellow cable for controlling the fan speed is not directly connected to IO4 on the first generation Genie. I suspect that there is a D/A converter in between.

Hey sry bud how do you put the ESP in to flash mode ?

That is with the wire to the IO0.
And from the sources mentioned it said it should be connected shortly under power up, but it could be connected during the whole flash.
I tried shortly under power up first, but i failed.
Got it working when i left it connected during the whole process.

1 Like



17c6d99ae97863b79802ebd6a5d4176c071e6dcb
First, thank you for the quick answer :slight_smile:

that’s how I set it up, but I’m only using TX , RX , GND & VCC hope its right

TX and RX are also twisted.

but, what are you meaning with wire ? The wire that’s coming from the USB adapter or

the outputs from the chip ? I’m using that picture from above.

PS: and I don’t got the micro USB power plugged in to also, heard that’s not recommended it all, only the power of the USB serial adapter.