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

Begonnen von CoolTux, 20 Oktober 2016, 22:06:57

Vorheriges Thema - Nächstes Thema

CoolTux

So Version 0.4.0 hat nun den neuen set Befehl color. Damit bekommt man ein reines weiß.
Ich habe nun noch mitbekommen das man auch noch die Helligkeit der Lampe einstellen kann. Sowas wie dimmen, wobei man aber sagen muß das nicht wirklich gedimmt wird sondern nur die ausgewählte Farbe dunkler gemacht wird.
Beim Colorpicker vom FHEM kann man dafür einfach rechts nach unten ziehen ins Schwarz rein.
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

Ma_Bo

Hey CoolTux, mein Batterywert stimmt irgendwie noch nicht so wirklich :

Internals:
   BTMAC      8B:39:4B:0D:AC:E6
   CFGFN
   DEF        8B:39:4B:0D:AC:E6
   NAME       PlayBulbCandle1
   NR         99927
   STATE      on
   TYPE       PlayBulbCandle
   VERSION    0.4.1
   Readings:
     2016-10-30 19:31:34   battery         4.16930389267585e+35
     2016-10-30 19:31:34   color           on
     2016-10-30 19:31:34   effect          none
     2016-10-30 19:31:34   onoff           1
     2016-10-30 19:31:34   rgb             ffffff
     2016-10-30 19:31:34   sat             255
     2016-10-30 19:31:34   speed           170
     2016-10-30 19:31:34   state           on
   Helper:
     effect     none
     onoff      1
     rgb        ffffff
     sat        255
     speed      170
Attributes:
   aColor     0x19
   aEffect    0x17
   room       4.22_Playbulb
   webCmd     rgb:rgb FF0000:rgb 00FF00:rgb 0000FF:rgb FFFFFF:rgb F7FF00:rgb 00FFFF:rgb F700FF sat:sat:effect


2016.10.30 19:26:05.879 1: PERL WARNING: Integer overflow in hexadecimal number at ./FHEM/31_PlayBulbCandle.pm line 310.
2016.10.30 19:26:05.880 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/31_PlayBulbCandle.pm line 310.
2016.10.30 19:26:10.289 1: PERL WARNING: Integer overflow in hexadecimal number at ./FHEM/31_PlayBulbCandle.pm line 310.
2016.10.30 19:26:10.289 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/31_PlayBulbCandle.pm line 310.
2016.10.30 19:26:16.644 1: Timeout for PlayBulbCandle_Run reached, terminated process 4891
2016.10.30 19:26:16.644 3: (PlayBulbCandle2) - The BlockingCall Process terminated unexpectedly. Timedout

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


Von den Meldungen habe ich jede Menge im LOG

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

Deine aktuelle Version habe ich am laufen, 0.4.1

Selbst mit verbose 0 kommen die Meldungen, dachte ich könnte sie so unterdrücken, zumindest im LOG.
Schalten kann ich aber alles, Farbe setzen und Effekte usw funktioniert.
Hast du ne Idee...?
NUC mit FHEM, HM Heizungsthermostate, HM Wandthermostate, Intertechno Funksteckdosen, 10" Tablet als Wanddisplay, KeyMatic, Fensterkontakte, Fensterkontakte umgebaut als Wassermelder und Briefkastenmelder, Aussenthermostat, Anwesenheitssteuerung über Fritz Box, Google Home usw. usw.

CoolTux

Noch nicht aber ich schaue es mir nachher mal an.
Kann sein das bei Dir irgendwas anders ist.
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

CoolTux

Kannst du das bitte mal auf dem pi aus führen. Bitte MAC anpassen

gatttool -b MAC --char-read -a 0x1f
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

Ma_Bo

Characteristic value/descriptor: 50 4c 41 59 42 55 4c 42 20 43 41 4e 44 4c 45
NUC mit FHEM, HM Heizungsthermostate, HM Wandthermostate, Intertechno Funksteckdosen, 10" Tablet als Wanddisplay, KeyMatic, Fensterkontakte, Fensterkontakte umgebaut als Wassermelder und Briefkastenmelder, Aussenthermostat, Anwesenheitssteuerung über Fritz Box, Google Home usw. usw.

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

herrmannj


Ma_Bo

@CoolTux
Characteristic value/descriptor: 59 27 8d f9

@herrmannj
wo genau?
NUC mit FHEM, HM Heizungsthermostate, HM Wandthermostate, Intertechno Funksteckdosen, 10" Tablet als Wanddisplay, KeyMatic, Fensterkontakte, Fensterkontakte umgebaut als Wassermelder und Briefkastenmelder, Aussenthermostat, Anwesenheitssteuerung über Fritz Box, Google Home usw. usw.

