Hacker News new | ask | show | jobs
Automating the light in my living room (raspberryautomation.blogspot.com)
39 points by alewinkler 3264 days ago
6 comments

For everyone wanting to do something similar, please consider not using a raspberry pi for something a simple as controlling a light/garage door and take a look at ESP8266 or ESP32 boards (which have wifi onboard), there's tons of tutorials online, and the price tag can be as low as $3.
This was my first thought. In my case, I'm using an ESP8266 wired to a lux sensor and a motion sensor. I wrote some really basic code to poll the sensors and send the data via MQTT to my home-assistant.io container. HASS seemed like the logical choice given the disparate Z-Wave, Zigbee, Hue etc. devices in my home. The only challenge I didn't solve in the ESP8266 code is monitoring of its power supply (rechargeable AAs). I even 3D printed a decent-enough enclosure for the device. It looks kind of like a Dalek and a hockey puck had an unwanted lovechild.
Something simple? You approach seems to be simple, not mine. Can you use that system as a security alarm and send push notifications to your phone? My system can. There are different approaches, don't underestimate others different than yours.
>Can you use that system as a security alarm and send push notifications to your phone?

Yes, you can. https://github.com/witnessmenow/push-notifications-arduino-e...

The comment was pointing out that the Raspberry Pi is the wrong tool for the job.

Someone can do everything you mentioned on a cheaper, smaller device; one that’s not running an entire OS that has to be maintained.

And I would argue that if you ever want to productize something like this in volume, you might want to go with a BeagleBone Black/Green instead.

You cannot but the RaspberryPi chips, while you can very much buy all the BeagleBone Black chips and make it yourself, if necessary.

I guess my approach is boring then. I replaced most of the switches with z-wave switches, added a Vera controller, added an echo dot and now it all can be managed using a browser or a phone or voice(this turned out to be greater than i expected). It's all UL certified and wired to local code so my insurer should be happy.
Of course you can do it that way also. I developed an app for working with Fibaro system last year, it works with z-wave. Also is possible to buy a z-wave module for raspberry pi, but then you have to buy z-wave devices. My approach is cheaper, and also help me to learn.
This is not about the easiest solution, as the easiest solution is just buying any automation system out there in the market. My main objective was learning. Absolutely always that I've learned something it helped me to get business opportunities or jobs. Regarding to the project, it works great for me. It works exactly as I need, it's flexible and extensible as no other approach, with the easyness that I have of been a software developer. I'm adding an alarm system to the project with push notifications, and I already can control my Pioneer AV receiver with the raspberry (through TC/IP), there are a lot of possibilites! :)
I just moved into a house with a pre-existing alarm system that hasn't been used in years. Motion sensor, door switches, window switches (I think) and maybe the smoke detectors are wired in.

I think a Pi would be a good central unit to control all of them and to then take a couple of defunct iPad/iPod's and make smart control panels out of them.

Anyone have any pointers on how to identify what sensors are what at the control panel? It's just a jumble of what I assume are low voltage wires going into the proprietary box.

You don't want to deal with wires, but still install a motion sensor into the wall?

Why not just rewire the light switch near the door to make it turn on the correct light?

I don't want wires in my view. In my apartment the installation for alarm is built-in, so I already have the UTP cable inside the wall. Also the lamp I want to turn on is on the other side of the room.
is there a link to django code?
thank you!
Not by now, but I can share it, I'm going to check if I have to change something to make it public.
Why didn't you use one of the open source code freely available?
Because I'm a software developer, and I like to build my own systems and make them work to fit my needs. I also like to learn new things.
Perfect answer to that. I am in a similar boat as you, many of the things I create are already done but I do it for the experience nontheless. Plus you can tweak things to your liking and don't end up installing an app that does the thing you want + 99 other things you did not want :D