Awesome
indi-mqtt
indi-mqtt is MQTT publisher for INDI server. It reads properties of INDI devices and publishes them using MQTT topics.
[NOTE] Due to the recent changes in pyindi-client and annouced end of life of pyindi-client library, this project is not maintained anymore. It will be replaced by native c++ driver soon.
Installation
Use git to clone source files or download and install indi-mqtt debian package from https://www.astroberry.io/repo/pool/main/i/indi-mqtt/
sudo apt update
sudo apt install python-setuptools python-dev libindi-dev swig libcfitsio-dev libnova-dev
sudo dpkg - i indi-mqtt_1.0.x_all.deb
Configuration
Default configuration file for indi-mqtt is located in /etc/indi-mqtt.conf
MQTT tree
MQTT messages published by indi-mqtt are organized in the following hierarchy:
observatory/#
observatory/status - observatory status (ON|OFF) - equals INDI server status
observatory/json - all INDI properties in a single JSON message
observatory/general/#
observatory/telescope/#
observatory/ccd/#
observatory/guider/#
observatory/focuser/#
observatory/filter/#
observatory/dome/#
observatory/gps/#
observatory/weather/#
observatory/ao/#
observatory/dustcap/#
observatory/lighbox/#
observatory/detector/#
observatory/rotator/#
observatory/spectrograph/#
observatory/aux/#
You can change 'observatory' by setting MQTT_ROOT in /etc/indi-mqtt.conf or invoking command with --mqtt_root argument.
# is a wildcard selector, which returns all properties subsequent to path. If you want to access specific property, use full topic path e.g. observatory/telescope/telescope_simulator/telescope_info/telescope_focal_length
will give you info about focal length of telescope simulator.
You can list all available INDI properties by invoking python3 indi-mqtt.py --list_topics
or python3 indi-mqtt.py -l
for short. JSON output is available if you set MQTT_JSON=True or by invoking python3 indi-mqtt.py --mqtt_json
or python3 indi-mqtt.py -j
for short.
If you have multiple device of a type, they will be listed as a type's subtopics e.g. observatory/focuser/indi_simulator_focus/#
and observatory/focuser/indi_moonlite_focus/#
INDI properties polling
INDI properties can be refreshed in two modes:
- Auto refresh with time configurable by MQTT_POLLING variable in /etc/indi-mqtt.conf or invoking command with --mqtt_polling argument
- Manual refresh by publishing numeric value to MQTT_ROOT/poll topic (by default it is observatory/poll). Any positive value sets refresh time in seconds. 0 means manual polling
In both modes all INDI properties are returned on poll. If you want to get a specific INDI property, subscribe to it using full topic path e.g. observatory/telescope/telescope_simulator/telescope_info/telescope_focal_length
Help
To get help run python3 /usr/bin/indi-mqtt.py --help
or python3 /usr/bin/indi-mqtt.py -h
for short
Issues
File any issues on https://github.com/rkaczorek/indi-mqtt/issues