5 ms·
I should write about my smart home setup, if nothing else, just to give you guys ideas. I've designed and fabricated light and temperature sensors that I've pl
by StavrosK 10y ago
I should write about my smart home setup, if nothing else, just to give you guys ideas.
I've designed and fabricated light and temperature sensors that I've placed in every room, and lights are controlled by a combination of Sonoff switches (they're great, I've written my own firmware for them (https://gitlab.com/stavros/sonoff https://gitlab.com/stavros/sonoff) and YeeLight lamps (I've written my own library and cli client: https://yeelight.readthedocs.io/en/latest/ https://yeelight.readthedocs.io/en/latest/, https://gitlab.com/stavros/yeecli/ https://gitlab.com/stavros/yeecli/).
My sensor boards (https://github.com/skorokithakis/esplights https://github.com/skorokithakis/esplights) can also output RF and IR so I can control various devices in the room, like TVs and ACs. I've hooked this all up to a small Python script that talks to the devices over an MQTT server, separated the network for all this crap into a vlan with no access anywhere (other than the MQTT server and the OTA firmware upgrade server), and now I can successfully sound like a lunatic with way too much free time on the internet.
- notyourwork 10y ago> and now I can successfully sound like a lunatic with way too much free time on the internet. Had me at "I've written my own firmware for them ". :-)
- StavrosK 10y agoIt really really wasn't that hard, have a look through the code, it's just a hundred lines or so, IIRC.
- lawik 10y agoSweet lunacy, you make me envy your free time. How do you usually use the system? Automation? Remote control. I get what it can do, curious what you actually fo with it :)
- StavrosK 10y agoBoth, I have it set so lights go on and off when someone enters/exits the room, it logs temperature in rooms just because, and I have a task on my phone (using Tasker) with an NFC tag on my nightstand that turns everything off when I go to bed. It's nice to not have to touch any light switches ever, you walk into a room and the lamp just slowly fades into light. I know how crazy this sounds (because I roll my eyes at people who say "I have a task on my phone" too), but it's not really very hard to do. I control everything through an HTTP message queue I wrote (https://github.com/skorokithakis/gweet/ https://github.com/skorokithakis/gweet/) and a simple Android app I... also wrote... and... I should get fewer hobbies.
- adyus 10y agoHey Stavros, I'm curious about your lighting and motion detection setup. How did you get the lights to fade in and out? Is it purely in software (meaning the switches are permanently on)? Are you using PIR for motion detection? Did you layer any logic on top of that to keep lights from turning off if you're stationary for too long?
- StavrosK 10y agoI'm using YeeLight lamps (and of course I wrote my own library for them), which can fade in/out very easily. I am using PIR indeed, I just added a timeout of X minutes, depending on the room, where you just eyeball X to be long enough that there will be motion if there's someone in the room, but not long enough that the light always stays on.
- lawik 10y agoAppreciate the details. I'd love to do similar stuff but priorities, priorities, priorities. Was not aware that there are actually useful NFC stuff. Last time someone showed it to me it was pretty meh and I've heard that Android had a terrible implementation (Beam something?). I might be living on old info but I so rarely see anything about NFC except for payments.
- StavrosK 10y ago
- jondiggsit 10y agoSerious question: How much would I have to pay you to consult on a new, high-end residential project? It's a 12,000 sq. ft. single-family residence.
- StavrosK 10y agoErr, I live very, very far from you, but my email is in my profile, feel free to drop me a line if you want!