Thank you very much for your quick reply Mike!!
I have done some googling after reading you post and now have a better understanding around the use of api: & ota:.
I hope to get this up and running over the weekend
Thank you very much for your quick reply Mike!!
I have done some googling after reading you post and now have a better understanding around the use of api: & ota:.
I hope to get this up and running over the weekend
Hi All, I’m brand new too HA so there’s been lots to learn. I discovered today that it’s possible to integrate the fan/light with local tuya without replacing the wifi module and have successfully set this up. Can someone please tell me what the advantages are of the ESPHome integration by replacing the wifi module vs the Local Tuya integration?
As a user of both localtuya (for my Arlec grid fan) and esphome I think the advantage of esphome is better integration and far more customization. Although for a lot of prebuilt tuya devices I have found that I just end up replicating the function of the original device in esphome and putting the smarts in HA.
I think the main reason for not using localtuya at the moment is the maturity of the project. But this is a chicken or egg scenario as the project needs more users and contributors to become better.
The local keys are a bit tricky to get but this is no more skill required than flashing esphome.
Another consideration is that you are relying on tuya to keep the localapi open/unchanged. With the recent tplink api issues this is never a given. You can mitigate this by blocking them from the cloud though once you have them integrated.
The reasons I am giving localtuya a shot is that if /when I sell the house I want to be able to just reset the devices and leave them for the next owner. With tuya I can do this.
As this project/thread is a controller replacement you can always go back to tuya if you want. This is not an possible and/or easy process if you reflash an onboard controller.
I have posted on the au hardware thread with some more detail. Link
I do plan on writing up a more detailed post and contributing my finding/changes to the localtuya project.
Thank you Tim for such a detailed reply, I found it very helpful. I think I’m going to see if the Local Tuya integration meets my requirements.
When I get more time I’ll continue with replacing the wifi module so I can see first hand the differences. I’ve already built the new wifi module, just need to flash it with the ESP firmware I built today.
@rymo I’m not sure how to DM you on these forums, so this will have to do.
I have three of the 433MHz arlec ceiling fans and I’d like to integrate them to HASS without having to go via the terrible 433MHz interface. Do you have any more of those boards left? The board in the non-gridconnect version has the same footprint as the ones in your photos, though without the 0.1" SIP socket populated.
Cheers,
tjhowse.
I’ve received the boards, soldered them up and flashed them with esphome. Thanks! They were super easy to integrate into hass too. So far so good.
I could power the boards up on the bench, and they’d connect to hass, however they wouldn’t power up when inserted into the fan controller. I suspect the older pre-tuya arlec fan controller boards I have don’t have the components populated to route from the J2 header over to the smarts:
The 6x1 SIL header you see on the board was crudely unsoldered from the J3 header visible in the bottom left, then straightened and soldered back on at J2. I read ground on J2 pin 1 (rightmost in this picture), but as far as I can tell it’s not getting 3.3V on VCC, based on there being no continuity between J2 pin 2 and the VCC pin on the 433MHz radio on the left of the board.
There’s a bunch of suspiciously empty pads just up from J2. I suspect on the non-gridconnect versions of this control board J2 is not usable in this way.
Do you happen to have any photos of your fan board disassembled, showing the PCB underneath the wifi daughterboard?
Cheers,
tjhowse.
@tjhowse these are the only pictures I have on hand. My fans are still in box (waiting for house build) so if I get a chance I’ll try and get a better shot.
Looks like you have a different MCU as well as some unpopulated components, though the presence of the J2 header suggests that it may still be Tuya compatible?
Nice project Rymo, Love the circuit board replacement idea.
I ended up going down another path, which tinlis1 mentioned. And I did get two Arlec Grid Ceiling Fans setup with Localtuya in Home Assistant (No cloud apart from the initial setup)
Basic Steps:
Install HACS on HA, Setup LocalTuya
Pair the Ceiling Fans (and all other grid devices while you are at it) with the “Smart Life” app on your Mobile
Setup an Rooted Android emulator and sign in with that Smart Life account. (Youtube guides)
Dig out the XML file from the app and locate your device keys
Setup the ceiling fan in HA, Select LocalTuya intergration, Pick the device from the dropdown and enter the key. Match the attributes as per screenshot, Setup two devices, one Fan the other Light.
Finished Result in HA
Attribute info - Credit @tinglis1
DPS [1] VALUE [True] → fan on,off > True, False
DPS [3] VALUE [6] → fan speed > 1-6
DPS [4] VALUE [forward] → fan direction > forward, reverse
DPS [9] VALUE [True] → light on/off > True, False
DPS [10] VALUE [100] → light brightness > 0-100
DPS [11] VALUE [100] → light colour (cool-warm) > 0-100
DPS [102] VALUE [normal] → preset mode > normal, sleep, nature
DPS [103] VALUE [off] → timer > off, 1hour, 2hour, 4hour, 8hour
There is a pull request with the local tuya integration to update to the new fan platforms and give all the fan functionality.
You can try it out by using the files from the pull request.
GitHub pull request
Hi Hawker,
I was wondering if you could give a little more detail to the way you went about this method?
I have only just started with HA today and have 6 of the Arlec Fans/Lights to deal with and I think your post/method is my best option knowing where I am at with all this stuff. I have HACS installed as well as localtuya and will pair all the fans with Smart Life app tonight (currently paired with Grid Conenct app). I have an android emulator setup and i guess this is the part where I start to need a bit more help. Look forward to hearing from you! Cheers!
EDIT: After watching YouTube vids as you suggested in you basic steps, I think I have it figured out. Haven’t tried yet but will do over this weekend and see how I go. Thanks for posting your method either way!
If you install the tuya local component via HACS and then replace the three files from the link in my previous post then you should get full speed local control of the fan.
Just make sure you get the right tuya local component.
Have done this just now. Thanks.
I’ve got the fan (with light) into HA and fan turns on/off. I have to figure out all the settings for it now. Haven’t got light working yet.
EDIT: Light is working. Can turn on & off and adjust brightness or intensity or whatever its called. Cant get fan to work since changing the three files.
EDIT 2: Seems to all be working now. Thanks
EDIT 3: What should the fan settings be now with the three files changed?
This is my config for the arlec ceiling fan I have.
Your config has the DPS in the oscillation field, that should be in the direction.
Also the max speed should also be 6.
Thanks mate. I’ve tried to remove the Fan Oscillating Control dps line but once I submit and go back in its there again. Not sure how to remove it and I cant find it in any config file to delete it manually??
EDIT: OK figured that bit out. Now just need to work out how to set the colour range properly. The config calls for a min and max kelvin but the light doesn’t have that set directly.
It has this when I view in developer tools > states
color_temp: 280
hs_color: 27.105, 43.253
rgb_color: 255, 194, 144
xy_color: 0.449, 0.373
They all change in relation to the colour of the light but I don’t know how to convert it to min and max kelvin apart from trial and error.
Yep got that sorry. See my EDIT above.
I haven’t managed to get the colour temp part working either. One day I will have a look at the light python code and make it more flexible but as I don’t ever change the colour I haven’t had it high on my list of things to do.
So based in the post above your fan is working with direction and all 6 speeds?
As I submitted the new fan integration for the I am always looking to hear from those who it worked for. Otherwise I only ever hear from those who it didn’t work for.
I managed to get the temp control working through trial and error of the Min and Max kelvin. Only thing is the slider image is backwards so when it’s cool light the slider shows warm and vise versa. Ended up with Min 2850k and Max 6500k. This got the slider end points correct with that I was seeing in smart things app.
Yep the fan integration seems to work perfectly! I haven’t written any automation or anything with it yet but it seems to work fine using the slider and incrementing the speed that way.
So thanks for that and also your help here getting my fans and lights to work.
excellent work @mgladwin and @tinglis1
Just installed 4 of these fans and being new to HA the info above made my life a lot simpler getting these working on localtuya, thank you.
Any developments on fixing the incorrect (reversed) colour temp slider or incorporating the other fan modes?
The integration could do with some work on the light component as you pointed out it isn’t very good with colour handling.
The other modes such as presets are a work in progress and may not make it into the current pull request.