[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

CoolTux

Und die Kerzen stehen so 1-2m vom FHEM entfernt. Ansonsten wüsste ich auch nicht weiter.
Mach mal in der Linux Shell

gatttool -b mac --char-read -a 0x16
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

Zitat von: jonah am 22 Oktober 2017, 19:38:36
Ich habe jetzt nochmal verbose 5 global gesetzt, da spuckt das Logfile nach einem statusRequest ein bisschen mehr aus, was anscheinend mit Kerze2 zu tun hat:


2017.10.22 19:35:43 5: Starting notify loop for global, 1 event(s), first is ATTR global verbose 5
2017.10.22 19:35:43 5: createNotifyHash
2017.10.22 19:35:43 5: End notify loop for global
2017.10.22 19:35:43 4: WEB_192.168.178.67_56510 GET /fhem?fw_id=185; BUFLEN:0
2017.10.22 19:35:43 4: WEB: /fhem?fw_id=185 / RL:1225 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:35:44 4: WEB_192.168.178.67_56510 GET /fhem?XHR=1&inform=type=status;filter=;since=1508693742;fmt=JSON&fw_id=185×tamp=1508693745944; BUFLEN:0
2017.10.22 19:35:47 4: Connection closed for WEB_192.168.178.67_56510: EOF
2017.10.22 19:35:47 4: Connection accepted from WEB_192.168.178.67_56517
2017.10.22 19:35:47 4: WEB_192.168.178.67_56517 GET /fhem?room=Kerzen; BUFLEN:0
2017.10.22 19:35:48 4: WEB: /fhem?room=Kerzen / RL:3875 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:35:48 4: WEB_192.168.178.67_56517 GET /fhem?XHR=1&inform=type=status;filter=room=Kerzen;since=1508693746;fmt=JSON&fw_id=189×tamp=1508693750691; BUFLEN:0
2017.10.22 19:35:49 4: Connection closed for WEB_192.168.178.67_56517: EOF
2017.10.22 19:35:49 4: Connection accepted from WEB_192.168.178.67_56521
2017.10.22 19:35:49 4: WEB_192.168.178.67_56521 GET /fhem?detail=Kerze2; BUFLEN:0
2017.10.22 19:35:50 4: WEB: /fhem?detail=Kerze2 / RL:5135 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:35:50 4: WEB_192.168.178.67_56521 GET /fhem?cmd=%7BReadingsVal(%22Kerze2%22%2C%22sat%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307; BUFLEN:0
2017.10.22 19:35:50 5: Cmd: >{ReadingsVal("Kerze2","sat","")}<
2017.10.22 19:35:50 4: WEB: /fhem?cmd=%7BReadingsVal(%22Kerze2%22%2C%22sat%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:35:50 4: Connection accepted from WEB_192.168.178.67_56522
2017.10.22 19:35:50 4: Connection accepted from WEB_192.168.178.67_56523
2017.10.22 19:35:50 4: WEB_192.168.178.67_56522 GET /fhem?cmd=%7BAttrVal(%22Kerze2%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307; BUFLEN:0
2017.10.22 19:35:50 5: Cmd: >{AttrVal("Kerze2","room","")}<
2017.10.22 19:35:50 4: WEB: /fhem?cmd=%7BAttrVal(%22Kerze2%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307 / RL:27 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:35:50 4: WEB_192.168.178.67_56523 GET /fhem?XHR=1&inform=type=status;filter=Kerze2;since=1508693748;fmt=JSON&fw_id=190×tamp=1508693752350; BUFLEN:0
2017.10.22 19:35:54 4: WEB_192.168.178.67_56521 GET /fhem?cmd=%7BAttrVal(%22Kerze2%22%2C%22userReadings%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307; BUFLEN:0
2017.10.22 19:35:54 5: Cmd: >{AttrVal("Kerze2","userReadings","")}<
2017.10.22 19:35:54 4: WEB: /fhem?cmd=%7BAttrVal(%22Kerze2%22%2C%22userReadings%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:35:57 4: WEB_192.168.178.67_56521 GET /fhem?cmd=%7BReadingsVal(%22Kerze2%22%2C%22statusRequest%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307; BUFLEN:0
2017.10.22 19:35:57 5: Cmd: >{ReadingsVal("Kerze2","statusRequest","")}<
2017.10.22 19:35:57 4: WEB: /fhem?cmd=%7BReadingsVal(%22Kerze2%22%2C%22statusRequest%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:35:58 4: Connection closed for WEB_192.168.178.67_56523: EOF
2017.10.22 19:35:59 4: WEB_192.168.178.67_56521 POST /fhem&detail=Kerze2&dev.setKerze2=Kerze2&fwcsrf=csrf_448637865731307&cmd.setKerze2=set&arg.setKerze2=statusRequest&val.setKerze2=; BUFLEN:0
2017.10.22 19:35:59 5: Cmd: >set Kerze2 statusRequest<
2017.10.22 19:35:59 4: BlockingCall (PLAYBULB_BlockingRun): created child (21852), uses telnetForBlockingFn_1508675306 to connect back
2017.10.22 19:35:59 4: (Sub PLAYBULB - Kerze2) - Call BlockingRun
2017.10.22 19:35:59 5: Starting notify loop for Kerze2, 1 event(s), first is statusRequest
2017.10.22 19:35:59 5: createNotifyHash
2017.10.22 19:35:59 5: End notify loop for Kerze2
2017.10.22 19:35:59 4: Connection accepted from telnetForBlockingFn_1508675306_127.0.0.1_35376
2017.10.22 19:35:59 5: Cmd: >{BlockingRegisterTelnet($cl,35)}<
2017.10.22 19:35:59 4: (Sub PLAYBULB_Run - Kerze2) - Running nonBlocking
2017.10.22 19:35:59 4: WEB_192.168.178.67_56521 GET /fhem?detail=Kerze2&fw_id=; BUFLEN:0
2017.10.22 19:35:59 4: WEB: /fhem?detail=Kerze2&fw_id= / RL:5135 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:36:00 4: WEB_192.168.178.67_56521 GET /fhem?cmd=%7BReadingsVal(%22Kerze2%22%2C%22sat%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307; BUFLEN:0
2017.10.22 19:36:00 5: Cmd: >{ReadingsVal("Kerze2","sat","")}<
2017.10.22 19:36:00 4: WEB: /fhem?cmd=%7BReadingsVal(%22Kerze2%22%2C%22sat%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:36:00 4: WEB_192.168.178.67_56522 GET /fhem?cmd=%7BAttrVal(%22Kerze2%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307; BUFLEN:0
2017.10.22 19:36:00 5: Cmd: >{AttrVal("Kerze2","room","")}<
2017.10.22 19:36:00 4: WEB: /fhem?cmd=%7BAttrVal(%22Kerze2%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_448637865731307 / RL:27 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.10.22 19:36:00 4: Connection accepted from WEB_192.168.178.67_56535
2017.10.22 19:36:00 4: WEB_192.168.178.67_56535 GET /fhem?XHR=1&inform=type=status;filter=Kerze2;since=1508693758;fmt=JSON&fw_id=190×tamp=1508693762059; BUFLEN:0
2017.10.22 19:36:01 4: Connection closed for WEB_192.168.178.67_56535: EOF
2017.10.22 19:36:01 4: WEB_192.168.178.67_56521 GET /fhem/FileLog_logWrapper?dev=Logfile&type=text&file=fhem-2017-10.log; BUFLEN:0


Hilft das?

Leider nein
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

jonah

Ausgabe ist Characteristic value/descriptor: 00 00 00 00.
Es sind eher 3-4m als 1-2m, hatte es auch mit weniger Abstand versucht, das schien aber auch keinen Unterschied zu machen.
Danke für deinen super Support!

CoolTux

Ist die Lampe aus?
Wenn ja mach mal an und noch mal mit gatttool
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

jonah

Ich habe sie gerade per Schalter aus- und wieder angemacht und dabei den gatttool-Befehl mehrfach im Terminal ausgeführt. Es gab unterschiedliche Ergebnisse:


pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x16
connect error: Function not implemented (38)
pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x16
Characteristic value/descriptor: 00 00 00 00
pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x16
connect error: Connection timed out (110)
pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x16
Characteristic value/descriptor: 00 00 00 00
pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x16
Characteristic value/descriptor: 00 00 00 00
pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x16
Characteristic value/descriptor: 00 00 00 00
pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x16
Characteristic value/descriptor: 00 00 00 00


Mysteriös.

CoolTux

Bitte an lassen. Dann Mal statt 16 die 19 probieren und dann mal die 29
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

jonah

pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x19
Characteristic value/descriptor: 0a 1a 00 fe ff
pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x29
Characteristic value/descriptor: 41 70 70 6c 69 63 61 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 32 2e 33 2e 30 2e 33 31

CoolTux

Die 16 scheint zu stimmen, aber wieso da alles 0 ist. Du hattest geschrieben dass die Befehle auf der verlinkten Internetseite geklappt haben. Da hast du doch auch mit 16 und 14 gearbeitet.
Mach mal bitte die 14
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

jonah

pi@fhem:~ $ gatttool -b AC:E6:4B:07:A4:BE --char-read -a 0x14
Characteristic value/descriptor: 00 ff 94 00 03 00 0a 00


CoolTux

So und jetzt mach mal in FHEM einfach bei der Arbeit auf das blaue feld
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

jonah

Ich verstehe nicht?
Auf der Device-Seite und DeviceOverview rechts neben dem Namen und dem Bulb-Symbol und dem FFFFFF-Feld sind ein paar bunter Felder, davon das dunkelblaue? Da passiert gar nichts, wenn ich drauf drücke.
Oder meinst du was anderes?

CoolTux

Nee das meinte ich schon.

mAh Mal ein list vom Device. Hat sich irgendwas geändert?
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

jonah


Internals:
   BTMAC      AC:E6:4B:07:A4:BE
   DEF        AC:E6:4B:07:A4:BE
   NAME       Kerze2
   NR         24
   STATE      unreachable
   TYPE       PLAYBULB
   VERSION    1.2.8
   READINGS:
     2017-10-22 20:19:51   state           unreachable
   helper:
     color      on
     effect     RainbowJump
     onoff      0
     rgb        0000FF
     sat        0
     speed      120
     statusRequest
Attributes:
   devStateIcon unreachable:light_question
   model      BTL300_v5
   room       Kerzen
   verbose    5
   webCmd     rgb:rgb FF0000:rgb 00FF00:rgb 0000FF:rgb FFFFFF:rgb F7FF00:rgb 00FFFF:rgb F700FF:effect


Nee, leider nicht. Weiterhin unreachable. Das ist doch seltsam. Wenn ich das richtig verstehe macht doch fhem eigentlich nichts anderes als gatttool? Wie kann es sein, dass man per gatttool eine Verbindung hinbekommt, aber nicht per fhem?

CoolTux


ps ax | grep -v grep | grep "gatttool"


Kommt bei diesem Befehl was bei Dir?
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

jonah


pi@fhem:~ $ ps ax | grep -v grep | grep "gatttool"
3065 ?        S      0:00 gatttool -b 12:5A:4B:10:AC:E6 --char-write -a 0x16 -n 00000000
3089 ?        S      0:00 gatttool -b AC:E6:4B:07:A4:BE --char-write -a 0x16 -n 00000000
7161 ?        S      0:00 gatttool -b AC:E6:4B:07:B5:E8 --char-write -a 0x16 -n 00000000
7270 ?        S      0:00 gatttool -b AC:E6:4B:05:26:CF --char-write -a 0x14 -n 00ffa8c804000100