Je me permet d'écrire après avoir lue la doc du plugin ainsi que les 40 pages ici.
je suis avec un RPI2
Code : Tout sélectionner
uname -a
Linux jeedom 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
Je rencontre le meme probleme que @scadinot
Information de la log :
Code : Tout sélectionner
[2017-01-10 21:30:21][WARNING] : Exception on scanner (trying to resolve by myself 6): Failed to execute mgmt cmd 'le on'
[2017-01-10 21:30:21][WARNING] : Exception on scanner (trying to resolve by myself 7): Failed to execute mgmt cmd 'le on'
[2017-01-10 21:30:21][WARNING] : Exception on scanner (trying to resolve by myself 8): Failed to execute mgmt cmd 'le on'
[2017-01-10 21:30:21][ERROR] : Exception on scanner (didn't resolve there is an issue with bluetooth) : Failed to execute mgmt cmd 'le on'
un de droit
un avec Sap driver (initialization failed) que j'ai résolue masqué avec la solution de Croixamus
Pouvez vous m'aider ? merci d'avance.
Information de la log blea local :
Code : Tout sélectionner
[2017-01-10 23:05:19][INFO] : Start blead
[2017-01-10 23:05:19][INFO] : Log level : debug
[2017-01-10 23:05:19][INFO] : Socket port : 55008
[2017-01-10 23:05:19][INFO] : Socket host : 127.0.0.1
[2017-01-10 23:05:19][INFO] : Device : hci0
[2017-01-10 23:05:19][INFO] : PID file : /tmp/blead.pid
[2017-01-10 23:05:19][INFO] : Apikey : xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[2017-01-10 23:05:19][INFO] : Callback : http://127.0.0.1:80/plugins/blea/core/php/jeeBlea.php
[2017-01-10 23:05:19][INFO] : Cycle : 0.3
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.dotti
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.fitbit
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.gigaset
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.hector
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.itag
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.jinlin
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.logiswitch
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.miband
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.miflora
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.miscale
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.myfox
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.niu
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.nut
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.playbulb
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.smartplug
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.ticatag
[2017-01-10 23:05:19][INFO] : Import de la configuration devices.wistiki
[2017-01-10 23:05:19][DEBUG] : Writing PID 30367 to /tmp/blead.pid
[2017-01-10 23:05:19][DEBUG] : Init request module v2.4.3
[2017-01-10 23:05:19][INFO] : Starting new HTTP connection (1): 127.0.0.1
[2017-01-10 23:05:19][DEBUG] : "GET /plugins/blea/core/php/jeeBlea.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2017-01-10 23:05:19][DEBUG] : Socket interface started
[2017-01-10 23:05:19][DEBUG] : LoopNetServer Thread started
[2017-01-10 23:05:19][DEBUG] : Listening on: [127.0.0.1:55008]
[2017-01-10 23:05:19][INFO] : Start listening...
[2017-01-10 23:05:19][INFO] : Preparing Scanner...
[2017-01-10 23:05:19][DEBUG] : Read Socket Thread Launched
[2017-01-10 23:05:19][DEBUG] : Send to jeedom : {'source': 'local', 'learn_mode': 0}
[2017-01-10 23:05:19][DEBUG] : Heartbeat Thread Launched
[2017-01-10 23:05:19][DEBUG] : Read Device Thread Launched
[2017-01-10 23:05:19][DEBUG] : Send to jeedom : {'started': 1, 'source': 'local'}
[2017-01-10 23:05:19][INFO] : Starting new HTTP connection (1): 127.0.0.1
[2017-01-10 23:05:19][INFO] : Starting new HTTP connection (1): 127.0.0.1
[2017-01-10 23:05:19][DEBUG] : "POST /plugins/blea/core/php/jeeBlea.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HTTP/1.1" 200 0
[2017-01-10 23:05:19][DEBUG] : "POST /plugins/blea/core/php/jeeBlea.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HTTP/1.1" 200 0
[2017-01-10 23:05:19][WARNING] : Exception on scanner (trying to resolve by myself 6): Failed to execute mgmt cmd 'le on'
[2017-01-10 23:05:20][WARNING] : Exception on scanner (trying to resolve by myself 7): Failed to execute mgmt cmd 'le on'
[2017-01-10 23:05:20][WARNING] : Exception on scanner (trying to resolve by myself 8): Failed to execute mgmt cmd 'le on'
[2017-01-10 23:05:20][ERROR] : Exception on scanner (didn't resolve there is an issue with bluetooth) : Failed to execute mgmt cmd 'le on'
[2017-01-10 23:05:20][INFO] : Shutting down due to errors
[2017-01-10 23:05:20][DEBUG] : Send to jeedom : {'source': 'local', 'learn_mode': 0}
[2017-01-10 23:05:20][INFO] : Starting new HTTP connection (1): 127.0.0.1
[2017-01-10 23:05:20][DEBUG] : "POST /plugins/blea/core/php/jeeBlea.php?apikey=xxxxxxxxxxxxxxxxxxxxxxxx
HTTP/1.1" 200 0
[2017-01-10 23:05:22][DEBUG] : Shutdown
[2017-01-10 23:05:22][DEBUG] : Removing PID file /tmp/blead.pid
[2017-01-10 23:05:22][DEBUG] : Closing all potential bluetooth connection
[2017-01-10 23:05:22][DEBUG] : LoopNetServer Thread stopped
[2017-01-10 23:05:22][DEBUG] : Exit 0
Code : Tout sélectionner
Launch install of blea dependancy
Get:1 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
Get:2 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB]
Get:3 http://archive.raspberrypi.org jessie/main armhf Packages [130 kB]
Get:4 http://mirrordirector.raspbian.org jessie/main armhf Packages [8,981 kB]
Get:5 http://archive.raspberrypi.org jessie/ui armhf Packages [53.6 kB]
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Hit https://deb.nodesource.com jessie InRelease
Get:6 http://mirrordirector.raspbian.org jessie/contrib armhf Packages [37.5 kB]
Get:7 http://mirrordirector.raspbian.org jessie/non-free armhf Packages [70.3 kB]
Get:8 http://mirrordirector.raspbian.org jessie/rpi armhf Packages [1,356 B]
Hit https://deb.nodesource.com jessie/main Sources
Hit https://deb.nodesource.com jessie/main armhf Packages
Get:9 https://deb.nodesource.com jessie/main Translation-en_GB [162 B]
Get:10 https://deb.nodesource.com jessie/main Translation-en [162 B]
Get:11 https://deb.nodesource.com jessie/main Translation-en_GB [162 B]
Get:12 https://deb.nodesource.com jessie/main Translation-en [162 B]
Get:13 https://deb.nodesource.com jessie/main Translation-en_GB [162 B]
Get:14 https://deb.nodesource.com jessie/main Translation-en [162 B]
Get:15 https://deb.nodesource.com jessie/main Translation-en_GB [162 B]
Get:16 https://deb.nodesource.com jessie/main Translation-en [162 B]
Get:17 https://deb.nodesource.com jessie/main Translation-en_GB [162 B]
Ign https://deb.nodesource.com jessie/main Translation-en_GB
Get:18 https://deb.nodesource.com jessie/main Translation-en [162 B]
Ign https://deb.nodesource.com jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 9,311 kB in 33s (276 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version.
python-dev is already the newest version.
python-pip is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 50 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version.
The following extra packages will be installed:
libelfg0 libglib2.0-bin
Suggested packages:
libglib2.0-doc
The following NEW packages will be installed:
libelfg0 libglib2.0-bin libglib2.0-dev
0 upgraded, 3 newly installed, 0 to remove and 50 not upgraded.
Need to get 3,861 kB of archives.
After this operation, 9,289 kB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libelfg0 armhf 0.8.13-5 [55.7 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libglib2.0-bin armhf 2.42.1-1 [1,334 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libglib2.0-dev armhf 2.42.1-1 [2,472 kB]
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 3,861 kB in 2s (1,719 kB/s)
Selecting previously unselected package libelfg0:armhf.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 49996 files and directories currently installed.)
Preparing to unpack .../libelfg0_0.8.13-5_armhf.deb ...
Unpacking libelfg0:armhf (0.8.13-5) ...
Selecting previously unselected package libglib2.0-bin.
Preparing to unpack .../libglib2.0-bin_2.42.1-1_armhf.deb ...
Unpacking libglib2.0-bin (2.42.1-1) ...
Selecting previously unselected package libglib2.0-dev.
Preparing to unpack .../libglib2.0-dev_2.42.1-1_armhf.deb ...
Unpacking libglib2.0-dev (2.42.1-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for libglib2.0-0:armhf (2.42.1-1) ...
No schema files found: doing nothing.
Setting up libelfg0:armhf (0.8.13-5) ...
Setting up libglib2.0-bin (2.42.1-1) ...
Setting up libglib2.0-dev (2.42.1-1) ...
Processing triggers for libc-bin (2.19-18+deb8u6) ...
Requirement already satisfied (use --upgrade to upgrade): pyudev in /usr/lib/python2.7/dist-packages
Cleaning up...
Requirement already satisfied (use --upgrade to upgrade): pyserial in /usr/lib/python2.7/dist-packages
Cleaning up...
Cloning into 'bluepy'...
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/bluepy
copying bluepy/sensortag.py -> build/lib.linux-armv7l-2.7/bluepy
copying bluepy/get_services.py -> build/lib.linux-armv7l-2.7/bluepy
copying bluepy/btle.py -> build/lib.linux-armv7l-2.7/bluepy
copying bluepy/blescan.py -> build/lib.linux-armv7l-2.7/bluepy
copying bluepy/__init__.py -> build/lib.linux-armv7l-2.7/bluepy
copying bluepy/uuids.json -> build/lib.linux-armv7l-2.7/bluepy
copying bluepy/bluez-src.tgz -> build/lib.linux-armv7l-2.7/bluepy
copying bluepy/bluepy-helper.c -> build/lib.linux-armv7l-2.7/bluepy
copying bluepy/Makefile -> build/lib.linux-armv7l-2.7/bluepy
running install
Working dir is /tmp/bluepy
execute make -C ./bluepy clean
execute make -C bluepy
running build
running build_py
copying bluepy/bluepy-helper -> build/lib.linux-armv7l-2.7/bluepy
running install_lib
creating /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/bluepy-helper -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/Makefile -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/bluepy-helper.c -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/bluez-src.tgz -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/uuids.json -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/__init__.py -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/blescan.py -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/btle.py -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/get_services.py -> /usr/local/lib/python2.7/dist-packages/bluepy
copying build/lib.linux-armv7l-2.7/bluepy/sensortag.py -> /usr/local/lib/python2.7/dist-packages/bluepy
byte-compiling /usr/local/lib/python2.7/dist-packages/bluepy/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/bluepy/blescan.py to blescan.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/bluepy/btle.py to btle.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/bluepy/get_services.py to get_services.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/bluepy/sensortag.py to sensortag.pyc
running install_egg_info
running egg_info
creating bluepy.egg-info
writing bluepy.egg-info/PKG-INFO
writing top-level names to bluepy.egg-info/top_level.txt
writing dependency_links to bluepy.egg-info/dependency_links.txt
writing entry points to bluepy.egg-info/entry_points.txt
writing manifest file 'bluepy.egg-info/SOURCES.txt'
reading manifest file 'bluepy.egg-info/SOURCES.txt'
writing manifest file 'bluepy.egg-info/SOURCES.txt'
Copying bluepy.egg-info to /usr/local/lib/python2.7/dist-packages/bluepy-1.0.5.egg-info
running install_scripts
Installing blescan script to /usr/local/bin
Installing sensortag script to /usr/local/bin
Everything is successfully installed!
Code : Tout sélectionner
root@jeedom:~# /etc/init.d/bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Tue 2017-01-10 21:29:07 CET; 1h 40min ago
Docs: man:bluetoothd(8)
Main PID: 401 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─401 /usr/lib/bluetooth/bluetoothd
Jan 10 21:29:06 jeedom systemd[1]: Starting Bluetooth service...
Jan 10 21:29:06 jeedom bluetoothd[401]: Bluetooth daemon 5.23
Jan 10 21:29:07 jeedom bluetoothd[401]: Starting SDP server
Jan 10 21:29:07 jeedom systemd[1]: Started Bluetooth service.
Jan 10 21:29:07 jeedom bluetoothd[401]: Bluetooth management interface 1.10 initialized
[b]Jan 10 21:29:07 jeedom bluetoothd[401]: Sap driver initialization failed.
Jan 10 21:29:07 jeedom bluetoothd[401]: sap-server: Operation not permitted (1)[/b]
Code : Tout sélectionner
root@jeedom:~# hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:02:72:00:34:61 ACL MTU: 1017:8 SCO MTU: 64:8
UP RUNNING
RX bytes:38030 acl:0 sco:0 events:1677 errors:0
TX bytes:25909 acl:0 sco:0 commands:1677 errors:0
Code : Tout sélectionner
visudo
GNU nano 2.2.6 File: /etc/sudoers.tmp
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
www-data ALL=(ALL) NOPASSWD: ALL
Code : Tout sélectionner
root@jeedom:~# hcitool lescan
Set scan parameters failed: Input/output error
voici le résultat de /etc/init.d/bluetooth status je n'ai plus l'erreur sur sap mais j'ai toujours des erreur avec hcitool lescanCroixamus a écrit :Bonjour @sarakha63, heureux de te revoir sur le forum et merci pour ce plugin...
Comme j'ai un peu galéré pour mettre tout ca en route, je mets ici je que j'ai fait si ca peut servir...merci Google !
J'avais ces erreurs avec "service bluetooth status"
Sap driver initialization failed.
sap-server: Operation not permitted (1)
hci0 Load Connection Parameters failed: Unknown Command
J'ai du modifier le fichier /etc/systemd/system/bluetooth.target.wants/bluetooth.service comme ca :
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
Puis démarrer le périphérique :
sudo bluetoothctl
[NEW] Controller 5C:F3:70:67:B1:9D Jeedom [default]
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 5C:F3:70:67:B1:9D Powered: yes
,
Set scan parameters failed: Input/output error
Code : Tout sélectionner
root@jeedom:~# /etc/init.d/bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Tue 2017-01-10 23:35:10 CET; 2min 53s ago
Docs: man:bluetoothd(8)
Main PID: 394 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─394 /usr/lib/bluetooth/bluetoothd --noplugin=sap
Jan 10 23:35:09 jeedom systemd[1]: Starting Bluetooth service...
Jan 10 23:35:10 jeedom bluetoothd[394]: Bluetooth daemon 5.23
Jan 10 23:35:10 jeedom bluetoothd[394]: Starting SDP server
Jan 10 23:35:10 jeedom bluetoothd[394]: Excluding (cli) sap
Jan 10 23:35:10 jeedom systemd[1]: Started Bluetooth service.
Jan 10 23:35:10 jeedom bluetoothd[394]: Bluetooth management interface 1.10 initialized