当前位置:网站首页>Meizu Bluetooth remote control temperature and humidity access homeassistant
Meizu Bluetooth remote control temperature and humidity access homeassistant
2022-07-05 08:24:00 【Sharing master】
Meizu remote control purchased three , With the efforts of the forum God , Now connected to homeassistant.
1. Download plug-ins , Put it in custom_components/meizu_hygrothermo
2. install bulepy
sudo apt-get install python3-pip libglib2.0-dev
apt-get install -y python3-setuptools
sudo apt-get install git build-essential libglib2.0-dev
git clone https://github.com/IanHarvey/bluepy.git
cd bluepy
python3 setup.py build
sudo python3 setup.py install
3. Add to boot process
Write the script in /etc/rc.local file
Enter the command :
sudo vi /etc/rc.local
stay exit 0 Enter on the previous line :
python3 /bluepy/gateway.py( You put gateway.py Path to file )
preservation
Restart to see the effect
4. Use your charm home app Rename the connected Bluetooth 1、2、3……
5. The configuration file
sensor:
- platform: meizu_hygrothermo
name: keting #1
host: '192.168.99.5' # Be the server of Bluetooth gateway ip, The project is to write gateway mac, I test with ip Can only be
mac: '68:3E:34:CC:D3:44' # Meizu Bluetooth mac Address
scan_interval: 30
- platform: meizu_hygrothermo
name: zhuwo #2
host: '192.168.99.5'
mac: '68:3E:34:CC:DE:D2'
scan_interval: 30
homeassistant:
customize:
sensor.keting_humidity:
friendly_name: Humidity in living room
sensor.keting_temperature:
friendly_name: The temperature in the living room
sensor.zhuwo_humidity:
friendly_name: Humidity in master bedroom
sensor.zhuwo_temperature:
friendly_name: Master bedroom temperature
group:
huanjing:
name: Indoor environment
view: no
entities:
- sensor.keting_humidity
- sensor.keting_temperature
- sensor.zhuwo_humidity
- sensor.zhuwo_temperature
sudo reboot
6. Configure Bluetooth
bluetoothctl
stay [bluetooth]# Input... In mode
power on # Turn on Bluetooth
scan on # scanning , Enter this command and you will see your Meizu Bluetooth mac 了
agent on # open agent, I don't know this either
trust [BT mac address] # Trust Bluetooth mac
pair [BT mac address] # I don't know what it is ,pair A space followed by your Meizu Bluetooth mac, If you want to connect several, just separate pair xx:xx:xx........
connect [BT mac address] # Connect Meizu Bluetooth , Also connect several , Just connect them separately .
quit # sign out bluetoothctl
reboot # restart N1
The effect is as follows
边栏推荐
- Google sitemap files for rails Projects - Google sitemap files for rails projects
- OLED 0.96 inch test
- STM32 single chip microcomputer - bit band operation
- QEMU demo makefile analysis
- Introduction of air gap, etc
- Step motor generates S-curve upper computer
- Sword finger offer 05 Replace spaces
- Verilog -- state machine coding method
- 剑指 Offer 06. 从尾到头打印链表
- DCDC circuit - function of bootstrap capacitor
猜你喜欢
How to copy formatted notepad++ text?
Volatile of C language
[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code
FIO测试硬盘性能参数和实例详细总结(附源码)
STM32 virtualization environment of QEMU
Why is 1900 not a leap year
Several implementation schemes of anti reverse connection protection of positive and negative poles of power supply!
实例007:copy 将一个列表的数据复制到另一个列表中。
On boost circuit
Soem EtherCAT source code analysis attachment 1 (establishment of communication operation environment)
随机推荐
Anonymous structure in C language
Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off
Hardware 1 -- relationship between gain and magnification
[trio basic from introduction to mastery tutorial 20] trio calculates the arc center and radius through three points of spatial arc
Adaptive filter
Slist of linked list
Cinq détails de conception du régulateur de tension linéaire
More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
PMSM dead time compensation
VESC Benjamin test motor parameters
Matlab2018b problem solving when installing embedded coder support package for stmicroelectronic
Volatile of C language
Soem EtherCAT source code analysis I (data type definition)
2020-05-21
FIO测试硬盘性能参数和实例详细总结(附源码)
Infected Tree(树形dp)
How to write cover letter?
Example 004: for the day of the day, enter a day of a month of a year to judge the day of the year?
2022.7.4-----leetcode.1200
Google sitemap files for rails Projects - Google sitemap files for rails projects