$ pipenv shell $ pipenv install $ ./kikusui.py --ipaddr 192.168.11.101 id KIKUSUI,PMX35-3A,ZH000859,IFC01.52.0011 IOC01.10.0070
A configuration file is first searched in the current directory, then searched in the application configuration directory if not found. This is because you might want to override your default configuration with the one in the current directory.
The application configuration directory is OS dependent.
- For Linux
$XDG_CONFIG_HOME/kikusui/kikusui.yml
.- For Mac OS X
~/Library/Application Support/kikusui/kikusui.yml
- For Windows 10
C:\Users\<user>\AppData\Local\kikusui\kikusui.yml
Note: The name of the configuration file has been changed from
config.yml
to kikusui.yml
.
If you have IP address specified in kikusui.yml, you don’t need
--ipaddr
option when you invoke the command.
ip: 192.168.11.101
$ ./kikusui.py --help Usage: kikusui.py [OPTIONS] COMMAND [ARGS]... Options: --ipaddr TEXT IP address to connect to. -h, --help Show this message and exit. Commands: current id measure ocp output ovp voltage
$ ./kikusui.py id KIKUSUI,PMX35-3A,ZH000859,IFC01.52.0011 IOC01.10.0070
The command id
prints “Manufacturer”, “Model”, “Serial”, “Firmware version”.
$ ./kikusui.py measure out no voltage -0.001 V / 12.0 V / 25.0 V current 0.0 A / 1.0 A / 3.3 A
The command measure
prints the current settings and measured values.
- out
- Power output status.
yes
when power is on,no
otherwise. - voltage
- The voltages: measured / currently set / over voltage protection
- current
- The currents: measured / currently set / over current protection
$ ./kikusui.py current $ ./kikusui.py current -t setting $ ./kikusui.py current -t measure $ ./kikusui.py current -t ocp
The command current
prints a current value set, measured, or set
for ocp. The default value is setting
.
The command also takes option --less-than
with a value.
./kikusui.py current -t measure --less-than 1.0
With this option, the command compares the given value against the
acquired value, return exit code 0
when the acquired value is
less than the given value, or 1
otherwise.
watch ./kikusui.py measure
There is a python clone called pywatch
if you are on non Linux system.