BLE Supla Gateway - wyzwanie dla programistów
-
krzys4m
- Posts: 77
- Joined: Sat Jul 10, 2021 9:36 am
Liczyłem na to, że może masz dwa urządzenia BT jak ja miałem, hci0 i hci1. Wtedy tłumaczyłoby to Connection lost.
-
effendi
- Posts: 165
- Joined: Wed Apr 26, 2017 9:36 am
Czy ma ktoś jakiś pomysł gdzie szukać rozwiązania?
Pogodynka >>
-
Jacaxx1
- Posts: 87
- Joined: Tue Nov 20, 2018 7:33 pm
Hej koledzy mam pytanie czy ktoś byłby w stanie i chętny wykonać odpalenie bramkę pod czujniki LYWSD03MMC?
-
krzys4m
- Posts: 77
- Joined: Sat Jul 10, 2021 9:36 am
Cześć,
Po odpaleniu supla-virtual-device i termometrów Xiaomi zauważyłem, że procesor działa cały czas na 100%. Po restarcie chwilę jest dobrze, a po 2-3 godzinach znów bardzo duże obciążenie procesora. O co chodzi?
Po odpaleniu supla-virtual-device i termometrów Xiaomi zauważyłem, że procesor działa cały czas na 100%. Po restarcie chwilę jest dobrze, a po 2-3 godzinach znów bardzo duże obciążenie procesora. O co chodzi?
You do not have the required permissions to view the files attached to this post.
-
Robert Błaszczak
- Posts: 5222
- Joined: Sat Dec 22, 2018 8:55 pm
- Location: Zielona Góra
- Has thanked: 37 times
- Been thanked: 27 times
Na Raspberry Pi Zero W - jak widać poniżej - procesor śpi.
You do not have the required permissions to view the files attached to this post.
Pozdrawiam
Robert Błaszczak
Moja prywatna strona: www.blaszczak.pl
Robert Błaszczak
Moja prywatna strona: www.blaszczak.pl
-
krzys4m
- Posts: 77
- Joined: Sat Jul 10, 2021 9:36 am
Problem jest znany i zobaczymy czy ten sposób zadziała https://github.com/IanHarvey/bluepy/com ... 62fea1a396
Uruchomienie co jakiś czas skryptu załatwia sprawę
Tak naprawdę to pomogła aktualizacja firmware termometrów przez smartfona via bluetooth.
Uruchomienie co jakiś czas skryptu załatwia sprawę
Code: Select all
#!/bin/bash
for PID in $(ps -ef | egrep "(/bin/sh -c /supla-mi-th/LYWSD03MMC.py)|(bluepy-helper)" | grep -v grep | awk {'print $2'}); do
RUNTIMESEC=$(ps -o etimes= -p "$PID")
if [ "$RUNTIMESEC" -gt "300" ]; then kill -9 $PID; fi
done
exit 0
Last edited by krzys4m on Tue Apr 19, 2022 2:16 pm, edited 1 time in total.
-
ksiesek
- Posts: 4
- Joined: Fri Mar 18, 2022 5:27 am
Witajcie grupowicze...
Nie znalazlem nigdzie odpowiedzi jak poradzic sobie z ponizszym problemem:
Nie znalazlem nigdzie odpowiedzi jak poradzic sobie z ponizszym problemem:
Zawartosc pliku /etc/supervisor/conf.d/mi-th0.conf:supervisorctl status
mi-th-0 FATAL Exited too quickly (process log may have details)
supla-virtual-device RUNNING pid 1565, uptime 0:00:16
Bezposrenie polecenie z lini komend dziala poprawnie[program:mi-th-0]
command=python3 ~/supla-virtual-device/LYWSD03MMC.py --device A4:C1:38:0B:9C:E8 --battery --round --debounce --name th0 --callback save-to-file.sh
diectory=/home/pi/supla-mi-th
autostart=true
autorestart=true
user=pi
tail -f /var/log/supervisor/supervisord.log:python3 ~/supla-virtual-device/LYWSD03MMC.py --device A4:C1:38:0B:9C:E8 --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:0B:9C:E8
Temperature: 21.9
Humidity: 33
Battery voltage: 3.059 V
Battery level: 96
/home/pi/supla-virtual-device/save-to-file.sh sensorname,temperature,humidity,voltage,batteryLevel,timestamp th0 21.9 33 3.059 96 1648140191
Czy ktos sobie z tym poradzil i moglby podpowiedziec co trzeba zrobic?2022-03-24 16:44:07,919 INFO waiting for supla-virtual-device to die
2022-03-24 16:44:07,926 INFO stopped: supla-virtual-device (exit status 0)
2022-03-24 16:44:09,009 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2022-03-24 16:44:09,010 INFO Included extra file "/etc/supervisor/conf.d/mi-th0.conf" during parsing
2022-03-24 16:44:09,010 INFO Included extra file "/etc/supervisor/conf.d/supla-virtual-device.conf" during parsing
2022-03-24 16:44:09,027 INFO RPC interface 'supervisor' initialized
2022-03-24 16:44:09,027 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2022-03-24 16:44:09,029 INFO supervisord started with pid 1562
2022-03-24 16:44:10,040 INFO spawned: 'mi-th-0' with pid 1564
2022-03-24 16:44:10,051 INFO spawned: 'supla-virtual-device' with pid 1565
2022-03-24 16:44:10,171 INFO exited: mi-th-0 (exit status 2; not expected)
2022-03-24 16:44:11,183 INFO spawned: 'mi-th-0' with pid 1568
2022-03-24 16:44:11,185 INFO success: supla-virtual-device entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-24 16:44:11,310 INFO exited: mi-th-0 (exit status 2; not expected)
2022-03-24 16:44:13,323 INFO spawned: 'mi-th-0' with pid 1569
2022-03-24 16:44:13,445 INFO exited: mi-th-0 (exit status 2; not expected)
2022-03-24 16:44:16,460 INFO spawned: 'mi-th-0' with pid 1570
2022-03-24 16:44:16,581 INFO exited: mi-th-0 (exit status 2; not expected)
2022-03-24 16:44:17,584 INFO gave up: mi-th-0 entered FATAL state, too many start retries too quickly
-
artur_n
- Posts: 466
- Joined: Thu Aug 17, 2017 2:24 pm
- Location: RJA
Witam,
czy komuś udało się odpalić te czujniki na alternatywnym oprogramowaniu ATC. Za nic nie dokonać odczytu danych z czujnika.
Używam: https://github.com/pvvx/ATC_MiThermometer
Do tego instrukcji zacytowanej kilka stron wcześniej.
Proszę o pomoc.
Pozdrawiam
czy komuś udało się odpalić te czujniki na alternatywnym oprogramowaniu ATC. Za nic nie dokonać odczytu danych z czujnika.
Używam: https://github.com/pvvx/ATC_MiThermometer
Do tego instrukcji zacytowanej kilka stron wcześniej.
Proszę o pomoc.
Pozdrawiam
-
artur_n
- Posts: 466
- Joined: Thu Aug 17, 2017 2:24 pm
- Location: RJA
Przy próbie odczytu mam taki błąd:
Code: Select all
Traceback (most recent call last):
File "/home/pi/./supla-mi-th/LYWSD03MMC.py", line 565, in <module>
import cryptoFunctions
ModuleNotFoundError: No module named 'cryptoFunctions'