|
发表于 2018-9-13 00:30:29
|
显示全部楼层
本帖最后由 wktm 于 2018-9-13 00:33 编辑
找到一组用树莓派的方案
Plugin to control Dooya DC tubular motors
Plugin for pimatic to support DC tubular motors used in motorized roller blinds made by Chinese company Dooya and other vendors (like AKKO) who use the same chipset. Requires 433,92 MHz transmitter connected to raspberry pi.
The plugin emulates 433 MHz remote control including "up", "down" and "stop" buttons, so you will need actual values from a remote to replicate. You can't teach a receiver an additional remote because it can only hold one at a time.
Installation
npm install pimatic-dooya
Important: if you do not run pimatic as root your user must be a member of the gpio group, and you may need to configure udev with the following rule (assuming Raspberry Pi 3):
$ cat >/etc/udev/rules.d/20-gpiomem.rules <<EOF
SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio", MODE="0660"
EOF
This plugin uses physical pin numbering so by default pin 22 is used which is GPIO25 pin for raspberry pi 3.
Codes
Codes for commands are coded with four pulses which is different from most 433 MHz chipsets. Consider the following image as a reference.
pulse codes
First goes remote id 32bit sequence which is hardcoded within the chipset then the actual command. Also note that a rotary command (in either direction) takes two different sequential commands to execute.
Usage
Plugin does not provide any interface. Instead it supports default shutter actions move up, move down, stop as well as shortcuts raise and lower. Feel free to create rules with them to your heart's content.
中国Dooya公司和其他使用相同芯片组的厂商(如AKKO)生产的电动卷帘机中使用的直流管状电机的pimatic支持插件。要求433,92MHz发射机连接树莓PI。
该插件模拟433MHz的远程控制,包括“向上”、“向下”和“停止”按钮,因此需要从远程复制实际值。你不能教一个接收器一个额外的遥控器,因为它只能保持一个一次。
安装
NPM安装PimoTooYa
重要提示:如果不以根用户身份运行pi.,则用户必须是gpio组的成员,并且可能需要使用以下规则配置udev(假设是Raspberry Pi 3):
$CAT> /ETC/UDEV/RUND.D/20GPIOMEM.规则< EOF
子系统= =“BCM2535GPIOMIM”,内核=“GPIOMIM”,组=“GPIO”,模式=“0660”
EOF
这个插件使用物理引脚编号,所以默认使用PIN 22是树莓PI 3的GPIO25引脚。
代码
命令的代码用四个脉冲编码,这与大多数433 MHz芯片组不同。考虑下面的图像作为参考。
脉冲编码
首先是远程ID 32位序列,它在芯片集内硬编码,然后是实际命令。还要注意,旋转命令(无论在哪个方向)都需要两个不同的顺序命令来执行。
用法
插件不提供任何接口。相反,它支持默认快门动作上移、下移、停止以及快捷方式的提高和降低。你可以随心所欲地去创造规则。
问题是刚买的树莓派,还没有学会装homeassitan呢,有会的赶紧指指路
|
|