I am trying to install the bluetooth binding on my Raspberry Pi 3. The instructions seem quite complicated. I have succeeded in compiling bluecove-gpl-2.1.1-SNAPSHOT.jar and bluecove-2.1.1-SNAPSHOT.jar, but I do not know how to open META-INF/MANIFEST.MF nor can I identify any lib subdirectory of the binding. Could someone please help me with instructions on how to proceed?
I know what I’m doing and I never got it to work. I wrote this script instead which actually gives you more options to fine tuning the sensitivity of the BT presence detection anyway. The new BT binding for OH 2 is supposed to do more and not require rebuilding the jar files.
But to answer your main question, the META-INF/MANIFEST.MF file is located inside the .jar file. You need to extract the jar file using a zip program (e.g. gnuzip), edit it, then recreate the jar file using the jar command from the JDK.
Thank you for your note. I tried installing your script and get the following error when I try to run it manually:
pi@MCNraspberrypi3:/opt/sensorReporter $ sudo python sensorReporter.py sensorReporter.ini
GPIO is not supported on this machine
WARNING: No route found for IPv6 destination :: (no default route?)
Traceback (most recent call last):
File “sensorReporter.py”, line 261, in
File “sensorReporter.py”, line 127, in main
File “sensorReporter.py”, line 175, in loadConfig
File “/usr/lib/python2.7/ConfigParser.py”, line 607, in get
ConfigParser.NoSectionError: No section: ‘Logging’
Do you know what I might be doing wrong? I believe I have configured the HOSTNAME.ini file correctly.
Your ini file must have a [Logging] section where you configure logging parameters. Look at default.ini for examples for all of the configuration parameters. Also, make sure sensorReporter.ini exists, is a link to your “real” .ini file or is your “real” .ini file.
Rich, I’m having a similar issue but I for the life of me cannot figure out how to make this work!
Here is the error I’m seeing:
steve@RPi3:/opt/sensorReporter $ sudo python sensorReporter.py sensorReporter.ini
Traceback (most recent call last):
File "sensorReporter.py", line 196, in <module>
File "sensorReporter.py", line 69, in main
File "sensorReporter.py", line 175, in loadConfig
File "/usr/lib/python2.7/ConfigParser.py", line 607, in get
ConfigParser.NoSectionError: No section: 'Logging'
Here is my sensorReporter.ini:
; Needs to be greater than 1 if using the RSSI mode, 25 if using the LOOKUP mode.
; Uses signal strength to detect presence of devices
; RSSI - Maximum count for near/far readings
; RSSI - How many near counts before declaring device present
; RSSI - How many far counts before declaring device absent
URL = http://localhost:8080/rest/items/
I made the sensorReporter.py file executable and created a var/log/sensorReporter.log file.
One thing that comes to mind is I’m not sure you can start with Sensor3. I think you have to start with Sensor1. The code assumes there will be a Sensor1 (or Actuator1) and counts up from there. If you start at 3 I don’t think it will see any Sensor sections at all.
Of course, this is immaterial for the specific error you are seeing.
I added a a Syslog parameter to the Logging section awhile ago. It might be having a problem because you don’t have it defined. But I think that error is different. Try adding a Syslog=NO (or YES if you want it to log to syslog instead of its own log file) and see if that makes a different.