当前位置: 首页 > 软件库 > 其他开源 > 物联网 >

homebridge-pi-thermostat

授权协议 Readme
开发语言 JavaScript
所属分类 其他开源、 物联网
软件类型 开源软件
地区 不详
投 递 者 赫连瑾瑜
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Homebridge Pi Thermostat Plugin

This is a homebridge plugin to make a Raspberry Pi connected with a Relay Board and DHT22 Temperature and Humidity Sensor into a smart thermostat that can be controlled via the Home app on iOS using Homekit.

Raspberry Pi Thermostat showing Wiring

Guide

For those who want to create their own thermostat using Raspberry Pi, here is a blog post that goes through the details of where to buy the parts, how to assemble it and what software to install to get this to work.

Installation

  • Install nodejs and other dependencies for homebridge to work
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs libavahi-compat-libdnssd-dev
  • Install BCM2835 for temperature sensor to work
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.52.tar.gz
tar zxvf bcm2835-1.52.tar.gz
cd bcm2835-1.52
./configure && make && sudo make check && sudo make install
  • Install homebridge and this plugin
sudo npm install -g --unsafe-perm homebridge homebridge-pi-thermostat
  • Add the accessory config to your homebridge config file located at this path ~/.homebridge/config.json.
{
  "bridge": {
    "name": "Homebridge",
    "username": "CC:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-154"
  },
  "description": "",
  "accessories": [
    {
      "accessory": "Thermostat",
      "name": "Pi Thermostat",
      "fanRelayPin": 26,
      "heatRelayPin": 21,
      "coolRelayPin": 20,
      "temperatureSensorPin": 4,
      "minimumOnOffTime": 120000,
      "blowerTurnOffTime": 80000,
      "startDelay": 10000,
      "temperatureCheckInterval": 10000
    }
  ],
  "platforms": []
}
  • Start it up by running homebridge command.

Configuration

Relay Pins

You can change the pin to turn on and off the relay switch for the Fan, Heat and Cool setting.

"fanRelayPin": 26,
"heatRelayPin": 21,
"coolRelayPin": 20,

Temperature Sensor Pin

You also can change the pin for the DHT22 temperature sensor.

"temperatureSensorPin": 4,

Timing

The system has a minimum on off time which is in miliseconds and is the minimum time it keeps the Heat or Cool turned on and off so that it does not damage the heating or cooling system by turning on and off very quickly.

"minimumOnOffTime": 120000,

The system also has a blowerTurnOffTime which is the time it takes to turn off the blower after Heat or Cool is turned off.

"blowerTurnOffTime": 80000,

The interval for checking the temperature of the room can also be set and defaults to 10 seconds.

"temperatureCheckInterval": 10000

Screenshots

 相关资料
  • PI

    PI 属性 PI 属性就是 π,即圆的周长和它的直径之比。这个值近似为 3.142。 语法: Math.PI; 示例: console.log( Math.PI ); 结果: >>> 3.141592653589793

  • PI

    描述 (Description) 它返回圆周长与直径之比约为3.14159。 语法 (Syntax) 其语法如下 - Math.PI 例子 (Example) 请尝试以下示例程序。 <html> <head> <title>JavaScript Math PI Property</title> </head> <body> <script type="t

  • PI

    圆周长与直径之比约为3.14159。 语法 (Syntax) Math.PI 例子 (Example) console.log(Math.PI) // the ratio of a circle's circumference to its diameter: ~3.142 输出 (Output) 3.141592653589793

  • 树莓派卡片电脑安装 Docker CE 警告:切勿在没有配置 Docker APT 源的情况下直接使用 apt 命令安装 Docker. 系统要求 Docker CE 不仅支持 x86_64 架构的计算机,同时也支持 ARM 架构的计算机,本小节内容以树莓派单片电脑为例讲解 ARM 架构安装 Docker CE。 Docker CE 支持以下版本的 Raspbian 操作系统: Raspbian

  • 全球化的时代,全世界正透过各种技术的进步变得更加相互连结。由于整合系统的好处是越来越被了解,所以智慧环境中的创新也渐渐的推进。智慧型手机的普及与高操控支援配置,更容易在连结感应器和物件时,建构用户的应用程序。为了实现技术的融合,使得任何东西可以在任何时间,任何地点与任何项目和任何人使用任何的路径/网路和任何的服务来连结,物联网(The Internet of Things)这方面的研究日趋完善。

  • ART-Pi 是 RT-Thread 团队经过半年的精心准备,专门为嵌入式软件工程师、开源创客设计的一款极具扩展功能的 DIY 开源硬件。 在广大的嵌入式软件开发人群中,不少优秀的开发人员在日常的工作学习中,总是会迸发出一些创新的想法,往往需要有一些扩展接口丰富的开源硬件去实现。为此,RT-Thread 推出一款名为 ART-Pi 的硬件,能很好的满足绝大多数开发人员的 DIY 想法,其具备性能强