sudo npm install -g oref0
but I am still getting the missing module error.
Error: Cannot find module ‘yargs'
npm ls yargs
npm ls -g yags | oref0
both show as installed, tes.
the important part being;
*The fix for now is to point NODE_PATH at the right directory:
export NODE_PATH=/opt/lib/node_modules*
<Adafruit_BluefruitLE.bluez_dbus.gatt.BluezGattService object at 0xb670d64c>
paired? 0
pairing...
paired
[UUID('00001800-0000-1000-8000-00805f9b34fb'), UUID('00001801-0000-1000-8000-00805f9b34fb'), UUID('00001804-0000-1000-8000-00805f9b34fb'), UUID('0000180a-0000-1000-8000-00805f9b34fb'), UUID('f0aca0b1-ebfa-f96f-28da-076c35a521db')]
finding service
SERVICE <Adafruit_BluefruitLE.bluez_dbus.gatt.BluezGattService object at 0xb67003cc>
sending auth code [MY SERIAL]
Traceback (most recent call last):
[Traceback omitted]
AttributeError: 'NoneType' object has no attribute 'iter_records'
export NODE_PATH=/usr/lib/node_modules/oref0/node_modules
Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 63, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
self.run(self.args)
File "/usr/local/bin/openaps-use", line 57, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 92, in __call__
return self.method.selected(args)(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 31, in __call__
return self.method(args, app)
File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 89, in __call__
res = self.ble.run_mainloop_with(run, quit_with_loop=False)
File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main
self._return_code = target()
File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 85, in run
output = self.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/dexcom.py", line 297, in main
for item in self.dexcom.iter_records(self.RECORD_TYPE):
AttributeError: 'NoneType' object has no attribute 'iter_records'
sudo pip install -U openaps
command?
pip
. =)
dexcom-reader (0.1.9)
AttributeError: 'NoneType' object has no attribute 'iter_records'
usually means the BLE pairing/auth isn't working
Downloading/unpacking dexcom-reader==0.0.9
Could not find a version that satisfies the requirement dexcom-reader==0.0.9 (from versions: 0.0.2, 0.0.3.linux-x86_64, 0.0.4, 0.0.1.linux-x86_64, 0.1.6, 0.0.5.linux-x86_64, 0.0.2.linux-x86_64, 0.0.4.linux-x86_64, 0.1.1, 0.1.8, 0.1.2, 0.1.9, 0.0.3, 0.1.7, 0.0.5, 0.1.0, 0.0.8, 0.1.10, 0.0.1, 0.1.3, 0.1.4, 0.0.6, 0.1.5)
Cleaning up...
No distributions matching the version for dexcom-reader==0.0.9
Storing debug log for failure in /root/.pip/pip.log
bluetoothctl
bluetoothctl
and while it says it paired, I never sent it the serial or anything, so I don’t know how accurate that is.
@scottleibrand or @MosiGitHub, I am trying to add the temptargets to get-profile...deleted the file and and the device from openaps.ini and then ran the command to add the device and alias. They added fine. But when I run openaps get-settings
I get:
get-profile://text/shell/settings/profile.json
settings/profile.json raised 'Namespace' object has no attribute 'temptargets'
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
app( )
File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
self.run(self.args)
File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
output = app(args, self)
File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
return self.method.main(args, app)
File "/home/pi/src/openaps/openaps/reports/invoke.py", line 40, in main
output = task.method(args, app)
File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
output = self.main(args, app)
File "/home/pi/src/openaps/openaps/vendors/process.py", line 90, in main
params = self.get_params(args)
File "/home/pi/src/openaps/openaps/vendors/process.py", line 48, in get_params
params[opt] = getattr(args, opt)
AttributeError: 'Namespace' object has no attribute 'temptargets'
pi:~/openaps-dev (master)$
Ideas?
Also, troubleshooting my internet dependency and I am pretty sure it has to do with these commands having exits in them:
ns-temptargets = ! bash -c "curl -m 30 -s \"$NIGHTSCOUT_HOST/api/v1/treatments.json?find\[created_at\]\[\$gte\]=`date -d \"6 hours ago\" -Iminutes`&find\[eventType\]\[\$regex\]=Target\" > settings/temptargets.json; exit 0 "
ns-meal-carbs = ! bash -c "curl -m 30 -s \"$NIGHTSCOUT_HOST/api/v1/treatments.json?find\[created_at\]\[\$gte\]=`date -d \"6 hours ago\" -Iminutes`&find\[carbs\]\[\$exists\]=true\" > monitor/carbhistory.json && oref0-meal monitor/pumphistory-zoned.json settings/profile.json monitor/clock-zoned.json monitor/carbhistory.json monitor/glucose.json settings/basal_profile.json > monitor/meal.json; exit 0"
Can a bash god let me know how I might be able to ditch this dependency or even echo out "Hey, I couldn't talk to the internet and I am about to die!" so I can troubleshoot a little more?
<commands>; echo "this is it, man" && exit 0;
@scottleibrand, this is such an easy question that I feel goofy asking...but how can debug which aliases are getting called at each time?
Tried adding
get-settings = ! bash -c "echo -n \"getsetting: \"" && report invoke settings
before
get-settings = report invoke settings/model.json ....
But it just prints it out and then doesn't actually run the command. I just want to see which aliases have been kicked off. So simple, I know!
loop = ! bash -c "time ( echo STARTING PREFLIGHT; openaps preflight && echo STARTING GATHER; openaps gather; echo GATHER COMPLETE && echo STARTING GET-SETTINGS;
etc, etc. That way, I know which section it’s performing. Helps to track down where things break.
&&
and ||
operators, and you’ll be most of the way there.
@scottleibrand, I can't replicate the "hey, internet is out and AP won't work"...cuz I killed my internet and hooked it up to a monitor and it worked perfectly...maybe her battery was dying while we were backpacking...but could have sworn it I swapped the battery out then, too. Anyway, it worked flawlessly!
@Spazholio, it was really easy to see everything running after modifying my loop and wait-loop alias! Thanks so much! I ended up daisy chaining everything with && given each thing is pretty much dependent on the next and my new understanding of semi-colons and && in bash thanks to @kstdennis.
* * * * * cd /home/pi/openaps-dev && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log
| logger -t openaps-loop
/var/log/syslog
automatically
oref0 alias-helper
and oref0 device-helper
:-)
sudo pip install -U dexcom_reader
should resolve, looks like
root@edison1:~/share-demo# openaps use share list_dexcom
Traceback (most recent call last):
File "/usr/bin/openaps-use", line 4, in <module>
__import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 724, in run_script
File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 1650, in run_script
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
app( )
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
self.run(self.args)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
output = app(args, self)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
return self.method.selected(args)(args, app)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
return self.method(args, app)
File "/home/root/openxshareble/openxshareble/__init__.py", line 79, in __call__
self.setup_ble( )
File "/home/root/openxshareble/openxshareble/app.py", line 25, in setup_ble
self.ble = Adafruit_BluefruitLE.get_provider()
File "/home/root/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/platform.py", line 38, in get_provider
from .bluez_dbus.provider import BluezProvider
File "/home/root/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 31, in <module>
from gi.repository import GObject
ImportError: No module named gi.repository
openaps report add enact/enacted.json JSON pump set_temp_basal enact/suggested.json
oref0-reset-git
[report "nightscout/recent-treatments.json"]
oper = format-recent-history-treatments
use = shell
reporter = JSON
json_default = True
device = ns
remainder = monitor/pump-history.json model.json
[report "nightscout/uploaded.json"]
oper = upload-non-empty-treatments
use = shell
reporter = JSON
json_default = True
device = ns
remainder = nightscout/recent-treatments.json
sudo service cron stop
openaps use tz lsgaps raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json --minutes "10" --date "dateString" --before "1 day ago" --after "now"
pumphistory.json
report run properly? Here's how I generate my pumphistory-zoned.json
command, if it helps: openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json
tz
command yet either. I get it, but I don't grok it. But I'm pretty sure what I have here works. Does it work for you when you run it against your pumphistory.json
file?
[report "monitor/gaps.json"]
use = lsgaps
reporter = JSON
date = dateString
device = tz
input = raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json
minutes = 10
no_timezone = False
after = now
timezone =.
before = 1 day ago
monitor/pumphistory.json
file?
openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json
openaps --version
sudo pip install -U openaps
but I'm not sure if it matters how you installed it initially, or if that also pulls in other needed things like openaps-contrib
. I would wait for someone else slightly more knowledgeable to chime in.
sudo easy_install -ZU openaps
might be the way to do it
var code
bit?
openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json
Here is text surrounded by a backtick on either side
Here is where code would be
If I had code to paste
But this formatting is good for multi-line stuff
pumphistory.json
?
gaps.json
has nothing in it. Which either means things are horrifically broken, or I simply have no gaps (which is possible - my Dexcom is connected 24/7 and I'm always online).
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Stepping: 4
CPU MHz: 2599.982
BogoMIPS: 5199.96
Virtualization: VT-x
pip
and easy_install
are standalone tools
pip
is by far preferred, all docs should change to prefer it
sudo pip install -U openaps
always update or installs openaps
@bewest I got the following error when testing openxshareble on my new Edison rig (w/ yocto 3.0). Any ideas what this error might be indicating? I am giving up for the night but I'll get back to it tomorrow...
```
root@edison1:~/share-demo# openaps use share list_dexcom
Traceback (most recent call last):
File "/usr/bin/openaps-use", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
File "build/bdist.linux-i686/egg/pkgresources/_init.py", line 724, in run_script
File "build/bdist.linux-i686/egg/pkgresources/_init.py", line 1650, in run_script
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
app( )
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
output = app(args, self)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/init.py", line 92, in call
return self.method.selected(args)(args, app)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/init.py", line 31, in call
return self.method(args, app)
File "/home/root/openxshareble/openxshareble/init.py", line 79, in call
self.setup_ble( )
File "/home/root/openxshareble/openxshareble/app.py", line 25, in setup_ble
self.ble = Adafruit_BluefruitLE.get_provider()
File "/home/root/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/platform.py", line 38, in get_provider
from .bluez_dbus.provider import BluezProvider
File "/home/root/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 31, in <module>
from gi.repository import GObject
ImportError: No module named gi.repository
```
sudo pip list | grep pygobject
systemd
and I wonder if that has anything to do with it. I mean, BT is still running properly (with the --experimental
flag) so I doubt that's it, but...
openaps careportal pump
For Heroku users, exactly the same changes should be made on the Config Vars page.