未加星标

Raspberry Pi 3 based home automation with Node.js and React Native

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二05 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏
Home Automation with RPi and javascript
Raspberry Pi 3 based home automation with Node.js and React Native
VIDEO COMMING SOON Introduction

Since a kid I've been passionate about electronic and different kind of mechanisms. Previously I've done different small projects with arduino, like handbrake for my gaming steering wheel, custom LED tachometer for my car (see my github repo), voice controlled LEDs and so on. Recently I bought Raspberry PI 3 and around all the IoT hype, I decided to start automating my home.

The Technology Stack

Since I'm pretty familiar with javascript and its ecosystem I decided to create my own phone app via react native and connect it via websockets to NodeJS backend. I'm using ImmutableJS's Records for consistency of the data structure and the performance of the app. The data is sent between the client and the server via JSON strings, which are converted to back to Immutable records, when received on both sides. I've separated the shared modules(between client and server) to a separate local npm packages - home-records and home-config. For GPIO controlling (pins of the raspberry) I've used pi-blaster library, together with wiringPi . Since I couldn't find codes for my AC, I've recorded them by myself and added them to lirc config file. Duckdns cron is used as dynamic dns, because my IP address changes periodically and I won't have to recompile the whole app or change config each time. The server broadcasts the changes to all connected users realtime. The phone app is located in /phone-app folder, the server is located in /server . Why don't you take a look?

The Hardware

Raspberry Pi 3 is the controlling unit. High-power devices, such as LED strips, are powered via external 12V 5A power supply (shared ground with the PI). The AC is controlled via 950nm infrared LED. The heating system is wired via relay (on and off) and servo for the thermostat as I was avoid disassembling. Both white LED strip and the RGB strip are connected via IRLZ34N logical transistors to the PI. There is also IR receiver , just in case I want to record anything else. Temperature is measured via DS18B20 temperature sensor.

The wiring looks like:


Raspberry Pi 3 based home automation with Node.js and React Native
New Ideas

I'm open for all kind of ideas about different modules. If you have some ideas in mind, I'll be thankful if you add it in the issue tracker and label it as Idea .

Software dependencies Node & Npm Pi-Blaster WiringPi Lirc

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

分页:12
转载请注明
本文标题:Raspberry Pi 3 based home automation with Node.js and React Native
本站链接:http://www.codesec.net/view/529881.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(31)