当前位置:网站首页>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

边栏推荐
- 剑指 Offer 05. 替换空格
- Compilation warning solution sorting in Quartus II
- 实例003:完全平方数 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
- Use indent to format code
- Ble encryption details
- Void* C is a carrier for realizing polymorphism
- The firmware of the connected j-link does not support the following memory access
- Soem EtherCAT source code analysis I (data type definition)
- STM32 outputs 1PPS with adjustable phase
- Example 005: three numbers sorting input three integers x, y, Z, please output these three numbers from small to large.
猜你喜欢

Keil use details -- magic wand

Brief discussion on Buck buck circuit

Installation and use of libjpeg and ligpng

Charge pump boost principle - this article will give you a simple understanding

STM32 --- NVIC interrupt

NTC thermistor application - temperature measurement

Volatile of C language

STM32---ADC

剑指 Offer 05. 替换空格

Management and use of DokuWiki (supplementary)
随机推荐
STM32 single chip microcomputer - external interrupt
My-basic application 2: my-basic installation and operation
STM32 single chip microcomputer -- debug in keil5 cannot enter the main function
Charge pump boost principle - this article will give you a simple understanding
Let's briefly talk about the chips commonly used in mobile phones - OVP chips
Example 010: time to show
QEMU STM32 vscode debugging environment configuration
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
Example 008: 99 multiplication table
leetcode - 445. 两数相加 II
Soem EtherCAT source code analysis attachment 1 (establishment of communication operation environment)
STM32 --- serial port communication
[trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
Stm32--- systick timer
General makefile (I) single C language compilation template
Nb-iot technical summary
[tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
第十八章 使用工作队列管理器(一)
FIO测试硬盘性能参数和实例详细总结(附源码)
Detailed summary of FIO test hard disk performance parameters and examples (with source code)