如果你的homeassistant是安装在树莓派上的,那么是可以直接使用它的gpio的。
homeassistant可以自定义custome py脚本 通过python就可以很方便控制gpio 这边就需要了解两块内容:1: pyt...
最后,安装Google Assistant SDK,示例和OAuth工具。 python -m pip install --upgrade google-assistant-library python -m pip install --upgrade google-assistant-sdk[samples] python -m pip install --upgrade google-auth-oauthlib[tool] 启动并运行。如果任何安装失败,请彻底检查拼写和间距。 对Raspberry Pi进行...
输入sudo raspi-config 回车 选择:Interfacing Options>Camera>YES 打开树莓派摄像头服务。 回到Home assistant 主页,左侧选择开发者工具,在右侧发现Home assistant的配置文件路径,接下来我们开始配置HA的组件。 根据配置文件地址,在命令行终端中修改HA的配置文件。 1 sudonano/home/homeassistant/.homeas...
将物联网设备(基于树莓派GPIO的传感设备)接入到Home Assistant前,需要先通过MQTT客户端将设备连接到MQTT服务器。 首先介绍一下物联网设备通过消息中间件与HASS通信的过程。将物联网设备(基于树莓派GPIO的传感设备)称为ClientA,将Home Assistant称为ClientB,EMQX服务器为Broker。则一条传感器信息通过MQTT的订阅机制传送...
Home Assistant autoconfiguring MQTT-powered GPIO control for a Raspberry Pi. This is designed to allow you to automagically configure some switches to show up in Home Assitant which control GPIOs on your Raspberry Pi. This was made because I couldn't get the Home Assistant remote GPIO function...
参考1:https://www.home-assistant.io/docs/installation/virtualenv/ 参考2:https://www.home-assistant.io/docs/installation/raspberry-pi/ 硬件环境:raspberry 3B+ 软件环境:RASPBIAN STRETCH WITH DESKTOP 2018-06-27 说明: 基本是抄录hass.io官网资料,只是很多情况需要FQ才看到到,身为天朝的开发者真是醉了。
$sudo useradd -rm homeassistant -G dialout,gpio,i2c 1. 由于此帐户仅用于运行Home Assistant Core,-rm因此添加了额外的参数来创建系统帐户和创建主目录。该参数-G dialout,gpio,i2c将用户添加到dialout,gpio和i2c组。使用Z-Wave和Zigbee控制器需要第一个,而与Raspberry的GPIO通信则需要第二个。
Home Assistant不能使用root运行,建个专用用户吧,然后顺便把GPIO的权限都给它,方便以后连接其它传感器。 sudouseradd -rmhomeassistant -G dialout,gpio,i2c cd/opt &&sudomkdirhomeassistantsudochownhomeassistant:homeassistant homeassistant 4. python虚拟容器创建及Home Assistant安装 ...
gpio4) 设置homeassistant用户密码pi@raspberrypi:~ $ sudo passwd homeassistant5) 创建homeassist...