Use JS8Call's JSON API via the command line.
This program is essentially just a cli wrapper for lib-js8call.
Make sure you have a recent version of NodeJS installed.
npm install -g @trippnology/js8-cli
Usage: js8-cli [options] [command] Options: -v, --vers Output the current version -h, --host <hostname/IP address> Hostname or IP address of machine running JS8Call (default: "127.0.0.1") -p, --port <port number> Port used by JS8 host machine (default: "2442") --help Display help for command Commands: inbox.get_messages View a list of your inbox messages inbox.store_message <callsign> <text> Store a message in your inbox for later transmission mode.get_speed The current TX speed. 0 = normal, 1 = fast, 2 = turbo, 4 = slow rig.get_freq The current station frequency rig.set_freq <offset> [frequency] Change the offset and/or frequency rx.get_band_activity Gets the text in the band activity window rx.get_call_activity Gets the text in the call activity window rx.get_text Gets the text in the QSO window tx.send_message <text> Transmit a message tx.set_text <text> Set the text in the TX window help [command] Display help for command
More commands coming soon, as they are added to
Providing dynamic input
You can provide dynamic input to commands in a couple of different ways.
echo -n "hello, world!" | js8-cli tx.send_message # -n option omits the newline at the end
cat some-file.txt | js8-cli tx.send_message
This method allows more control over the final output.
js8-cli tx.send_message "$(some-command)"
Posting a report to the WX group, using data from the local disk:
js8-cli tx.send_message "@WX Report from JO02mm: $(cat ~/weather-station/conditions.txt)" # Outputs: # @WX Report from JO02mm: 10.5c 93% 1012mb
The same method can be used for other types of telemetry (such as battery level), data from web APIs, or whatever else you come up with. Remember to put quotes around anything that may contain spaces.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature develop
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
--ipoption is now
- v1.2.0 Add
- v1.1.0 Add options for IP (
--ip) and port number (
TODO: Write credits