有两种方法将Domoticz安装到你的树莓派,简单方法和复杂方法,两种方法本页均有介绍。

准备(两种方法都需要)

如果你买了个'新鲜'的树莓派,你要确保你树莓派里的系统运行良好。

用"pi"用户登录你的树莓派,打开终端命令行窗口,输入:

sudo raspi-config

Using Raspi-config you should expand the root filesystem, set your timezone, finish (reboot) and login again. You can find various tutorials on how to do this elsewhere on the internet, or you can check out the tutorial on this wiki: 全新树莓派的第一次设置

Domoticz - 简单方法(推荐)

如果你的树莓派中运行的是基于Debian的Linux系统,比如Raspbian和Ubuntu,安装Domoticz非常简单,执行下面的命令即可:

sudo curl -L install.domoticz.cn | sudo bash

如果出现以下错误,请安装curl,安装命令:sudo apt-get install curl

恭喜!安装已经完成了。

在浏览器中输入你的树莓派的IP与Domoticz默认端口号8080即可访问。在树莓派的浏览器中可以直接输入

[注意: 如果安装时遇到证书错误提示,你可以执行sudo curl -L -k install.domoticz.cn | sudo bash,这条命令通过非加密通道下载Domoticz(http而不是https)。

Domoticz - 复杂方法(手动安装)

You can also install Domoticz by compiling the source code yourself. The advantage of this is that it should work on most versions of Linux (Debian/Ubuntu tested).

For a manual install see:

Build times reported are when using a Raspberry Pi 3, using "make -j 3"

(Older revisions of the raspberry pi could take up to 10x longer to compile)

You also might need to install GCC 4.6 and compile with this version as 4.9 takes to much memory

Creating a large swap file does not solve the problem, and build with 'make -j 3'

If you are using an old version of the Raspberry Pi, remove the "-j 4" from the make commands!

This will also work for Debian systems, but one these systems you do not need to install the wiringpi library

sudo apt-get install cmake make gcc g++ libssl-dev git curl libcurl4-openssl-dev libusb-dev wiringpi

Change to your source folder (could be your home folder)

Build & Install Boost Libraries

If this is a clean system, continue at Now build and install the Boost library.

[ This should most likely not be needed. The only thing you need to do is to add the flag -DCMAKE_EXE_LINKER_FLAGS=-lboost_atomic to the cmake command when building Domoticz below. I do not own an Raspberry PI so I have not tested it on an Raspberry PI but I have tested it on other ARM computer running debian (sterys) ]

Its recommended that you use the latest Boost libraries - as of 13th November 2016 that is version 1.62.0.

For this we need to compile/install them by issuing the following commands:

These instructions can also be used on a Linux system.

[This first step is necessary because you will get linking errors if you don't remove the old Boost library]

Instructions here are for removing boost 1.55, on your system this might be another version, so adopt these commands to your need.

It could also be you never installed boost on your system, do not worry, just execute the commands

sudo apt-get remove libboost-dev libboost-thread-dev libboost-system-dev libboost-atomic-dev libboost-regex-dev

sudo apt-get remove libboost-date-time1.55-dev libboost-date-time1.55.0 libboost-atomic1.55.0 libboost-regex1.55.0 libboost-iostreams1.55.1

sudo apt-get remove libboost-iostreams1.55.0 libboost-iostreams1.55.0 libboost-iostreams1.55.0

sudo apt-get remove libboost-serialization1.55-dev libboost-serialization1.55.0 libboost-system1.55-dev

sudo apt-get remove libboost-system1.55.0 libboost-thread1.55-dev libboost-thread1.55.0 libboost1.55-dev

sudo apt-get autoremove

Now build and install the Boost library.

mkdir boost

cd boost

wget https://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.gz/download

tar xvfz download

rm download

cd boost_1_62_0/

./bootstrap.sh

./b2 stage threading=multi link=static --with-thread --with-date_time --with-system --with-atomic --with-regex

sudo ./b2 install threading=multi link=static --with-thread --with-date_time --with-system --with-atomic --with-regex

cd ../../

rm -Rf boost/

Build Support for OpenZWave

If you need support for ZWave, you need to compile open-zwave before compiling domoticz

Make sure to follow the below steps, you will end up with a folder layout like:

- open-zwave-read-only

- dev-domoticz

sudo apt-get install libudev-dev

For the first time, you need to clone the code (copy) from GitHub into your system:

Refresh the source and build OpenZWave(1m23.057s for initial build (rpi2 3 minutes))

cd open-zwave-read-only

git pull

make -j 3

go back to the top folder (your Home directory) with:

cd .. or cd ~

Domoticz Source

For the first time, you need to checkout the source from GitHub onto your system:

Note building on pi 3 with image september jessy with gcc 4.9, you need bigger swapspace 512 instead of 100 (see https://www.raspberrypi.org/forums/viewtopic.php?f=26&t=46472) or else it will take ages...

Build Domoticz (21m15.899s on a raspberry pi 3 , 35m0.646s on a raspberry pi 2 for initial build)

If you have updated dev-domoticz, the make step will only re-build those files that have been changed - although if a header-file common to a lot of source files has been changed, this will still take a long time

Change to the Domoticz directory, refresh the source and and start building

cd dev-domoticz

git pull

cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt

make -j 3

设置Domoticz开机自启动(网页升级后也需要)

sudo cp domoticz.sh /etc/init.d

sudo chmod +x /etc/init.d/domoticz.sh

sudo update-rc.d domoticz.sh defaults

编辑启动脚本,修改USERNAME, DAEMON 及 DAEMON_ARGS参数为你自己的设置

sudo vi /etc/init.d/domoticz.sh

USERNAME=pi

DAEMON=/home/$USERNAME/domoticz/$NAME

DAEMON_ARGS="-daemon -www 8080"

如果想用另一个端口访问domoticz,将8080修改为你需要的端口号即可:

DAEMON_ARGS="-daemon -www 8080"

测试Domoticz (确保获取文件所有权!)

cd domoticz

sudo ./domoticz

Start Domoticz

sudo service domoticz.sh start

然后到浏览器中查看Domoticz是否运行正常。

升级Domoticz

升级前请一定备份数据库及自定义脚本等内容,升级会导致某些修改丢失。

二进制安装更新

使用web界面中的选项升级Domoticz(设置->软件更新)

如果升级失败(例如下载错误),你需要手动升级:

稳定版:

cd domoticz

sudo sh ./updaterelease

Beta版:

cd domoticz

sudo sh ./updatebeta

如果以上命令出现连接失败的问题,可以编辑升级脚本,将domoticz.com改为domoticz.cn。

源码升级

cd domoticz

git pull

make -j 4

树莓派php5装不上,在树莓派中安装和运行Domoticz相关推荐

  1. 在KVM上的Windows中安装Virtio驱动程序

    在KVM上的Windows中安装Virtio驱动程序 2018年7月3日 Virtio驱动程序是KVM虚拟机的半虚拟化设备驱动程序. 半虚拟化驱动程序可提高机器性能,减少I / O延迟并将吞吐量提高到 ...

  2. 如何在 Windows 上的 VirtualBox 中安装 macOS Big Sur

    [手把手]如何在 Windows 上的 VirtualBox 中安装 macOS Big Sur 零.软件环境前提准备 一.准备安装 1.在您的计算机上安装 VirtualBox 软件.之后,单击您下 ...

  3. linux使用什么dos系统安装,在Linux系统中安装DOSBox运行MS-DOS上游戏及程序的方法...

    在 Linux 系统中可以借助安装 DOSBox 来运行 MS-DOS 游戏及程序,比如运行 C++ 编译器 Turbo C++,同时 DOSBox 还支持 Windows.MacOS.Unix 操作 ...

  4. firefox装在linux_在Linux中安装Firefox

    获得 Firefox 并安装到您的计算机上,是您使用 Firefox 的第一步.本文将展示如何将 Firefox 安装到 Linux 上.对于其他操作系统,见在 Windows 中安装 Firefox ...

  5. manjaro linux必装工具,在Manjaro系统中安装常用软件的方法

    本文介绍在Manjaro系统中安装一些常用的软件,有vim.chrome.截图.TIM.网易云音乐.搜狗输入法.markdown编辑器.pdf阅读器.steam.git客户端.下载工具uget.视频播 ...

  6. uos服务器开启远程桌面连接不上,UOS系统中安装x11vnc远程桌面

    UOS系统中安装x11vnc远程桌面 一.UOS系统中安装x11vnc服务 步骤1 :更新系统 sudo apt-get update 步骤2 :安装x11vnc sudo apt-get insta ...

  7. firefox装在linux_在 Linux 中安装 Firefox

    获得 Firefox 并安装到您的计算机上,是您使用 Firefox 的第一步.本文将展示如何将 Firefox 安装到 Linux 上. 对于其他操作系统,见 许多 Linux 发行版默认包含 Fi ...

  8. 2012服务器asp文件,在Windows Server 2012上的IIS中安装经典ASP的方法

    本文档将指导你完成安装 IIS 和配置经典 ASP 网站的过程. 经典 ASP 是服务器端脚本环境,可用于创建和运行动态 Web 应用程序. 借助 ASP,你可以将 HTML 页面.脚本命令和 COM ...

  9. 虚拟机如何装linux6,如何在vmvare中安装redhat linux6虚拟机

    2017-01-09 回答 启动vmware workstation,单击页面中的"创建新的虚拟机" 选择"经典(推荐)"单击"下一步": ...

最新文章

  1. div 相同属性提取
  2. 2019年值得关注的人工智能技术的五大趋势
  3. idae 格式化代码 设置eslint_vscode 中格式化代码[vue2支持,插件ESLint、Prettier、Vetur]...
  4. connect: 网络不可达_Java网络编程和NIO详解1:JAVA 中原生的 socket 通信机制
  5. [转帖]Mootools源码分析-03 -- Hash
  6. 星巴克全面上线美团外卖 并联合美团推出“1971客厅”
  7. NYOJ-括号配对问题(数据结构)
  8. 开课吧Java面试题:使用 this 和 super 要注意
  9. placeholder中实现换行
  10. mac ubuntu双系统EFI分区修复,内置磁盘分区修复
  11. 5G核心网-Identifiers身份标识
  12. 如何创建一个facebook账户
  13. MATLAB强化学习实战(十一) 使用自定义训练循环训练强化学习策略
  14. 高德地图之逆地理编码
  15. 【UVM实战】第七章:UVM中的寄存器模型(2)简单的寄存器模型
  16. 阿里 VP 贾扬清确认离职!尚未创立公司,方向或是 AI 架构?
  17. 解决home end pgup pgdn没有独立,需要键盘映射的问题
  18. LiteMes系统中对于文件系统的文件删除使用
  19. 苹果电脑怎么安装python库_Mac环境下安装python库时出现ModuleNotFoundError: No module named 'XXX'...
  20. 知识点(1):OSI网络模型

热门文章

  1. 广州php平均工资 2020,打工人注意!2020广州工资价位出炉
  2. 阿里云申请云盾免费SSL证书(https)
  3. python 实现读取excel中的所有sheet后,增加新的sheet,生成新的excel文件
  4. 【算法java版04】:顺时针方向循环输出矩阵
  5. 深入浅出计算机组成原理22-冒险和预测(一):hazard是“危”也是“机”
  6. RK3568开发笔记(四):在虚拟机上使用SDK编译制作uboot、kernel和buildroot镜像
  7. Google glass GDK - Helloword
  8. 每天五分钟机器学习:聚类算法中经常使用的肘部法则是什么?
  9. 索爱X10i小技巧,X10i的三种模式(新手扫盲)
  10. 亚信安全科创板上市:市值超150亿 A股迎来网络安全新力量