Formerly: cmd-E-Zone-MyAir
Catered shell scripts to integrate air conditioner control units by Advantage Air into Homekit using the plug-in homebridge-cmd4.
No affiliation with Advantage Air or any of their products.
sudo npm install -g --unsafe-perm homebridge-cmd4
. NOTE: you do not need to follow the extra installation steps on cmd4's page for this.AdvAir.sh
with the IP address of your Advantage Air controller. If you have two constant zones, then you will need to edit your IP Address and Constant Zones at the top of ezone.sh
and zones.sh
(you still need to use two scripts sorry!).AdvAir.sh
(or ezone.sh
and zones.sh
for Two Constant Zone Users) to a subdirectory of your .homebridge
directory; e.g. .homebridge/Cmd4Scripts/AdvAir.sh
. I suggest doing this from the web UI terminal (...
top, right hand corner). Mine file is located in /home/pi/AdvAir.sh
.cd
in your terminal and hit enter to get there) of your Raspberry Pi using sudo nano AdvAir.sh
and pasting the contents inside, then saving. Its pathway in this case to be used in our config will be /home/pi/AdvAir.sh
. For HOOBS users this would create your shell scripts at the lcation: /home/hoobs/.hoobs/AdvAir.sh
.sudo apt-get install jq
. Make sure curl
is installed (it should already be installed).config.json
using the samples included in each directory for your appropriate setup; this should be completed from the Homebridge web UI. NOTE: Two devices cannot have the exact same name in your config. A switch and temperature sensor cannot both be named 'Kitchen' for example.sudo npm install -g --unsafe-perm homebridge-cmd4
. NOTE: you do not need to follow the extra installation steps on cmd4's page for this.AdvAir.sh
with the IP address of your Advantage Air controller. If you have two constant zones, then you will need to edit your IP Address and Constant Zones at the top of ezone.sh
and zones.sh
(you still need to use two scripts sorry!).AdvAir.sh
(or ezone.sh
and zones.sh
for Two Constant Zone Users) to a subdirectory of your .homebridge
directory; e.g. .homebridge/Cmd4Scripts/AdvAir.sh
. I suggest doing this from the macOS terminal like how you installed Homebridge. When I tested this on my wife's MacBook; mine was located in /Users/hername/AdvAir.sh
.cd
in your terminal and hit enter to get there) of your MacBook using sudo nano AdvAir.sh
and pasting the contents inside, then saving. Its pathway in this case to be used in our config will be /Users/hername/AdvAir.sh
.brew install jq
(you may need to install brew first or you may use port
).brew install curl
config.json
using the samples included in each directory for your appropriate setup; this should be completed from the Homebridge web UI. NOTE: Two devices cannot have the exact same name in your config. A switch and temperature sensor cannot both be named 'Kitchen' for example.I have not successfully set this up on Windows 10 Homebridge server yet. If you have and want to contribute; please reach out and let me know how you did it. Otherwise I strongly suggest you buy a dedicated Raspberry Pi.
Due to the current limitations in Homekit, multi-zoned ducted air conditioners are not represented as a single accessory. Our work around here is two create multiple accessories:
config.json
has been added for users who do not have the Temperature Sensors.As this is not a typical homebridge plug-in, you will not get prompted to update when I add improvements. The best way to keep up-to-date is to click the Watch
button in the top right corner and select All Activity
or Custom
and then Releases
. This will ensure you get an email everytime I push a new release with new features or improvements! Feel free to give me a Star
as well if you are happy with the work.
What we have discovered from over 8 months of trying to improve performance and reduce homebridge/cmd4 log warnings:
"The air conditioner controller returns successfully incomplete system data when it is in use by the operator and also incomplete system data if any 'Set' operation is in progress. The scripts that send/receive data from the air conditioner controller must not only retry on failures, but also check the validity of the data as the incomplete system data returned presents a successful return code. Even with these features built into the scripts, Cmd4 has implemented a queuing system such that any polling or queries from HomeKit would only send a setValue when no other operation was in progress. This feature in Cmd4 is the WoRM (Write once Read many) queue. While Cmd4 can then manage all traffic to the air conditioner controller, it cannot know if someone is actually interacting with the control tablet. When interacting with the control tablet and Cmd4 is trying to send/receive data simultaneously, errors are unavoidable. Cmd4 hides these unavoidable errors in debug mode as it retries the transaction and in this way presents a clean console that otherwise would cause panic to the operator." - John Talbot.
See LICENSE
防火墙重新加载配置firewall-cmd --reload 查看开放的端口 firewall-cmd --list-ports nano /etc/sysconfig/iptables -A IN_public_allow -p tcp -m tcp --dport 9001 -m conntrack --ctstate NEW -j ACCEPT nano /etc/firewalld
Traceback (most recent call last): File "/usr/bin/firewall-cmd", line 24, in <module> from gi.repository import GObject ImportError: No module named 'gi 已解决===》点击打开链接
centos7版本对防火墙进行加强,不再使用原来的iptables,启用firewalld 简单上手(以配置8080端口为例) 输入命令查看防火墙的状态 firewall-cmd --state; 如果没有开启,输入命令 systemctl start firewalld.service; 开启8080端口,输入: firewall-cmd --zone=public --add-port=8
Centos6 使用的是iptables,Centos7 使用的是filewall(-cmd) iptables 用于过滤数据包,属于网络层防火墙。 firewall 能够允许哪些服务可用,那些端口可用...属于更高一层的防火墙。 1.firewalld的基本使用 启动: systemctl start firewalld 查看状态:systemctl status firewalld 停止
一、centos7版本对防火墙进行加强,不再使用原来的iptables,启用firewalld 1.firewalld的基本使用 启动: systemctl start firewalld 查状态:systemctl status firewalld 停止: systemctl disable firewalld 禁用: systemctl stop firewalld 在开机时启用一个服
近期新上一个项目,环境是Centos7,以前的iptables的经验没用了。把firewalld研究了下,粗略记录一下把。 常用命令: firewall-cmd --reload firewall-cmd --complete-reload 和上面的意思差不多,但是不会维持当前连接信息。比如,用ssh22登陆,如果不小心把ssh 22关掉了,用reload不会把当前的连接杀死。但是用 --comp
前言 centos防火墙根据系统大致有2种,一种是centos6时代的iptables;一种是centos7时代的firewalld; CentOS 7中防火墙是一个非常的强大的功能,在CentOS 6.5中在iptables防火墙中进行了升级了 本文讲解的是 CentOS 7中的 firewalld 一、rich-rule实现IP端口限制访问 1、添加规则 firewall-cmd --perm
永久开放80端口号:firewall-cmd --permanent --zone=public --add-port=80/tcp 多端口: firewall-cmd --zone=public --add-port=80-90/tcp --permanent 移除80端口号:firewall-cmd --permanent --zone=public --remove-port=80/tcp
端口转发的概念: 它是指当访问指定的ip+端口时,可以将流量转发至指定其他指定的ip+端口。端口转发操作必须启用区域的ip伪装功能,将私有网络的ip地址隐藏并映射到一个公有ip地址。 这是地址转换的一种形式,常用于路由。由于受内核限制,端口转发功能仅可用于 IPv4。 转发的目的ip和端口,可以是本机或其他主机,协议可以为TCP或UDP。当转发时不指定ip时,则默认为转发目的ip为本机ip。当转发
#限制某个ip访问 firewall-cmd --permanent --add-rich-rule='rule family=ipv4 source address="10.6.1.2" drop' #查看当前zones # firewall-cmd --get-active-zones #显示当前开放端口 # firewall-cmd --zone=public --list-ports
1、启用IP转发 vim /etc/sysctl.conf net.ipv4.ip_forward = 1 sysctl -p #命令生效 2、修改网卡的zone firewall-cmd --permanent --zone=external --change-interface=ens33(出口网卡) 3、设置IP地址伪装(SNAT) firewall-cmd --zone=external
宽为限 紧用功 功夫到 滞塞通 firewall-cmd Linux上新用的防火墙软件,跟iptables差不多的工具。 补充说明 firewall-cmd 是 firewalld的字符界面管理工具,firewalld是centos7的一大特性,最大的好处有两个:支持动态更新,不用重启服务;第二个就是加入了防火墙的“zone”概念。 firewalld跟iptables比起来至少有两大好处: fi
Centos下安装vsftpd,用windows连接时出错如下信息: 500 OOPS: cannot change directory:/home/test 500 OOPS: priv_sock_get_cmd 远程主机关闭连接。 如图: 错误原因:对方服务器开启了selinux,导致连接被阻断的情况。 解决方法:1) 关闭selinux: #setenforce 0
1.基础命令 ##查看帮助: firewall-cmd --help ##查看版本: firewall-cmd --version ##默认防火墙状态(关闭后显示notrunning,开启后显示running) firewall-cmd --state ##查看所有打开的端口: firewall-cmd --zone=public --list-ports ##查看防火墙规则(只显示/et
输入 ~$ rosrun turtlesim 错误 Usage: rosrun [--prefix cmd] [--debug] PACKAGE EXECUTABLE [ARGS] rosrun will locate PACKAGE and try to find an executable named EXECUTABLE in the PACKAGE tree. If it f
命令格式: firewall-cmd --permanent --remove-rich-rule '规则列表' firewall-cmd --permanent --remove-rich-rule 'rule family="ipv4" source address="0.0.0.0/0" forward-port port="8077" protocol="tcp" to-port="80"
Windows CMD 指令–遍历文件夹 遍历文件夹 在.bat中 $ $ 代表变量,在命令行 $中代表变量 遍历某路径下所有文件夹 for /R %i in (d:*)do echo %i>>a.txt 遍历文件夹中文件运行某程序 遍历某路径下所有文件写入txt for /f %i in (D:\qyj)do echo %i>>a.txt 遍历当前路径下所有文件运行程序 for /R %i in
1、开放端口 firewall-cmd --zone=public --add-port=80/tcp --permanent 2、查看某端口是否开放 firewall-cmd --query-port=80/tcp 3、查看端口开启列表 firewall-cmd --list-port 4、重启防火墙 firewall-cmd --reload 5、关闭防火墙 systemctl st