This is amazingly cool. Did you consider putting a rotary encoder on the PCB to maintain local control over the speed?
That's exactly what I did :) and a convenient thing I realised afterwards is that the push-button function of the rotary encoder gives me the ability to turn the thing on and off with my foot!
My fan worked fine, so I gave it WiFi
41–50 of 97 posts
Re: My fan worked fine, so I gave it WiFi
#42Earlier quoted context omitted.
From the HN guidelines: > Be kind. Don't be snarky. Converse curiously; don't cross-examine. Edit out swipes. > Don't be curmudgeonly. Thoughtful criticism is fine, but please don't be rigidly or generically negative.
These passive aggressive posts are a far worse violation of the HN Guidelines than what they're in reply to almost all of the time - and this is no exception.
Re: My fan worked fine, so I gave it WiFi
#43Earlier quoted context omitted.
These passive aggressive posts are a far worse violation of the HN Guidelines than what they're in reply to almost all of the time - and this is no exception.
No, no they're not. I would much rather people are warned about the guidelines and adhere to them going forward than the opposite and we then just let violations run rampant.
Re: My fan worked fine, so I gave it WiFi
#44I purchased a Phillips fan in a shopping spree. It was hot outside, needed something, did not pay much attention beyond that it worked and was not noisy. At home my eyebrows went halfway on my forehead seeing that there is a remote and the remote is supposed to be my mobile! Need to download the app for it, connect the fan to the Wifi, but it also had bluetooth for some reason. No way Jose! Yet, it was so incredibly…
Bluetooth could be there for initial setup.
To connect the fan to WiFi you have to somehow get the WiFi credentials to the fan. There are a few ways to do that.
One of the most common is for the device when it has not yet been set up to make itself available over Bluetooth. The app can then connect to it and give it the WiFi credentials.
Another common way is for the device to create its own WiFi network with a name that the app can somehow recognize. The app can then find that network, connect to it, and use it to talk to the device.
I don't think this is as popular as the Bluetooth method, probably because it used to require that the user go to their network settings and connect to the device's WiFi network. Plus, when they are connected to the device they are not connected to their "real" WiFi which could disrupt other apps.
However, newer Apple and Android mobile operating systems provide ways for applications to change the network connection in the background or with minimal interaction, which makes this method more friendly so maybe it will become more popular.
There also are supposedly some IoT devices that use WPS (WiFi Protected Setup), where you bring the device near your router, press the WPS button on the router, then press the WPS button on the device, and magic happens to add the devide to your network. I've never actually had any device I've bought support this so it is either uncommon or I've just been unlucky.
Anyway, from what I've read Philips has used both the bluetooth method and the access point method on their WiFi products.
Re: My fan worked fine, so I gave it WiFi
#45Earlier quoted context omitted.
Home Assistant does great at tying all kinds of things together. People had a habit of leaving the basement lights on here. Now they turn themselves off after a timer expires, and also whenever nobody's home. Using HA and a cheap Shelly relay (chosen for form factor), I was able to do this while retaining the existing lighting circuits, light switch, and the lights themselves. It works perfectly, is completely local,…
I'm curious how you used the shelly? They look neat but I'm not sure how people are wiring them into existing switches.
I put the Shelly relay in a pre-existing junction box in the basement.
Previously, this box worked like this: There were romex cables for power/neutral, lights, and the switch itself all inside of that box. The switch, located elsewhere, interrupted power to the lights. (This isn't necessarily the most-typical arrangement, but it's how it is in the house I've got.)
Currently, the box works like this: We still have romex cables for power/neutral, lights, and the switch itself inside of that box. That part hasn't changed at all. But now the Shelly relay interrupts power to the lights.
Thus, the lights are always controlled by software.
And the light switch? That just provides an input that is acted upon by a software script.
The script (which runs internally within the Shelly relay) only does 3 things:
1. If relay is on and switch toggles, turn relay off.
2. If relay is off and switch toggles, turn relay on.
3. If relay is turned on by any mechanism, start timer, and then turn off after timer expires. (Plus other useful timer mechanics like resets on additional toggling, but you get the idea.)
---
It's easiest to think of a Shelly relay like a replacement for a light switch, but that's kind of a limiting way to think about it because that line of thought strongly implies that it should to be located where the switch is. And while it certainly can be installed that way, in practice it really doesn't have that limitation.
For my unfinished basement, there's no neutral at the light switch location so using a regular smart switch didn't pan out. (I could have added a neutral but that would have meant using more parts and getting into some drywall and paint.)
Instead, there's that neat (who am I kidding, it's a mess) junction box I that described, up on the ceiling where all of the things come together... So that's where I put the relay.
Or: There's a box behind a light fixture (well, there "should" be anyway). Often, this box will have the same functions available inside that my junction box happened to have. Power, neutral, light(s), switch input. A relay can go there.
But many houses do have neutral at the light switch location, so a relay can go there instead. Power/neutral feeds in, power for lights feeds out, with a switch (and/or relay!) in the middle. All in one accessible box on the wall. This matches the easy-to-think-of scenario. (IIRC all new homes are supposed to be this way in the US, but...)
It's (usually!) just a matter of finding the right physical location in which to install the relay.
(Note: None of this is intended to be an exhaustive list of variations. Things can and do get weird with household wiring, and regional variations of what "normal" means can vary quite tremendously.)
Re: My fan worked fine, so I gave it WiFi
#46Then there is the series bits x R resistors. The output of each 2R resistor is connected in-between the two resistors that straddle its bit position. So:
Out
|
R
+-2R-bit0
R
+-2R-bit1
...
R
+-2R-bitN
And that's it (apart from pull-up/down resistors)! Due to the way that resistors in series and parallel work, each input step in the ladder provides twice the voltage of the previous if powered: it's base 2 enshrined in a physical object.These are relatively uncommon because they are highly sensitive to the resistor (and trace) tolerance, but this circuit is my Euler's identity of electronics: it very literally bridges the digital and analog worlds.
Re: My fan worked fine, so I gave it WiFi
#47Earlier quoted context omitted.
I'm curious how you used the shelly? They look neat but I'm not sure how people are wiring them into existing switches.
Good question. I put the Shelly relay in a pre-existing junction box in the basement. Previously, this box worked like this: There were romex cables for power/neutral, lights, and the switch itself all inside of that box. The switch, located elsewhere, interrupted power to the lights. (This isn't necessarily the most-typical arrangement, but it's how it is in the house I've got.) Currently, the box works like this: W…
Re: My fan worked fine, so I gave it WiFi
#48Earlier quoted context omitted.
Good question. I put the Shelly relay in a pre-existing junction box in the basement. Previously, this box worked like this: There were romex cables for power/neutral, lights, and the switch itself all inside of that box. The switch, located elsewhere, interrupted power to the lights. (This isn't necessarily the most-typical arrangement, but it's how it is in the house I've got.) Currently, the box works like this: W…
My only fear is my HA box will fail and now nothing works. Most likely because I move and forget to tear everything out. Still something I'm interetsed in
So everything I automate has a fallback option that exists outside of HA. My regular light fixtures, with smart bulbs? I can turn those on and off using their light switch in the event that Home Assistant is dead, like I would if they were dumb bulbs. (I seldom use them that way, but I can.)
And my basement lights have their smarts all programmed directly in the Shelly relay. It works without networking or HA or anything else. So while the basement lights are completely software-operated, they aren't dependent upon the relatively giant stack of software and complex hardware that HA brings
As long as the Shelly relay works, then the basement lights also work -- with a timer.
(That relay can fail, but it is is unlikely to fail soon. I don't worry about it any more than I do a major appliance failing: If/when it happens, I'll deal with it. It's easy to take out again.)
Re: My fan worked fine, so I gave it WiFi
#49very expensive, you are committed! :)
you should have gone Full Giertz and added a badd little robot arm that turn the pot.
esp32 are really nice: hundreds of code examples that do what you want without having to read too many pages. did you use ARDUINO IDE or idf.py SDK?
Re: My fan worked fine, so I gave it WiFi
#50>> The PCB was ordered from JLCPCB, where I opted to have most of the components pre-soldered. very expensive, you are committed! :) you should have gone Full Giertz and added a badd little robot arm that turn the pot. esp32 are really nice: hundreds of code examples that do what you want without having to read too many pages. did you use ARDUINO IDE or idf.py SDK?
I set ESPHome to use IDF under the hood, you can check out my full ESPHome config for this: https://git.ellis.codes/e/esphome-configs/src/branch/main/vo...