Anwesenheitserkennung Bluetooth PebbleBee

Begonnen von tomster, 06 November 2014, 10:01:16

Vorheriges Thema - Nächstes Thema

v.i.p.e.r

Hi,

hab die Werte mal gesetzt und neugestartet. Hat nix gebracht. Der regelmäßige reset bleibt.
Was mir noch einfällt ist, dass ich erst die Version 4.XX aus dem APT repository installiert hatte und danach hab ich erst auf 5.30 "geupdated" - Eventuell ist da etwas nicht ganz sauber verlaufen. Aber hier hat ja noch jemand das Problem gehabt bei gleicher Konstellation.


VG
Tim

gero

Zitat von: v.i.p.e.r am 05 Mai 2015, 13:52:08
hab die Werte mal gesetzt und neugestartet. Hat nix gebracht. Der regelmäßige reset bleibt.

Schade.
Da bleibt wohl nur dein zweites System auch auf Jessie hochzuziehen.
Vielleicht habe ich die nächsten Tage mal Zeit auf einem meiner Raspis das Problem nachzustellen.

Gruß,
Gero
Odroid C1 - CULV3-868, JeeLink
16 x TX 29 DTH
MAX!: 15x Heizkörperthermostat+, 2x Wandthermostat, 14x Fenserkontakt, 1x Ecotaster
FS20 S4A, FS20IRF, BSB-Heizungssteuerung über Atmega2560
Z-Wave: ZME_UZB1, Fibaro Wall Plug + Motion Sensor

PatrickR

Guten Abend!

Version 0.5 von blescan.pl:
-Die Einstellung des BLUETOOTH_DEVICE im Skript wird nun auch zum Scannen benutzt.
-Findet ein Reset des Bluetooth-Device statt wird der Scan-Timer zurück gesetzt.

Zwei Worte der Warnung:
-Wenn Euer Bluetooth-Gerät nicht hci0 ist müsst Ihr die Einstellung im Skript anpassen.
-Wenn alles soweit funktioniert solltet Ihr unbeding den Log-Level im Skript auf LOG_INFO setzen, insbesondere wenn Ihr einen Raspberry Pi nutzt.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

v.i.p.e.r

Mir scheint es, als ob das Script trotz das es was gefunden hat manchmal Did NOT receive ausgibt - kann das jemand bestätigen?

7 20:06:42 raspberrypi blescan.pl[30894]: Version 0.5 started (device: hci0, mac address: 7C:2F:80:90:88:FE, duration: 5).
May  7 20:06:48 raspberrypi blescan.pl[30894]: Received advertisement from desired bluetooth mac address '7C:2F:80:90:88:FE' with name '(unknown)' after 1 seconds.
May  7 20:06:52 raspberrypi blescan.pl[30894]: Did NOT receive an advertisement from bluetooth mac address '7C:2F:80:90:88:FE'.
May  7 20:07:53 raspberrypi blescan.pl[30918]: Version 0.5 started (device: hci0, mac address: 7C:2F:80:90:88:FE, duration: 5).
May  7 20:07:54 raspberrypi blescan.pl[30918]: Received advertisement from desired bluetooth mac address '7C:2F:80:90:88:FE' with name '(unknown)' after 1 seconds.
May  7 20:07:58 raspberrypi blescan.pl[30918]: Did NOT receive an advertisement from bluetooth mac address '7C:2F:80:90:88:FE'.

PatrickR

@viper:
Ok, da ist definitiv was im Eimer. Sehe gerade, dass ich an einer Stelle kein 100%iges Error-Handling habe. Das rüste ich mal nach.
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

PatrickR

@v.i.p.e.r:
Probier mal bitte die Version 0.6. Das Problem ist zwar nicht behoben aber beim nächsten Mal sollten wir eine vernünftige Fehlermeldung bekommen.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

v.i.p.e.r

im FHEM log findet sich nun folgendes:

May  8 20:19:48 PRESENCE (WO_Tim) - error while processing check: unexpected script output (expected 0 or 1): ERROR: refcnt: fd -1 < 0!

im syslog:

May  8 20:19:48 raspberrypi blescan.pl[24329]: ERROR: refcnt: fd -1 < 0!

PatrickR

#307
@v.i.p.e.r:
//Edit: Kommando zurück. Ich schaue es mir erstmal in Ruhe an.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

Flexstarr

Gibt's bereits neue Erkenntnisse?
Gleiches Setup auch bei mir.
FHEM 5.8 @RPi2
CUL433, CUL868, JeeLink, Hamony Hub, Hue Bridge, ELV EnergieAmpel, IT Steckdosen, mehrere Homematic Teile..

PatrickR

