Code: Select all
pip install -U openinverter_can_tool

Code: Select all
pip install -U openinverter_can_tool
I don't know why it does it but this seems to be an artifact of the way that python setuptools functions in development mode (i.e. when you run "pip install -e .[dev,test]"). It is possible to run the tool in this mode from anywhere but rather than run "oic" run "python -m openinverter_can_tool " instead. For example:johu wrote: ↑Mon Feb 13, 2023 4:26 pm Hmm![]()
Code: Select all
Traceback (most recent call last): File "/home/debian/.local/bin/oic", line 33, in <module> sys.exit(load_entry_point('openinverter-can-tool', 'console_scripts', 'oic')()) File "/home/debian/.local/bin/oic", line 25, in importlib_load_entry_point return next(matches).load() File "/home/debian/.local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 169, in load return functools.reduce(getattr, attrs, module) AttributeError: module 'openinverter_can_tool' has no attribute 'cli'
Code: Select all
$ python -m openinverter_can_tool log --help
Usage: python -m openinverter_can_tool log [OPTIONS] PARAMS... OUT_FILE
Log the value of PARAMS from the device periodically in CSV format. Multiple
parameters may be specified separated by a space. OUT_FILE may be a filename
or - to output to stdout.
Options:
-s, --step INTEGER RANGE Time to wait before querying for new data in
seconds [default: 1; 1<=x<=3600]
--timestamp / --no-timestamp Include a timestamp on each row of the log
[default: timestamp]
--help Show this message and exit.
Code: Select all
oic write potmode DualChannel
oic write pinswap PWMOutput13,PWMOutput23
Code: Select all
$ oic read version
version : 5.27.R-sine
Code: Select all
0x601#0x23 0x0A 0x30 0x00 0xF6 0x07 0x08 0x08
Code: Select all
0x601#0x23 0x0A 0x30 0x01 0xE8 0x03 0x00 0x00
Code: Select all
oic map list
oic map add tx 0xA5 angle --position 0 --length 16 # gain defaults to 1, offset to 0
oic map add tx 0xA5 idc --position 16 --length 16 --gain 42.34 --offset 128
oic map delete tx 0xA5 # Remove all parameters mapped to Can ID 0xA5
oic map delete tx 0xA5 angle # Remove just the "angle" parameter mapping
oic map add tx 0xA5 idc --position 32 --length 16 --gain 10 --offset 0 # Updates the existing "idc" mapping
oic map save my-clever-can-map.json
oic map load my-clever-can-map.json # Just adds to the existing map. An --erase option would erase before loading
oic map erase tx