fxstc

Hallo,

ich häng mich da etwas dran.
Heute sind noch ein paar Playbulbs geliefert worden. ;D

Allerdings eine Kerze macht nicht das was sie soll.
Sie reagiert "verkehrt" auf Befehle und das Battery Reading ist wie bei Ma_Bo 4.16930389267585e+35
Bei set Color FF0000 z.B. kommt die Lampe mit 1700FB zurück.
Dann ist aber auch die Log-Ausganbe entsprechend:

2016.10.31 14:51:03 1: PERL WARNING: substr outside of string at ./FHEM/31_PlayBulbCandle.pm line 292.
2016.10.31 14:51:03 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/31_PlayBulbCandle.pm line 292.
2016.10.31 14:51:04 1: PERL WARNING: Integer overflow in hexadecimal number at ./FHEM/31_PlayBulbCandle.pm line 310.
2016.10.31 14:51:04 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/31_PlayBulbCandle.pm line 310.


Bei gatttool -b MAC --char-read -a 0x1f kommt Characteristic value/descriptor: 50 4c 41 59 42 55 4c 42 20 43 41 4e 44 4c 45 und bei gatttool -b MAC --char-read -a 0x1b kommt Characteristic value/descriptor: 67 00 77 7a
Und zuletzt noch bei gatttool -b MAC --primary kommt attr handle = 0x0001, end grp handle = 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle = 0x0008, end grp handle = 0x000b uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle = 0x000c, end grp handle = 0x001f uuid: 0000ff02-0000-1000-8000-00805f9b34fb
attr handle = 0x0020, end grp handle = 0x0023 uuid: 0000180f-0000-1000-8000-00805f9b34fb
attr handle = 0x0024, end grp handle = 0x0030 uuid: 0000180a-0000-1000-8000-00805f9b34fb
attr handle = 0x0031, end grp handle = 0xffff uuid: 00001016-d102-11e1-9b23-00025b00a5a5


Hilft dir das irgendwie weiter ?

Ma_Bo

primary:

attr handle = 0x0001, end grp handle = 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle = 0x0008, end grp handle = 0x000b uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle = 0x000c, end grp handle = 0x001f uuid: 0000ff02-0000-1000-8000-00805f9b34fb
attr handle = 0x0020, end grp handle = 0x0023 uuid: 0000180f-0000-1000-8000-00805f9b34fb
attr handle = 0x0024, end grp handle = 0x0030 uuid: 0000180a-0000-1000-8000-00805f9b34fb
attr handle = 0x0031, end grp handle = 0xffff uuid: 00001016-d102-11e1-9b23-00025b00a5a5
NUC mit FHEM, HM Heizungsthermostate, HM Wandthermostate, Intertechno Funksteckdosen, 10" Tablet als Wanddisplay, KeyMatic, Fensterkontakte, Fensterkontakte umgebaut als Wassermelder und Briefkastenmelder, Aussenthermostat, Anwesenheitssteuerung über Fritz Box, Google Home usw. usw.

fxstc

Eins noch...

das scheint eine neuere Firmware zu sein.
In der IPhone-App meldet sich die Ein mit BTL300_v6 und alle Anderen mit BTL300_v5


CoolTux

Vielen Dank für die Info. Jetzt wäre noch schön zu wissen wie man die Firmware auslesen kann. Und natürlich welche char man bei den neuen ansprechen muss.
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

herrmannj

ich hab das jetzt nicht im Kopf meine aber das der letzte Service bei Dir anders ist.

Das Handle für die fw Version hatte ich gestern in der Hand (Wortspiel)  ;)

Macht aber Sinn v5 vs v6. Warum soll es da anders sein als sonst. v7 wird folgen ... ;)

Lässt sich raus bekommen, die verschlüsseln ja nicht un der RGB Handle lässt sich ja an seiner Charakteristik identifizieren.

vg
joerg

herrmannj

Zitat von: CoolTux am 31 Oktober 2016, 15:20:16
Vielen Dank für die Info. Jetzt wäre noch schön zu wissen wie man die Firmware auslesen kann. Und natürlich welche char man bei den neuen ansprechen muss.

Ich habe da gestern mit rum gespielt. Das war in einer der letzten services.

Man kommt da theoretisch auch systematisch ran weil die Services ja hierarchisch geordnet sind.

vg
joerg

CoolTux

Zitat von: fxstc am 31 Oktober 2016, 15:12:23
Eins noch...

das scheint eine neuere Firmware zu sein.
In der IPhone-App meldet sich die Ein mit BTL300_v6 und alle Anderen mit BTL300_v5

Versuche mal bitte folgende Werte

Color 0x22 oder 0x13 mach da erstmal ein read drauf.
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