@Flexstarr:
Ja, bei v.i.p.e.r läuft es nun rund. Muss das Skript noch etwas aufräumen dann lade ich eine neue Version hoch.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

StefanW

Hallo PatrickR,

ich habe am WE auch mal dein Script in Version 0.5 getestet.
Beim ersten Versuch klappte alles auch etwa für 12h, dann ist anscheinend der BT-Stick am Cubie ausgestiegen.
Beim 2ten Versuch war nach etwa 2h Schluss.

Hier mal die Einträge aus FHEM & Syslog:

FHEM:
2015.05.17 11:29:18 2: PRESENCE (GTag_Auto) - error while processing check: unexpected script output (expected 0 or 1): ERROR: hcitool exited before scanning. Please check syslog!
2015.05.17 11:29:23 2: PRESENCE (GTag_Fahrrad) - error while processing check: unexpected script output (expected 0 or 1): ERROR: hcitool exited before scanning. Please check syslog!


Syslog:
May 17 11:34:24 localhost blescan.pl[5002]: Version 0.5 started (device: hci0, mac address: 7C:2F:80:8E:FA:51, duration: 15).
May 17 11:34:24 localhost blescan.pl[5002]: Acquired lock, Scanning...
May 17 11:34:24 localhost blescan.pl[5002]: Received unknown output: 'Invalid device: Network is down'!
May 17 11:34:24 localhost blescan.pl[5002]: hcitool exited before scanning for bluetooth mac address '7C:2F:80:8E:FA:51'.


Wäre der Fehler in der kommenden Version auch behoben?

Gruß
Stefan

PatrickR

Hi!

Version 0.8:
-Diverse Änderungen, die verhindern, dass das Skript sich nicht sauber beendet.
-Bei 'Invalid device: Network is down' wird nun auch ein reset durchgeführt.
v.i.p.e.r hat freundlicherweise für die Fehlersuche ein Gerät zur Verfügung gestellt, das so ziemlich alle bluez-Fehler gezielt erzeugt :)

@StefanW: Die zweite Änderung sollte Dir helfen.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

StefanW

Danke!
Ich werde es testen & berichten. :-)

Atze

Hallo,
ich hab dann auch mal mein Systen neu gemacht, (Debian 8, RPI 2) und die neue 0.8 eingespielt.

Nach ca. 12 Stunden Laufzeit bekomme ich mehrfach im Sekundentakt im syslog folgende Meldung:
May 20 12:48:39 aliendeb blescan.pl[16865]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[15915]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16290]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16450]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16208]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16378]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16515]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:41 aliendeb blescan.pl[16062]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:41 aliendeb blescan.pl[16075]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:41 aliendeb blescan.pl[16132]: blescan.pl is already running. Sleeping 5 seconds.


Im Fhemlog erscheint:
2015.05.20 20:00:55 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5175
2015.05.20 20:02:09 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5220
2015.05.20 20:03:21 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5279
2015.05.20 20:04:34 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5319
2015.05.20 20:05:47 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5357
2015.05.20 20:06:59 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5395
2015.05.20 20:08:11 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5434
2015.05.20 20:09:24 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5493
2015.05.20 20:10:36 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5555
2015.05.20 20:11:49 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 5600


Läuft noch nicht wirklich rund  :'(
FHEM 5.8 , RPi 2 / CUL 3.2 / JEELINKnano - PCA301 / nanoCUL a-culfw 1.05.03
HMS: rm1002, s300th / FHT: fht8v-3, fht80tf
FS20: fs20st, fs20sm8, fs20s8m, fs20rsu, fs20rbm, fs20pce, fs20pcs, fs20ue1, fs20irp2, fs20dwt, fs20rpt-3, fs20str-2, fs20kse
IT: ITDM-250, ITLS-16, ITW-852, IT-1500
G-Data Milight

PatrickR

Zitat von: Atze am 20 Mai 2015, 20:25:05
Hallo,
ich hab dann auch mal mein Systen neu gemacht, (Debian 8, RPI 2) und die neue 0.8 eingespielt.

Nach ca. 12 Stunden Laufzeit bekomme ich mehrfach im Sekundentakt im syslog folgende Meldung:
May 20 12:48:39 aliendeb blescan.pl[16865]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[15915]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16290]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16450]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16208]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16378]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:40 aliendeb blescan.pl[16515]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:41 aliendeb blescan.pl[16062]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:41 aliendeb blescan.pl[16075]: blescan.pl is already running. Sleeping 5 seconds.
May 20 12:48:41 aliendeb blescan.pl[16132]: blescan.pl is already running. Sleeping 5 seconds.


Oh, das ist aber unschön. Interessant wären mal die letzten sagen wir mal 25 Logausgaben vor der "already running"-Kaskade.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook