My sensor boards (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.
Sweet 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 :)
Both, 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/) and a simple Android app I... also wrote... and... I should get fewer hobbies.
Appreciate 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.
Yes, there is, you can get dirt-cheap NFC stickers that you can put places and use Tasker to detect them. I mainly fire HTTP requests when a sticker is detected, but I use them for other things as well:
* I stuck one with my wifi password on the back side of a painting, so I just tell visitors who want wifi "touch your phone to the boat on the painting" and they get a prompt to connect to the wifi.
* I put one in the car to set all volume to max and enable bluetooth and launch the music app.
* I put one on the nightstand to trigger night mode in the house and silence alerts and stuff.
You can do various things like that, it's pretty useful.
From my reading Apple doesn't allow NFC for anything aside from Apple Pay. Severly limits the usefulness for me sadly. I'd say I encounter 50% iDevices.
Hey 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?
I'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.
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) and YeeLight lamps (I've written my own library and cli client: https://yeelight.readthedocs.io/en/latest/, https://gitlab.com/stavros/yeecli/).
My sensor boards (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.