当前位置:网站首页>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
边栏推荐
- C language # and #
- Various types of questions judged by prime numbers within 100 (C language)
- Live555 push RTSP audio and video stream summary (I) cross compilation
- Detailed explanation of SQL server stored procedures
- Explain task scheduling based on Cortex-M3 in detail (Part 2)
- 99 multiplication table (C language)
- More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
- Example 007: copy data from one list to another list.
- 剑指 Offer 05. 替换空格
- FIO测试硬盘性能参数和实例详细总结(附源码)
猜你喜欢
More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
Example 007: copy data from one list to another list.
Example 004: for the day of the day, enter a day of a month of a year to judge the day of the year?
Management and use of DokuWiki (supplementary)
VESC Benjamin test motor parameters
实例005:三数排序 输入三个整数x,y,z,请把这三个数由小到大输出。
QEMU STM32 vscode debugging environment configuration
剑指 Offer 06. 从尾到头打印链表
MySQL之MHA高可用集群
MHA High available Cluster for MySQL
随机推荐
matlab timeserise
How to copy formatted notepad++ text?
Sizeof (function name) =?
關於線性穩壓器的五個設計細節
Sword finger offer 06 Print linked list from end to end
Anonymous structure in C language
[three tier architecture]
Slist of linked list
Charge pump boost principle - this article will give you a simple understanding
Buildroot system for making raspberry pie cm3
leetcode - 445. Add two numbers II
Why is 1900 not a leap year
Arduino uses nrf24l01+ communication
STM32 --- configuration of external interrupt
Sql Server的存储过程详解
QEMU demo makefile analysis
Talk about the function of magnetic beads in circuits
My-basic application 1: introduction to my-basic parser
Solutions to compilation warnings in Quartus II
[three tier architecture and JDBC summary]