loklak/loklak_IBM_Home_Automation
关于
为 Loklak 提供 IoT 更新集成,使其能够接收来自 IBM Home Automation ibmiotf 的 GENERIC 数据。
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- -1
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文IoT
Internet of Things based home automation project using IBM IoTF platform. Original Tutorial: http://diyhacking.com/raspberry-pi-home-automation-ibm-bluemix/
This repository consists of two scripts: client.py - This python script runs on the Raspberry Pi. It accepts commands from the server and pushes data from a PIR motion sensor to the IBM IoTF platform, At the same time it also cretes the impact
server.py - This python script runs on the web server and issues commands that control the GPIO pins on the Raspberry Pi. Before running this script on the server, you should install the corresponding packages for IBM IoTF by doing pip install ibmiotf. The server also pushes the same data to loklak, this is done by installing the loklak python SDK by doing pip install python-loklak-api
- Sending commands to the Raspberry Pi The server side script running on our laptop or on a web server takes input commands from the user and correspondingly sends it to the client (Raspberry Pi). Here, we will be using commands to turn a light ON/OFF. When we pass the command to turn ON a light through the server side script, the information is relayed to the Raspberry Pi and it’s GPIO pin turns ON a relay. The system also sends status updates to the server on whether the light is ON/OFF.

- Receiving data from the Raspberry Pi In case of sending data from the PIR motion sensor connected to the Raspberry Pi, we run a script which reads the sensor through a GPIO pin and broadcasts the data through the IoTF platform. This can then be viewed through the IoTF console or through a custom web application designed using the platform.

Once the data is obtained at the rasperry pi, then the raspberry pi sends the same information to Loklak Server to which it's been configured to.

GPIO pin 3: To provide the control signal to BC547 which in turn activates the relay. GPIO pin 7: To monitor the status (ON/OFF) of the appliance connected to the relay. GPIO pin 11: To provide the status for intruder detection via the PIR motion sensor (0/1).
探索相关项目
加载中…