Comments (20)
The Plugin has a daemon which ist delivered together with the plugin.
The daemon should be started when the LoxBerry is started.
The deamon itself starts the daemon.php with root rights.
/usr/bin/php -f /opt/loxberry/webfrontend/cgi/plugins/ble_scanner/bin/daemon.php
(This is still a workaround / todo - but I have not yet found a way to get it work w/o root privileges)
What happens of you start this command line by hand?
(Usually you should have no prompt and the Port 12345 should be LISTEN.)
See
root@loxberry:~# netstat -ntpaul|grep 12345
tcp 0 0 127.0.0.1:12345 0.0.0.0:* LISTEN
from loxberry-plugin-ble-scanner.
Ab Version 0.7 ist es möglich, den Dämon mit der folgenden Kommandozeile zu testen.
From version 0.7 is it possible to test the daemon using the following commandline.
(echo "KEEPALIVE";sleep 1)|telnet localhost 12345
from loxberry-plugin-ble-scanner.
Please send me the output of hciconfig
if it is still not working after a reboot.
root@loxberry:~# hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:xx:xx:xx:xx:xx ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:624 acl:0 sco:0 events:39 errors:0
TX bytes:1466 acl:0 sco:0 commands:39 errors:0
from loxberry-plugin-ble-scanner.
Thanks for the fast response.
I entered the command, but got no response on the command line. Bothe the
Plug-in and the webservice show the error: {"error":"Bluetooth Device
'hci0' seems not 'UP and RUNNING'","result":"State: DOWN"}
I guess the device is not supported. Here is what I tried on the command
line:
loxberry@loxberry:~ $ lsusb Bus 001 Device 004: ID 0400:080a National
Semiconductor Corp. Bluetooth Device Bus 001 Device 003: ID 0424:ec00
Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001
Device 002: ID 0424:9512 Standard Microsystems Corp. LAN9500 Ethernet 10
/100 Adapter / SMSC9512/9514 Hub Bus 001 Device 001: ID 1d6b:0002 Linux
Foundation 2.0 root hub
loxberry@loxberry:~ $ hciconfig hci0 up Can't init device hci0: Operation
not permitted (1)
loxberry@loxberry:~ $ hciconfig -a hci0: Type: BR/EDR Bus: USB BD Address:
00:0C:78:31:E4:E4 ACL MTU: 339:4 SCO MTU: 60:9 DOWN RX bytes:908 acl:0
sco:0 events:33 errors:0 TX bytes:112 acl:0 sco:0 commands:30 errors:0
Features: 0xff 0xff 0x81 0x00 0x18 0x18 0x00 0x00 Packet type: DM1 DM3 DM5
DH1 DH3 DH5 HV1 HV2 HV3 Link policy: Link mode: SLAVE ACCEPT
loxberry@loxberry:~ $ hciconfig dev hci0: Type: BR/EDR Bus: USB BD Address:
00:0C:78:31:E4:E4 ACL MTU: 339:4 SCO MTU: 60:9 DOWN RX bytes:908 acl:0
sco:0 events:33 errors:0 TX bytes:112 acl:0 sco:0 commands:30 errors:0
loxberry@loxberry:~ $ hcitool scan Device is not available: No such device
loxberry@loxberry:~ $ hciconfig hci0 piscan Can't set scan mode on hci0:
Operation not permitted (1)
loxberry@loxberry:~ $ hciconfig hci0 reset Can't down device hci0:
Operation not permitted (1)
Do you have any Idea? May an old libary?
Br
Marcus
2016-09-18 20:59 GMT+02:00 Wörsty [email protected]:
The Plugin has a daemon which ist delivered together with the plugin.
The daemon should be started when the LoxBerry is started.
The deamon itself starts the daemon.php with root rights.
/usr/bin/php -f /opt/loxberry/webfrontend/cgi/plugins/ble_scanner/bin/
daemon.php
(This is still a workaround / todo - but I have not yet found a way to get
it work w/o root privileges)What happens of you start this command line by hand?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVPxAlWhrKCoZuf_LZYw2jZdUkNmX39Qks5qrYoagaJpZM4J_8lR
.
from loxberry-plugin-ble-scanner.
loxberry@loxberry:~ $ (echo "KEEPALIVE";sleep 1)|telnet localhost 12345
-bash: telnet: command not found
2016-09-18 21:19 GMT+02:00 Wörsty [email protected]:
Ab Version 0.7 ist es möglich, den Dämon mit der folgenden Kommandozeile
zu testen.
From version 0.7 is it possible to test the daemon using the following
commandline.
(echo "KEEPALIVE";sleep 1)|telnet localhost 12345—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVPxApNIjgxFYv-DbiI91sJR5n2sMwKaks5qrY61gaJpZM4J_8lR
.
from loxberry-plugin-ble-scanner.
What version of the LoxBerry is used? (because telnet is not installed)
You can add it using apt-get install telnet
but it is not mandatory.
Just for troubleshooting...
By the way you must be root to use hciconfig
.
Furthermore it's shown that your device is currently DOWN .
Try hciconfig hci0 up
- but as root.
I'm tired 😴 - cu tomorrow...
from loxberry-plugin-ble-scanner.
I´m using the newest Version, downloaded today.
hciconfig as root:
root@loxberry:~# hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:0C:78:31:E4:E4 ACL MTU: 339:4 SCO MTU: 60:9
DOWN
RX bytes:908 acl:0 sco:0 events:33 errors:0
TX bytes:112 acl:0 sco:0 commands:30 errors:0
root@loxberry:~# hciconfig hci0 up
Can't init device hci0: Invalid argument (22)
2016-09-18 21:32 GMT+02:00 Wörsty [email protected]:
What version of the LoxBerry is used?
By the way you must be root to use hciconfig.
Furthermore it's shown that your device is currently DOWN .
Try hciconfig hci0 up - but as root.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVPxAoc0rswpe2Dcg3ZoYp-4DYBCNd2mks5qrZHVgaJpZM4J_8lR
.
from loxberry-plugin-ble-scanner.
Mmmh. Seems incompatible. Can not yet tell you how to fix this.
What does lsusb -vvv
shows?
from loxberry-plugin-ble-scanner.
With the LogiLink BT0015 adapter it worked, but the service needs to be started manually after each boot. Nevertheless great job!
from loxberry-plugin-ble-scanner.
nohup /usr/bin/php -f /opt/loxberry/webfrontend/cgi/plugins/ble_scanner/bin/daemon.php &
Starts the script in background so it isn´t killed when the ssh session is closed!
from loxberry-plugin-ble-scanner.
Usually the script is automatically started by the loxberry initscript.
Had you pluged the dongle before rebooting the LoxBerry?
from loxberry-plugin-ble-scanner.
Yes, it was plugged in. Should I try to reinstall the plug-in?
Can you please give me a hint how to setup the tags and the trigger in
Loxone?
This is how I setup the Tag as virtual input
[image: Inline-Bild 1]
The scan is a virtual output triggered by a switch
[image: Inline-Bild 2]
[image: Inline-Bild 3]
2016-09-23 18:37 GMT+02:00 Wörsty [email protected]:
Usually the script is automatically started by the loxberry initscript.
Had you pluged the dongle before rebooting the LoxBerry?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVPxAtExeW_gKyumNdhIVOOX6pDyg-YDks5qtABZgaJpZM4J_8lR
.
from loxberry-plugin-ble-scanner.
You are right, I had not yet time to describe the settings in the Loxone Config.
I try to complete the Wiki asap.
You have to create a Virtual Input with BLE and the MAC.
Select digital input.
It has value 1 or 2 depending on the Tag signal.
To trigger the sending, create an Virtual Output
Address http://your-loxberry
Check "Disconnect after close"
Create Virtual Output Command
Command for "on" = /plugins/cam-connect/
I trigger this Virtual Output using my motion detectors and the door contact.
from loxberry-plugin-ble-scanner.
Yes, it was plugged in. Should I try to reinstall the plug-in?
Not sure. Give it a try.
from loxberry-plugin-ble-scanner.
Ok. The reinstallation fixed the issue with the automatic start. I´m on
version 0.7 now.
But my TAGs are still not updated in Loxone. I guess the command should
be /plugins/ble_scanner/?mode=scan
and not /plugins/cam-connect/
In the logfile I can see that the Virtual Output call is received by
Loxberry:
2016-09-24 00:36:28 [OK] Scan: 2 Tag(s) found [direct]
Most likely the problem is caused by the two if-statements that are both
triggered by mode==scan (see line 107 and 238)
if ($_REQUEST["mode"] == "scan")
Somehow only the last if-statement is executed, which just writes to the
logfile and doesn´t trigger the update of the Loxone variables.
Where do I find the index.php in the filesystem?
2016-09-23 23:54 GMT+02:00 Wörsty [email protected]:
Yes, it was plugged in. Should I try to reinstall the plug-in?
Not sure. You could give it a try.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVPxAjQH0417E7oVYEDqYRJ5TSMiLuMBks5qtEqTgaJpZM4J_8lR
.
from loxberry-plugin-ble-scanner.
LoL sure ble_scanner of course.
The command is without a Mode.
Just the path.
You can try it using a web browser.
I will Check later and keep you posted.
I have changed many things in the code.
Maybe I have caused a regression.
from loxberry-plugin-ble-scanner.
Ok, for debug reasons I added an output of the $LoxURL string (line 218) to
the logging.
Even when the webpage shows that a tag is present the string is NULL for
the TAG:
192.168.XXX.XXX:80/dev/sps/io/BLE_01_AC_78_E6_XX_XX/0
Probably the error is in line 166
if (isset($tag_data_array[0])) { $tags_known["TAG$current_tag"]['found'] =
intval(in_array($tag_data_array[0],$tags_found)); } else { $tags_known["TAG
$current_tag"]['found'] = 0; }
2016-09-24 9:41 GMT+02:00 Wörsty [email protected]:
LoL sure ble_scanner of course.
The command is without a Mode.
Just the path.
You can try it using a web browser.
I will Check later and keep you posted.
I have changed many things in the code.
Maybe I have caused a regression.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVPxAsfr7Ul_aTty1xfgzYKV5f-6xRghks5qtNQ8gaJpZM4J_8lR
.
from loxberry-plugin-ble-scanner.
Have found the problem. Will release v0.8 with a fix soon.
from loxberry-plugin-ble-scanner.
Solved with v0.8 6347e69
Recursive search needed since use of RSSI level...
from loxberry-plugin-ble-scanner.
Thanks a lot, now it works! Great job.
from loxberry-plugin-ble-scanner.
Related Issues (20)
- Error reading tags! Reason:UnboundLocalError: local variable 'pkt' referenced before assignment HOT 4
- Error reading tags! Reason:struct.error: unpack requires a string argument of length 3 HOT 3
- PHP Notice: Array to string conversion in /opt/loxberry/webfrontend/html/plugins/ble_scanner/index.php on line 214
- Python: Module mysql not installed HOT 1
- Datenbankfehler? HOT 25
- Tags werden nicht korrekt an MS gesendet
- Log Statusbuttontexte fehlen
- First call after reboot doesn't return tags
- Raise error if no MS configured
- Check if Miniserver has been deleted but is still in BLE config
- Multilanguage for error messages
- Abbruch bei Installation HOT 1
- Can not sent Data to Miniserver! HOT 2
- "Fehler0003: Daemon Prozess läuft (noch) nicht" HOT 13
- RPi 2: Fehler0003: Daemon Prozess läuft (noch) nicht HOT 16
- Scanning Bluetooth-Tags HOT 3
- Error Sending TAG-Data to Loxone HOT 3
- RPi4: Fehler0003: Daemon Prozess läuft (noch) nicht HOT 12
- Spamming of Logfiles HOT 3
- Error0003: Daemon process is not (yet) running HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loxberry-plugin-ble-scanner.