Make a "dumb" fan "smart" using cheapo ESP8266 board controllable via ST (universal IR remote)

Hello Casper, I´m new to the forum and to the IoT. Could you help a non dev learn to do this? I’ve never used and have no previous knowledge of programming but I´m eager to learn.
Thanks
Alex

Hi,

I am new to ST also and i have started this as my first own integration project.
I have follow the step provide by @Casper as below

  1. Flash the IR receive code to ESP8266 to get the raw data - Tested on On/Off only, Done

  2. Update sketch to transmit IR - Tested on On/Off onl, Done

  3. Execute action via Http - Done but unable to change the SSID and password, SSID display as IA-Thinker, Why?

  4. Take the casper’s “simplied the code” device handler to IDE and publish to me - Done

  5. Struck here… i unable to get the device under ST app “My Home” --> Things --> Fan (picture below)

Hope i could get advice from experts here.

Cheers

Alex, the most difficult step in this DIY is when you “teach” ESP8266 your remote control’s code. It’s not that hard if you really want to make 1 of these. Just have the hardware ready, I and other folks here will help if you get stuck.

So without the Smartthings dashboard, did you already get the webserver working? I’m not sure what you meant at #3, the SSID is the name of your home wifi ID.

For #5, you need to load this custom smart app to your hub in order to see that dashboard.

Thanks @Casper

#3 I got it, i thought the SSID belong to ESP8266’s SSID. After change to my home WiFi and check from Serial Monitor on Arduino and i able to access the webserver now.

#5 Any guidance to create custom smart app? Or similar custom smart app that we could refer?

Cheers

Were you able to control your device from the webserver?

As for the smart app, check out this thread. Then just use my simplified code.

Hi.

Yes, i able to access the web-server from local PC and sucessful send the IR from web browser.

So i am struck at integration of web-server and ST [Smart App & Device handlers]

For your “simplified code” should loaded to “My device Handlers” under ST IDE and “Publish for me” correct?

I will have a look on the Smart App thread tonight.

Thanks

You’re right, it’s the device handler, not smart app. I’ve been away for a while can’t remember exactly what I did haha.

So basically you load this code as a device handler, and then create a custom device using the handler just created. Here’s the preferences that I used:

Thanks for your patient to guide me on this.

What do you get the the picture?

Do you mean we need create a new device based on screen below?

Using the Type = Generic HTTP device -ESP8266-Tower Fan?
What about the Device network id? = webserver address?

For Device handlers
If have change/modified (add new attitudes) your sketch on ESP8266 coding meaning to say the i have to modify your device handlers as well?

Sorry for some stupid questions because i am totally new to them.
Thanks for your patient again.

cheers

Yes, i able to get it work now… thanks

  1. The network id is mandatory as our preference
    after create new device, edit Preferences as per your picture using own IP address

  2. then i able to see the device under “Things”

Thanks, appreciated.

Sorry for late response, glad you worked it out. In case you want to make other devices other than a fan, just modify the layout from the device handler code.

1 Like

I have 4 air conditionals and they are same brand but different model. ie. 2 units model A and 2 units model B

I able control all air conditional with 1 IR remote therefore i used the IR remote for decoding.

unfortunately, i manage to get 2 units same model are working, another 2 units are not responding.
Anyone know the reason?

Cheers

Did you try with all the chunk of IR codes you got from your remotes? I had an old TV that was just so stubborn that took about 10 trials.

i have tried 30 times… still cannot get it works…
:triumph:

I did get it once but after i send the signal again it could not works anymore…
it is weird…

Maybe the model is too old, i think more than 20 years
:sleepy:

Might be the range is too far for your current IR LED. What model do you use and how far is it from LED to TV?

What is the best range for decode and transmit IR?
My trial was about 1 foot distance for both steps

Well it depends on the LED module and sometimes the device you’re controlling. Just put them next to each other to see if the code is right.

Hi, I have build and modified your project to create IR Blaster to control, TV on/off, HDMI switch and a Roomba cleaner.
It takes me some time to solve some problems but it works!
I have only a great problem:
In the APP all tiles are in the details. On main page I read the name (IR Blaser) and I can control the TV on/off. If I need to send Roomba code I have to open the details and here I found all other tiles.
Also ActionTiles inport and command only IR Blaster with the TV swtich.
Do I make same mistake?

P.S. I have also tried to make a second Handler with roomba only tile, but the device do not works. It works only if i cancel the original multi tiles device. It seems that only one device can target the ESP8266

Sounds like issue with the UI? It’s better to make multiple devices instead of group them up into just one.

You meen one ESP8266 for roomba, one for the TV and one for hdmi? :confused: