Code: Select all
sudo hcitool lescan
To:
Code: Select all
root@orangepi3:/supla-mi-th# python3.7 ./LYWSD03MMC.py --device A4:C1:38:9B:1A:27 --battery --round --debounce --name th0 --callback save-to-file.sh
---------------------------------------------
MiTemperature2 / ATC Thermometer version 5.0
---------------------------------------------
Please read README.md in this folder. Latest version is available at https://github.com/JsBergbau/MiTemperature2#readme
This file explains very detailed about the usage and covers everything you need to know as user.
Trying to connect to A4:C1:38:9B:1A:27
Connection lost
Waiting...
Trying to connect to A4:C1:38:9B:1A:27
Connection lost
Waiting...
Trying to connect to A4:C1:38:9B:1A:27
Connection lost
Waiting...
Trying to connect to A4:C1:38:9B:1A:27
Connection lost
Waiting...
Trying to connect to A4:C1:38:9B:1A:27
Connection lost
Code: Select all
orangepi3:/supla-mi-th# bluetoothctl
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller B0:02:47:B9:F0:EA Discovering: yes
[NEW] Device A4:C1:38:9B:1A:27 LYWSD03MMC
[bluetooth]# trust A4:C1:38:9B:1A:27
[CHG] Device A4:C1:38:9B:1A:27 Trusted: yes
Changing A4:C1:38:9B:1A:27 trust succeeded
[bluetooth]# connect A4:C1:38:9B:1A:27
Attempting to connect to A4:C1:38:9B:1A:27
[CHG] Device A4:C1:38:9B:1A:27 Connected: yes
Connection successful
Nie jestem pewien ale ten Orange pi3 nie ma Bluetooth low energy a z tego co kojarzę to po takim bl się te czujniki komunikują i taki protokół tam jest i wydaje mi się że nie jest kompatybilny z bl 5 jaki chyba masz na pokładzie ale mogę się mylić. Ja mam Raspberry Pi 0 Wkrzys4m wrote: Tue Feb 01, 2022 8:47 pm Mac adres wpisany jest dobrze, to coś innego. Może oprogramowanie bluetooth mojego orange pi3 nie współpracuje ze skryptem?
Mam dwa takie termometry i na obu to samo
Łącząc się bezpośrednio - jest OK.Code: Select all
orangepi3:/supla-mi-th# bluetoothctl Agent registered [bluetooth]# scan on Discovery started [CHG] Controller B0:02:47:B9:F0:EA Discovering: yes [NEW] Device A4:C1:38:9B:1A:27 LYWSD03MMC [bluetooth]# trust A4:C1:38:9B:1A:27 [CHG] Device A4:C1:38:9B:1A:27 Trusted: yes Changing A4:C1:38:9B:1A:27 trust succeeded [bluetooth]# connect A4:C1:38:9B:1A:27 Attempting to connect to A4:C1:38:9B:1A:27 [CHG] Device A4:C1:38:9B:1A:27 Connected: yes Connection successful
Code: Select all
Building target: supla-virtual-device Invoking: Cross G++ Linker g++ -L/usr/src/openssl/lib -pthread -lrt -o "supla-virtual-device" ./src/supla-client-lib/cfg.o ./src/supla-client-lib/devicechannel.o ./src/supla-client-lib/eh.o ./src/supla-client-lib/ini.o ./src/supla-client-lib/ipcsocket.o ./src/supla-client-lib/lck.o ./src/supla-client-lib/log.o ./src/supla-client-lib/proto.o ./src/supla-client-lib/safearray.o ./src/supla-client-lib/srpc.o ./src/supla-client-lib/sthread.o ./src/supla-client-lib/supla-client.o ./src/supla-client-lib/supla-socket.o ./src/supla-client-lib/tools.o ./src/mqtt/mqtt.o ./src/mqtt/mqtt_client.o ./src/mqtt/mqtt_pal.o ./src/accept_loop.o ./src/channel-io.o ./src/client_device.o ./src/client_publisher.o ./src/client_subscriber.o ./src/common.o ./src/common_dht_read.o ./src/devcfg.o ./src/devconnection.o ./src/gpio.o ./src/ipcctrl.o ./src/mcp23008.o ./src/pi_2_dht_read.o ./src/pi_2_mmio.o ./src/supla-dev.o ./src/w1.o -lssl -lcrypto /usr/bin/ld: ./src/pi_2_mmio.o:(.bss+0x0): multiple definition of pi_2_mmio_gpio'; ./src/pi_2_dht_read.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:49: supla-virtual-device] Error 1Code: Select all
LE Scan ...
A4:C1:38:AA:xx:xx (unknown)
A4:C1:38:AA:xx:xx ATC_xxxxxx
A4:C1:38:F4:xx:xx (unknown)
A4:C1:38:F4:xx:xx ATC_xxxxxx
A4:C1:38:76:xx:xx (unknown)
A4:C1:38:76:xx:xx ATC_xxxxxxCode: Select all
supervisorctl status
mi-atc FATAL Exited too quickly (process log may have details)Code: Select all
python3.7 ./LYWSD03MMC.py --device A4:C1:38:76:xx:xx --battery --round --debounce --name th0 --callback save-to-file.sh
---------------------------------------------
MiTemperature2 / ATC Thermometer version 5.0
---------------------------------------------
Please read README.md in this folder. Latest version is available at https://github.com/JsBergbau/MiTemperature2#readme
This file explains very detailed about the usage and covers everything you need to know as user.
Trying to connect to A4:C1:38:76:xx:xx
Connection lostCode: Select all
pi@SUPLA:~/supla-virtual-device $ supervisorctl status
mi-atc RUNNING pid 4949, uptime 0:00:02
supla-pushover RUNNING pid 1031, uptime 0:45:28
supla-virtual-device RUNNING pid 4942, uptime 0:00:08
pi@SUPLA:~/supla-virtual-device $ supervisorctl status
mi-atc STARTING
supla-pushover RUNNING pid 1031, uptime 0:45:42
supla-virtual-device RUNNING pid 4942, uptime 0:00:22hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: XX:XX:XX:XX:XX:XX ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:731 acl:0 sco:0 events:44 errors:0
TX bytes:1755 acl:0 sco:0 commands:44 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'SUPLA'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 4.1 (0x7) Revision: 0x168
LMP Version: 4.1 (0x7) Subversion: 0x2209
Manufacturer: Broadcom Corporation (15)