So I am trying to set it up and have the watch connected to Edison successfully...but issuing a notify command gets me a timeout ala:
root@obi:~/explorer-aps# openaps use pebble notify "hello" "testing"
Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/root/src/openaps/bin/openaps-use", line 63, in <module>
app( )
File "/root/src/openaps/openaps/cli/__init__.py", line 51, in __call__
self.run(self.args)
File "/root/src/openaps/bin/openaps-use", line 57, in run
output = app(args, self)
File "/root/src/openaps/openaps/uses/__init__.py", line 92, in __call__
return self.method.selected(args)(args, app)
File "/root/src/openaps/openaps/uses/__init__.py", line 31, in __call__
return self.method(args, app)
File "/root/src/openaps/openaps/uses/use.py", line 45, in __call__
output = self.main(args, app)
File "/root/.local/lib/python2.7/site-packages/pancreabble/pebble.py", line 28, in main
pebble.run_async()
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 103, in run_async
self.fetch_watch_info()
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 324, in fetch_watch_info
self._watch_info = self.send_and_read(WatchVersion(data=WatchVersionRequest()), WatchVersion).data
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 286, in send_and_read
return queue.get(timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/libpebble2/events/threaded.py", line 81, in get
raise TimeoutError()
libpebble2.exceptions.TimeoutError
I'm going to reboot the edison and repair and see if that helps
@joannestevens,@PieterGit,@betluis,@scottleibrand
I'm at the same spot where you folks were with Pancreabble. I have a Pebble connected to an Edison and when I run:
root@obi:~/explorer-aps# openaps use pebble notify "please" "work"
usage: openaps-use pebble [-h] USAGE ...
openaps-use pebble: error: argument USAGE: invalid choice: 'notify' (choose from 'shell')
root@obi:~/explorer-aps# openaps use pebble -h
usage: openaps-use pebble [-h] USAGE ...
optional arguments:
-h, --help show this help message and exit
## Device pebble:
vendor openaps.vendors.process
process - a fake vendor to run arbitrary commands
USAGE Usage Details
shell run a process in a subshell
So I try docs of (note the pebble2 to avoid name collisions):
# in your openaps directory:
openaps vendor add pancreabble
openaps device add pebble2 pancreabble /dev/rfcomm0
root@obi:~/explorer-aps# openaps use pebble2 notify "hello" "testing"
Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/root/src/openaps/bin/openaps-use", line 63, in <module>
app( )
File "/root/src/openaps/openaps/cli/__init__.py", line 51, in __call__
self.run(self.args)
File "/root/src/openaps/bin/openaps-use", line 57, in run
output = app(args, self)
File "/root/src/openaps/openaps/uses/__init__.py", line 92, in __call__
return self.method.selected(args)(args, app)
File "/root/src/openaps/openaps/uses/__init__.py", line 31, in __call__
return self.method(args, app)
File "/root/src/openaps/openaps/uses/use.py", line 45, in __call__
output = self.main(args, app)
File "/root/.local/lib/python2.7/site-packages/pancreabble/pebble.py", line 28, in main
pebble.run_async()
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 103, in run_async
self.fetch_watch_info()
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 324, in fetch_watch_info
self._watch_info = self.send_and_read(WatchVersion(data=WatchVersionRequest()), WatchVersion).data
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 286, in send_and_read
return queue.get(timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/libpebble2/events/threaded.py", line 81, in get
raise TimeoutError()
libpebble2.exceptions.TimeoutError
I also took a look at: ~src/oref0/bin/peb-urchin-status.sh
It references everything as pbbl
but I'm guessing that is just the name being old.
All I'm really looking for is to see if there is an easy way to confirm that the Urchin watchface would work...The notify command seems like it would be a good indicator but if there is something else, I'd definitely try it.
Also, documentation for this is in the process of being updated here:
https://github.com/Aaybob/docs/blob/a6b5303faf284399fabd19ef696e283f10d083c4/docs/docs/walkthrough/phase-1/offline-looping-and-monitoring.md
If this doesn't work, I'm thinking of setting up a simple webserver on the edison with a static IP and output all the OpenAPS stuff that way...Would rather have the lovely Urchin Pebble config, though.
Thanks in advance!
root@obi:~/explorer-aps# bluetoothd --version
5.23
root@obi:~/explorer-aps# ps -aux | grep bluetoothd
root 14248 0.0 0.1 5948 1796 ? S 18:44 0:00 sudo /usr/local/bin/bluetoothd --experimental
root 14256 0.0 0.2 5084 2056 ? S 18:44 0:00 /usr/local/bin/bluetoothd --experimental
root 26898 0.0 0.0 4320 892 pts/0 S+ 19:16 0:00 grep bluetoothd
# Install Bluez for BT Tethering
echo Checking bluez installation
if ! bluetoothd --version | grep -q 5.37 2>/dev/null; then
cd $HOME/src/ && wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.37.tar.gz && tar xvfz bluez-5.37.tar.gz || die "Couldn't download bluez"
cd $HOME/src/bluez-5.37 && ./configure --enable-experimental --disable-systemd && \
make && sudo make install && sudo cp ./src/bluetoothd /usr/local/bin/ || die "Couldn't make bluez"
oref0-bluetoothup
else
echo bluez v 5.37 already installed
fi
--enable-experimental
stuff that goes in there too.
--btmac=AA:BB:CC:DD:EE:FF
# Install Bluez for BT Tethering
echo Checking bluez installation
bluetoothdversion=$(bluetoothd --version || 0)
bluetoothdminversion=5.37
bluetoothdversioncompare=$(awk 'BEGIN{ print "'$bluetoothdversion'"<"'$bluetoothdminversion'" }')
if [ "$bluetoothdversioncompare" -eq 1 ]; then
killall bluetoothd &>/dev/null #Kill current running version if its out of date and we are updating it
cd $HOME/src/ && wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.44.tar.gz && tar xvfz bluez-5.44.tar.gz || die "Couldn't download bluez"
cd $HOME/src/bluez-5.44 && ./configure --enable-experimental --disable-systemd && \
make && sudo make install && sudo cp ./src/bluetoothd /usr/local/bin/ || die "Couldn't make bluez"
oref0-bluetoothup
else
echo bluez v ${bluetoothdversion} already installed
fi
sudo systemctl restart bluetooth.service
[bluetooth]# trust B0:B4:48:F5:0A:4A
[CHG] Device B0:B4:48:F5:0A:4A Trusted: yes
Changing B0:B4:48:F5:0A:4A trust succeeded
[bluetooth]# pair B0:B4:48:F5:0A:4A
Attempting to pair with B0:B4:48:F5:0A:4A
[CHG] Device B0:B4:48:F5:0A:4A Connected: yes
[CHG] Device B0:B4:48:F5:0A:4A Modalias: bluetooth:v005Ep0001d0112
[CHG] Device B0:B4:48:F5:0A:4A UUIDs: 00000000-deca-fade-deca-deafdecacaff
[CHG] Device B0:B4:48:F5:0A:4A UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device B0:B4:48:F5:0A:4A ServicesResolved: yes
[CHG] Device B0:B4:48:F5:0A:4A Paired: yes
Pairing successful
[CHG] Device B0:B4:48:F5:0A:4A ServicesResolved: no
[CHG] Device B0:B4:48:F5:0A:4A Connected: no
openaps use pebble notify "test" "test"
openaps remove _____
oref0-setup --dir=/root/explorer-aps --serial=xxx --cgm=G4-upload --ns-host=https://xxx.azurewebsites.net --api-secret=xxx --tty=/dev/spidev5.1 --enable=' autosens autotune meal ' --radio_locale='US' --btmac=6E:92:1F:5F:86:F1
root@obi:~/explorer-aps# openaps use pebble2 notify "hello" "testing"
Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/root/src/openaps/bin/openaps-use", line 63, in <module>
app( )
File "/root/src/openaps/openaps/cli/__init__.py", line 51, in __call__
self.run(self.args)
File "/root/src/openaps/bin/openaps-use", line 57, in run
output = app(args, self)
File "/root/src/openaps/openaps/uses/__init__.py", line 92, in __call__
return self.method.selected(args)(args, app)
File "/root/src/openaps/openaps/uses/__init__.py", line 31, in __call__
return self.method(args, app)
File "/root/src/openaps/openaps/uses/use.py", line 45, in __call__
output = self.main(args, app)
File "/root/.local/lib/python2.7/site-packages/pancreabble/pebble.py", line 28, in main
pebble.run_async()
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 103, in run_async
self.fetch_watch_info()
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 324, in fetch_watch_info
self._watch_info = self.send_and_read(WatchVersion(data=WatchVersionRequest()), WatchVersion).data
File "/usr/local/lib/python2.7/dist-packages/libpebble2/communication/__init__.py", line 286, in send_and_read
return queue.get(timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/libpebble2/events/threaded.py", line 81, in get
raise TimeoutError()
libpebble2.exceptions.TimeoutError
rfcomm bind hci0 MACHEER
?
root@obi:~/explorer-aps# openaps use pebble notify "hello" "testing"
usage: openaps-use pebble [-h] USAGE ...
openaps-use pebble: error: argument USAGE: invalid choice: 'notify' (choose from 'shell')
default-agent
again
command to disconnect ?
Failed to pair: org.bluez.Error.AlreadyExists
[CHG] Device 6E:29:4C:5A:D8:F8 RSSI: -38
[CHG] Device 6E:29:4C:5A:D8:F8 AdvertisingFlags: 0x02
[CHG] Device 6E:29:4C:5A:D8:F8 AdvertisingFlags: 0x00
[bluetooth]#
Already forgot on pebble but edison says we're paired, dude!
Paired and then:
root@obi:~/explorer-aps# sudo rfcomm bind hci0 B0:B4:48:F5:0A:4A
Can't create device: Address already in use
trying notify
openaps (report|alias) add
commands to do that too
openaps alias show
or openaps report show foobar.json --cli
cake
with a determination if I'm allowed to have any based off my latest NS reading.
openaps ns-loop
seems to be failing around "refresh temp targets"
monitor/iob.json
throws a "can't set property "lastBolusTime" of undefined"
Jun 08 08:26:14 openaps autosens-loop.log: reporting settings/autosens.json
Jun 08 08:27:16 openaps autosens-loop.log: Thu Jun 8 10:27:04 CDT 2017
Jun 08 08:27:16 openaps autosens-loop.log: /root/src/oref0/lib/profile/isf.js:20
Jun 08 08:27:16 openaps autosens-loop.log: isf_data = _.sortBy(isf_data.sensitivities, function(o) { return o.offset; });
Jun 08 08:27:16 openaps autosens-loop.log: ^
Jun 08 08:27:16 openaps autosens-loop.log: TypeError: Cannot read property 'sensitivities' of undefined
Jun 08 08:27:16 openaps autosens-loop.log: at Function.isfLookup (/root/src/oref0/lib/profile/isf.js:20:33)
Jun 08 08:27:16 openaps autosens-loop.log: at detectSensitivityandCarbAbsorption (/root/src/oref0/lib/determine-basal/cob-autosens.js:122:24)
Jun 08 08:27:16 openaps autosens-loop.log: at Object.<anonymous> (/root/src/oref0/bin/oref0-detect-sensitivity.js:80:5)
Jun 08 08:27:16 openaps autosens-loop.log: at Module._compile (module.js:571:32)
Jun 08 08:27:16 openaps autosens-loop.log: at Object.Module._extensions..js (module.js:580:10)
Jun 08 08:27:16 openaps autosens-loop.log: at Module.load (module.js:488:32)
Jun 08 08:27:16 openaps autosens-loop.log: at tryModuleLoad (module.js:447:12)
Jun 08 08:27:16 openaps autosens-loop.log: at Function.Module._load (module.js:439:3)
Jun 08 08:27:16 openaps autosens-loop.log: at Module.runMain (module.js:605:10)
Jun 08 08:27:16 openaps autosens-loop.log: at run (bootstrap_node.js:423:7)
Starting supermicrobolus pump-loop at Thu Jun 8 10:26:21 CDT 2017 with 20 second wait_for_silence:
Jun 08 08:26:21 openaps pump-loop.log: Waiting up to 4 minutes for new BG: glucose.json newer than pump_loop_completed
Jun 08 08:26:44 openaps pump-loop.log: Radio ok. Listening: .No pump comms detected from other rigs
Jun 08 08:27:16 openaps pump-loop.log: Preflight OK. Old pumphistory, waiting for 20 seconds of silence: Radio ok. Listening: .No pump comms detected from other rigs
Jun 08 08:27:37 openaps pump-loop.log: RefreshError: carb_ratio undefined out of bounds
Jun 08 08:27:37 openaps pump-loop.log: ed pumphistory
Jun 08 08:27:53 openaps pump-loop.log: Old settings refreshISF of null is not supported
Jun 08 08:27:53 openaps pump-loop.log: ed. glucose.json newer than pump_loop_completed.
Jun 08 08:28:01 openaps pump-loop.log: Temp refresh at startup (bootstrap_node.js:147:9)
Jun 08 08:28:01 openaps pump-loop.log: ed
Jun 08 08:28:14 openaps pump-loop.log: Could not parse input data: SyntaxError: /root/myopenaps/monitor/iob.json: Unexpected end of JSON input
Jun 08 08:28:14 openaps pump-loop.log: at JSON.parse (<anonymous>)
Jun 08 08:28:14 openaps pump-loop.log: at Object.Module._extensions..json (module.js:588:27)
Jun 08 08:28:14 openaps pump-loop.log: at Module.load (module.js:488:32)
Jun 08 08:28:14 openaps pump-loop.log: at tryModuleLoad (module.js:447:12)
Jun 08 08:28:14 openaps pump-loop.log: at Function.Module._load (module.js:439:3)
Jun 08 08:28:14 openaps pump-loop.log: at Module.require (module.js:498:17)
Jun 08 08:28:14 openaps pump-loop.log: at require (internal/module.js:20:19)
Jun 08 08:28:14 openaps pump-loop.log: at Object.<anonymous> (/root/src/oref0/bin/oref0-determine-basal.js:98:24)
Jun 08 08:28:14 openaps pump-loop.log: at Module._compile (module.js:571:32)
Jun 08 08:28:14 openaps pump-loop.log: at Object.Module._extensions..js (module.js:580:10)
Jun 08 08:28:14 openaps pump-loop.log: Traceback (most recent call last):
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/local/bin/openaps-report", line 82, in <module>
Jun 08 08:28:14 openaps pump-loop.log: app( )
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
Jun 08 08:28:14 openaps pump-loop.log: self.run(self.args)
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/local/bin/openaps-report", line 75, in run
Jun 08 08:28:14 openaps pump-loop.log: output = app(args, self)
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in __call__
Jun 08 08:28:14 openaps pump-loop.log: return self.method.main(args, app)
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 48, in main
Jun 08 08:28:14 openaps pump-loop.log: reporters.Reporter(report, device, task)(output)
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/reports/reporters/__init__.py", line 33, in __call__
Jun 08 08:28:14 openaps pump-loop.log: self.blob = self.serialize(data)
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/reports/reporters/__init__.py", line 31, in serialize
Jun 08 08:28:14 openaps pump-loop.log: return self.method.serialize(render(data), self)
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/process.py", line 56, in prerender_json
Jun 08 08:28:14 openaps pump-loop.log: return json.loads(data)
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
Jun 08 08:28:14 openaps pump-loop.log: return _default_decoder.decode(s)
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
Jun 08 08:28:14 openaps pump-loop.log: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jun 08 08:28:14 openaps pump-loop.log: File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
Jun 08 08:28:14 openaps pump-loop.log: raise ValueError("No JSON object could be decoded")
Jun 08 08:28:14 openaps pump-loop.log: ValueError: No JSON object could be decoded
Jun 08 08:28:14 openaps pump-loop.log: Error, retrying
Jun 08 08:28:14 openaps pump-loop.log: Waiting for 30s silence before mmtuning
Jun 08 08:28:48 openaps pump-loop.log: Radio ok. Listening: .No pump comms detected from other rigs
Jun 08 08:29:47 openaps pump-loop.log: Listening for 30s silence before mmtuning: .No pump comms detected from other rigs
Jun 08 08:29:47 openaps pump-loop.log: mmtune: "916.516", 5, -76 waiting for 32 second silence before continuing
Jun 08 08:30:13 openaps pump-loop.log: No pump comms detected from other rigs
myopenaps
completely and rerun oref0-setup
=/
killall -g openaps
/etc/init.d/cron stop
openaps mmtune
/etc/init.d/cron start
after your done if you want the rig to loop again
FULL SIGNAL
and -100 would be WEAK
openaps mmtune
also does the radio reset
openaps alias show mmtune
mmtune ! bash -c "oref0_init_pump_comms.py; find monitor/ -size +5c | grep -q mmtune && cp monitor/mmtune.json mmtune_old.json; echo {} > monitor/mmtune.json; echo -n \"mmtune: \" && openaps report invoke monitor/mmtune.json; grep -v setFreq monitor/mmtune.json | grep -A2 $(json -a setFreq -f monitor/mmtune.json) | while read line; do echo -n \"$line \"; done"