sudo mosquitto_passwd /etc/mosquitto/pwfile llqy yalong
netstat -tln | grep 1883
添加samba
sudo apt-get install samba
添加homeassistant目录到samba共享
sudo nano /etc/samba/smb.conf
添加如下
[HOMEASSISTANT]
path = /home/homeassistant
comment = No comment
browsable = yes
read only = no
valid users =
writable =yes
guest ok = yes
public = yes
create mask = 0777
directory mask = 0777
force user = root
force create mode = 0777
force directory mode = 0777
hosts allow =
修改samba 密码
sudo smbpasswd -a pi
http://mirrors.zju.edu.cn/raspbian/raspbian/
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份为 sources.list.bak
npm config set registry="https://registry.npm.taobao.org/"
ps -ef | grep mosq && netstat -tln | grep 1883
sudo service mosquitto start
sudo service mosquitto stop
mosquitto_pub -t "/house/door1" -m "1"
home assistant mqtt publish
{"topic":"test","payload":"dd"}
开启服务
sudo systemctl start mosquitto
查看服务状态
sudo systemctl status mosquitto
临时使用
pip install pythonModuleName -i https://pypi.douban.com/simple
在命令行中添加以上参数,可以让pip从指定的镜像源安装软件。
网友评论