[31_PLAYBULB.pm] Modul für MiPow PLAYBULB Candle Bluetooth Lampen

Begonnen von CoolTux, 15 November 2016, 20:22:00

Vorheriges Thema - Nächstes Thema

peterk_de

Leider nicht, beim Schalten kommen die gleichen Logeinträge. Ja, der gatttool-Aufruf ist aus der gleichen VM heraus erfolgt. Und in FHEM ist die Kerze unverändert eingebunden, wie auf der alten, nicht-virtualisierten Hardware, auf der es prima lief.

Die Hardware selbst ist übrigens auch vollkommen unverändert (internes Bluetooth auf Intel NUC), es ist halt jetzt aber der Proxmox-KVM-Hypervisor dazwischen, vermutlich ärgert der ;(
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

peterk_de

Hmmmm ...

{Log(1,qx(gatttool -b AC:E6:4B:06:F9:F9 --char-read -a 23))}

Liefert:

2017.02.03 15:32:43.789 1: Characteristic value/descriptor: 0a 18 00 fd ff

Falls das was im Sinne der Fehlersuche hilft ;)
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

CoolTux

Leider nicht wirklich. Es bedeutet das das gatttool entsprechend was auslesen kann. Aber nichts anderes macht eigentlich das Modul.
Wie sieht es mit der Zeit aus. Kannst Du mal messen wie lange es dauert bis diese Meldung kommt nach dem Du den gatttbefehl abgeschickt hast?
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

peterk_de

OK, hab ich der Einfachheit halber mal direkt auf der Shell gemacht:


~$ time gatttool -b AC:E6:4B:06:F9:F9 --char-read -a 23
Characteristic value/descriptor: 0a 18 00 fd ff

real    0m0.680s
user    0m0.000s
sys     0m0.000s


und bei ein paar mehr darauf folgenden Versuchen:

real    0m0.465s
real    0m0.245s
real    0m0.352s
real    0m0.512s
real    0m0.510s


Sagen wir also, ne halbe Sekunde.
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

CoolTux

Ok das könnte es sein. Traust Du Dir zu im Modul etwas zu ändern?

Zeile 284

$hash->{helper}{RUNNING_PID} = BlockingCall("PLAYBULB_BlockingRun", $name."|".$response_encode, "PLAYBULB_BlockingDone", 5, "PLAYBULB_Bl...


Die 5 bitte mal in eine 30 ändern. Und dann abspeichern. Danach reicht ein reload 74_PLAYBULB in der FHEM Konsole
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

peterk_de

Hab ich gemacht, der Timeout kommt jetzt brav nach 30 Sekunden  :-[

2017.02.03 20:40:59.585 4: (Sub PLAYBULB - stube.kerze) - Starte Blocking Call
2017.02.03 20:40:59.595 4: (Sub PLAYBULB_Run - stube.kerze) - Running nonBlocking
2017.02.03 20:41:29.585 1: Timeout for PLAYBULB_Run reached, terminated process 6492
2017.02.03 20:41:29.586 4: (stube.kerze) - The BlockingCall Process terminated unexpectedly. Timedout


Das war es also wohl nicht :( ... wenn ich in der FHEM-Kommandozeile

{Log(1,qx(gatttool -b AC:E6:4B:06:F9:F9 --char-read -a 23))}

mache, steht das auch "gefühlt sofort" im Log...
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

CoolTux

Ich schaue es mir gleich mal im Code an. Und bei einem Status Request kommt das dann so?
Hast du JSON installiert? Wobei sonst eigentlich eine Meldung kommen sollte.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

peterk_de

Jupp, egal ob bei statusRequest oder bei set ... on.

cpan: JSON is up to date (2.90).

Ich danke Dir für deine Mühen!!!
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

CoolTux

#113
Nimm mal bitte diese Version und teste mal damit.
Verbose auf 5 stellen und dann nur statusRequest nach einem reload 31_PLAYBULB machen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

peterk_de

Ahh diese Debugversion hat neue Erkenntnisse gebracht:

Der Statusrequest läuft jetzt durch wie er soll. Aber nach einmal schalten bleibt er in der Schleife hängen:

(Sub PLAYBULB_gattCharRead) - gatttool noch aktiv, wait 0.5s for new check

(Sub PLAYBULB_gattCharRead) - gatttool noch aktiv, wait 0.5s for new check

(Sub PLAYBULB_gattCharRead) - gatttool noch aktiv, wait 0.5s for new check

(Sub PLAYBULB_gattCharRead) - gatttool noch aktiv, wait 0.5s for new check

(Sub PLAYBULB_gattCharRead) - gatttool noch aktiv, wait 0.5s for new check

(Sub PLAYBULB_gattCharRead) - gatttool noch aktiv, wait 0.5s for new check

(Sub PLAYBULB_gattCharRead) - gatttool noch aktiv, wait 0.5s for new check


Danach geht dann bis zum Reboot gar nichts mehr, auch kein Statusrequest. Ich hab dann mal geschaut, warum:

~$ ps ax | grep -v grep | grep "gatttool"
25262 ?        S      0:00 gatttool -b AC:E6:4B:06:F9:F9 --char-write -a 0x16 -n 00000000


Und der Prozess wird nicht fertig. Mit anderen Worten, dieses char-write klappt nicht. Und da kommt dann wohl die VM ins Spiel, wa? ;(
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

CoolTux

Sieht so aus. Überprüfe es in dem Du den gatttool Befehl ein zu eins selber in der Konsole aus führst.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

peterk_de

OK, ich habe nun aufgegeben. Danke dir trotzdem ganz herzlich!!  Ich bekomme Bluetooth einfach nicht so in die VM reingeschliffen, dass das läuft. Selbst mit einem externen Dongle geht es nicht. Obwohl diverses anderes USB-Zeug keine Probleme an der VM macht. Jetzt läuft das halt in nem anderen Zimmer auf nem FHEM-Sekundär-Raspberry  ::)
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

CoolTux

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

joshi

Hallo,

ich habe noch immer Probeleme mit meiner alten "smart" (Vermutliches unwichtiges Detail: Diese kann keinen Candle Effect.). Diese schaltet sich nicht richtig ab (onoff springt zurück auf on). Dieses leigt daran dass der Effekt nicht richtig abgeschaltet wird.

Folgende Werte sind beim Handle 0x19 gespeichert:

<         [' 0', ' 0', ' 0', ' 0', 'ff', ' 0', ' a', ' a'] # "richtig aus"
---
>         [' 0', ' 0', 'ff', ' 0', 'ff', ' 0', ' a', ' a'] # "onoff ist fehlerhaft"

Mir ist aufgefallen, dass die Playbulb (sowohl die fehlerhafte als auch eine funktionierende) gelegentlich in den "Kerzenmodus" fallen. Vermutlich ist Effekt an einer Stelle in dem Modul undefiniert?

CoolTux

Hallo,

Das schaue ich mir an. Wird aber etwas dauern. So gegen Ende des Monats denke ich. Bin gerade bisschen voll  :-[
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net