We use cookies on this site to enhance your user experience
By clicking the Accept button, you agree to us doing so. More info on our cookie policy
We use cookies on this site to enhance your user experience
By clicking the Accept button, you agree to us doing so. More info on our cookie policy
AMSKY01: All-in-one sky quality and cloud sensor
This section describes how to use the AMSKY01 sensor under Linux. It covers stable device naming, usage with the sensor_viewer.py
tool, integration with the INDI driver, and making the sensor available over the network using ser2net. Each method includes guidance on when it is most appropriate to use.
When the sensor is connected, it usually appears as /dev/ttyACM0
, /dev/ttyACM1
, etc. The assigned number may change between reboots or re-plugs, which can be inconvenient. There are two recommended approaches to create a stable name:
/dev/serial/by-id/
The system automatically creates symlinks containing the manufacturer name and the device serial number. These symlinks are unique and stable.
Example:
ls -l /dev/serial/by-id/
usb-AstroMeters.eu_AMSKY01_DF6490926758602A-if00 -> ../../ttyACM0
This symlink can be used directly in your applications.
If you prefer shorter names (e.g. /dev/ttyAMSKY1
), you can create a udev rule based on Vendor ID and Product ID.
Identify values using lsusb
:
lsusb
# Example: ID 1209:ae02 AstroMeters.eu AMSKY01
Create rule /etc/udev/rules.d/99-amsky01.rules
:
SUBSYSTEM=="tty", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="ae02", SYMLINK+="ttyAMSKY1"
Apply rule:
sudo udevadm control --reload-rules
sudo udevadm trigger
ls -l /dev/ttyAMSKY1
This approach is useful if you want a simple, consistent port name regardless of the specific device serial number.
sensor_viewer.py
sensor_viewer.py
is intended for users who want to quickly view AMSKY01 data or log it to a CSV file. It supports both serial and TCP connections.
Show help:
python3 sensor_viewer.py --help
Typical use cases:
Detailed instructions and examples are provided on a dedicated documentation page for this tool.
The INDI driver is recommended if you want to integrate the AMSKY01 sensor with astronomy software (e.g. KStars/Ekos) or in larger systems where a unified interface for multiple devices is required.
indiserver indi_amsky01
In the AMSKY01 driver you can choose:
indi_getprop | grep AMSKY01
indi_setprop "AMSKY01.CONNECTION.CONNECTION_MODE=Serial"
indi_setprop "AMSKY01.SERIAL.PORT=/dev/ttyAMSKY1"
indi_setprop "AMSKY01.CONNECTION.CONNECT=On"
Detailed installation instructions for INDI drivers are described on a separate documentation page.
In some cases, it is advantageous not to access the sensor directly via a serial port but to expose it as a TCP stream. This approach allows multiple clients to connect simultaneously, simplifies remote access over the network, and unifies configuration for applications.
Ser2net is useful in the following scenarios:
sensor_viewer.py
and the INDI driver) to access AMSKY01 at the same time.Using TCP increases flexibility and compatibility.
On Debian/Ubuntu:
sudo apt-get update
sudo apt-get install ser2net
Configuration file /etc/ser2net/ser2net.yaml
:
connection: &amsky01
accepter: tcp,0.0.0.0,2000
enable: on
options:
banner: "AMSKY01 ready\n"
kickolduser: true
telnet-brk-on-sync: true
connector: serialdev,/dev/ttyAMSKY1,9600n81,local
sudo systemctl restart ser2net
sudo systemctl status ser2net
ss -ltnp | grep :2000
Quick test with netcat:
nc localhost 2000