The Python source code will allow to fetch ANY (or selected) events sent out from ZWO ASIAIR to a local MQTT broker and log them to local files. To run the code the script will require 5 parameters:
- IP address of ASIAIR
- Service port of ASIAIR (4400 = Guiding & Telescope, 4700 = Imaging, FindStar, Annotate, PlateSolve...)
- ASIAIR identifier
- IP address of MQTT broker
- Port of MQTT broker
To start run
./socket.py 192.168.178.100 4400 asiairPro 192.168.178.200 1883
./socket.py 192.168.178.100 4700 asiairPro 192.168.178.200 1883
Features
- Does automatically reconnect on connection loss (TCP socket stream)
- Event filter to reduce amount of messages/logging
- Handles some issues with undefined character encodings (INDI telescope control)
- Add current unix timestamp and identifier to MQTT payload & topic
Purpose
With the given information in MQTT it's possible to notify specific events (3rd party notification in workflow tools such as Node Red) which is still a missing feature in ASIAIR itself, having in mind longer (unattended) imaging sessions without the need of staying awake the whole night to manually scan for potential issues ruining the whole night.
Possible events might be
- Guide star lost
- Guide calibration failed
- Autofocus result/failed
- Meridian flip...
Node Red sample flow
The provided Node Red flow is a basic sample illustrating how the MQTT messaging pipeline can be integrated into a user specific Pushover account