# lvmecp
![Versions](https://img.shields.io/badge/python-3.11+-blue)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Test](https://github.com/sdss/lvmecp/actions/workflows/test.yml/badge.svg)](https://github.com/sdss/lvmecp/actions/workflows/test.yml)
[![Documentation Status](https://readthedocs.org/projects/lvmecp/badge/?version=latest)](https://lvmecp.readthedocs.io/en/latest/?badge=latest)
[![Docker](https://github.com/sdss/lvmecp/actions/workflows/docker.yml/badge.svg)](https://github.com/sdss/lvmecp/actions/workflows/docker.yml)
[![codecov](https://codecov.io/gh/sdss/lvmecp/branch/develop/graphs/badge.svg)](https://codecov.io/gh/sdss/lvmecp)
SDSS-V LVM Enclosure Control Package
## Features
- CLU Actor based interface
- Supports [DirectLogic 205 (Micro Modular PLC)](https://www.automationdirect.com/adc/overview/catalog/programmable_controllers/directlogic_series_plcs_(micro_to_small,_brick_-a-_modular)/directlogic_205_(micro_modular_plc))
## Prerequisite
Install [Poetry](https://python-poetry.org/) by using PyPI.
```
$ pip install poetry
$ python create_setup.py
$ pip install -e .
```
Install [RabbitMQ](https://www.rabbitmq.com/) by using apt-get.
```
$ sudo apt-get install -y erlang
$ sudo apt-get install -y rabbitmq-server
$ sudo systemctl enable rabbitmq-server
$ sudo systemctl start rabbitmq-server
```
Install [CLU](https://clu.readthedocs.io/en/latest/) by using PyPI.
```
$ pip install sdss-clu
```
## Installation
Clone this repository.
```
$ git clone https://github.com/sdss/lvmecp
$ cd lvmecp
$ poetry install
```
## Quick Start
### Start the actor
Before you start the actor, you must have the PLC or simulator.
Start `lvmecp` actor.
```
$ lvmecp start
```
In another terminal, type `clu` and `lvmecp ping` for test.
```
$ clu
lvmecp ping
07:41:22.636 lvmecp >
07:41:22.645 lvmecp : {
"text": "Pong."
}
```
Stop `lvmecp` actor.
```
$ lvmecp stop
```
## Example
In terminal which you are turning clu on, you can use the command for lvmecp.
```
$ clu
lvmecp help
13:05:25.386 lvmecp >
13:05:25.387 lvmecp : {
"help": [
"Usage: lvmecp [OPTIONS] COMMAND [ARGS]...",
"",
"Options:",
" --help Show this message and exit.",
"",
"Commands:",
" dome tasks for Dome",
" estop activate the emergency status.",
" get_schema Returns the schema of the actor as a JSON schema.",
" help Shows the help.",
" keyword Prints human-readable information about a keyword.",
" light tasks for lights",
" monitor return the status of HVAC system and air purge system.",
" ping Pings the actor.",
" telemetry return the status of the enclosure",
" version Reports the version."
]
}
lvmecp dome status
13:05:56.294 lvmecp >
13:05:56.295 lvmecp i {
"text": "checking the Dome"
}
13:05:56.302 lvmecp i {
"status": {
"Dome": "CLOSE"
}
}
13:05:56.302 lvmecp :
lvmecp dome move
13:06:21.701 lvmecp >
13:06:21.703 lvmecp i {
"text": "moving the Dome"
}
13:06:21.708 lvmecp i {
"status": {
"Dome": "OPEN"
}
}
13:06:21.709 lvmecp :
```
Raw data
{
"_id": null,
"home_page": "https://github.com/sdss/lvmecp",
"name": "sdss-lvmecp",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11,<4.0",
"maintainer_email": "",
"keywords": "astronomy,software",
"author": "Jos\u00e9 S\u00e1nchez-Gallego",
"author_email": "gallegoj@uw.edu",
"download_url": "https://files.pythonhosted.org/packages/62/9d/6a3429caaffe65fccf08beb57a65f2718d8b56e4194f2c2a09798f03facd/sdss_lvmecp-0.7.0.tar.gz",
"platform": null,
"description": "# lvmecp\n\n![Versions](https://img.shields.io/badge/python-3.11+-blue)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Test](https://github.com/sdss/lvmecp/actions/workflows/test.yml/badge.svg)](https://github.com/sdss/lvmecp/actions/workflows/test.yml)\n[![Documentation Status](https://readthedocs.org/projects/lvmecp/badge/?version=latest)](https://lvmecp.readthedocs.io/en/latest/?badge=latest)\n[![Docker](https://github.com/sdss/lvmecp/actions/workflows/docker.yml/badge.svg)](https://github.com/sdss/lvmecp/actions/workflows/docker.yml)\n[![codecov](https://codecov.io/gh/sdss/lvmecp/branch/develop/graphs/badge.svg)](https://codecov.io/gh/sdss/lvmecp)\n\nSDSS-V LVM Enclosure Control Package\n\n## Features\n\n- CLU Actor based interface\n- Supports [DirectLogic 205 (Micro Modular PLC)](https://www.automationdirect.com/adc/overview/catalog/programmable_controllers/directlogic_series_plcs_(micro_to_small,_brick_-a-_modular)/directlogic_205_(micro_modular_plc))\n\n## Prerequisite\n\nInstall [Poetry](https://python-poetry.org/) by using PyPI.\n\n```\n$ pip install poetry\n$ python create_setup.py\n$ pip install -e .\n```\n\nInstall [RabbitMQ](https://www.rabbitmq.com/) by using apt-get.\n\n```\n$ sudo apt-get install -y erlang\n$ sudo apt-get install -y rabbitmq-server\n$ sudo systemctl enable rabbitmq-server\n$ sudo systemctl start rabbitmq-server\n```\n\nInstall [CLU](https://clu.readthedocs.io/en/latest/) by using PyPI.\n```\n$ pip install sdss-clu\n```\n\n## Installation\n\n\nClone this repository.\n```\n$ git clone https://github.com/sdss/lvmecp\n$ cd lvmecp\n$ poetry install\n```\n\n## Quick Start\n\n### Start the actor\n\nBefore you start the actor, you must have the PLC or simulator.\n\nStart `lvmecp` actor.\n```\n$ lvmecp start\n```\n\nIn another terminal, type `clu` and `lvmecp ping` for test.\n```\n$ clu\nlvmecp ping\n 07:41:22.636 lvmecp >\n 07:41:22.645 lvmecp : {\n \"text\": \"Pong.\"\n }\n```\n\nStop `lvmecp` actor.\n```\n$ lvmecp stop\n```\n\n## Example\n\nIn terminal which you are turning clu on, you can use the command for lvmecp.\n\n```\n$ clu\nlvmecp help\n13:05:25.386 lvmecp >\n13:05:25.387 lvmecp : {\n \"help\": [\n \"Usage: lvmecp [OPTIONS] COMMAND [ARGS]...\",\n \"\",\n \"Options:\",\n \" --help Show this message and exit.\",\n \"\",\n \"Commands:\",\n \" dome tasks for Dome\",\n \" estop activate the emergency status.\",\n \" get_schema Returns the schema of the actor as a JSON schema.\",\n \" help Shows the help.\",\n \" keyword Prints human-readable information about a keyword.\",\n \" light tasks for lights\",\n \" monitor return the status of HVAC system and air purge system.\",\n \" ping Pings the actor.\",\n \" telemetry return the status of the enclosure\",\n \" version Reports the version.\"\n ]\n}\nlvmecp dome status\n13:05:56.294 lvmecp >\n13:05:56.295 lvmecp i {\n \"text\": \"checking the Dome\"\n}\n13:05:56.302 lvmecp i {\n \"status\": {\n \"Dome\": \"CLOSE\"\n }\n}\n13:05:56.302 lvmecp :\nlvmecp dome move\n13:06:21.701 lvmecp >\n13:06:21.703 lvmecp i {\n \"text\": \"moving the Dome\"\n}\n13:06:21.708 lvmecp i {\n \"status\": {\n \"Dome\": \"OPEN\"\n }\n}\n13:06:21.709 lvmecp :\n```\n\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "A library and actor to communicate with an SDSS-V LVM Enclosure",
"version": "0.7.0",
"project_urls": {
"Documentation": "https://sdss-lvmecp.readthedocs.org",
"Homepage": "https://github.com/sdss/lvmecp",
"Repository": "https://github.com/sdss/lvmecp"
},
"split_keywords": [
"astronomy",
"software"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "37a982a03bf13f29debbcf829b6a7193ba9e3f34732f801e59911ad6cf14de7e",
"md5": "944cb3a6d62fc324ab1f2583c5e1f1be",
"sha256": "ecd9b52143ccde91fd3047c7219c8121bb131a554851b4a5efc58d57437047f3"
},
"downloads": -1,
"filename": "sdss_lvmecp-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "944cb3a6d62fc324ab1f2583c5e1f1be",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11,<4.0",
"size": 26560,
"upload_time": "2024-01-19T23:39:56",
"upload_time_iso_8601": "2024-01-19T23:39:56.356410Z",
"url": "https://files.pythonhosted.org/packages/37/a9/82a03bf13f29debbcf829b6a7193ba9e3f34732f801e59911ad6cf14de7e/sdss_lvmecp-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "629d6a3429caaffe65fccf08beb57a65f2718d8b56e4194f2c2a09798f03facd",
"md5": "02fb95bff1d9a301f32796b20edcd274",
"sha256": "ebc10ed6cf5c96ea3bb5c77136645ea7910d2022acd6fd4e57f924bb63f1f7b5"
},
"downloads": -1,
"filename": "sdss_lvmecp-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "02fb95bff1d9a301f32796b20edcd274",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11,<4.0",
"size": 19280,
"upload_time": "2024-01-19T23:39:57",
"upload_time_iso_8601": "2024-01-19T23:39:57.920781Z",
"url": "https://files.pythonhosted.org/packages/62/9d/6a3429caaffe65fccf08beb57a65f2718d8b56e4194f2c2a09798f03facd/sdss_lvmecp-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-19 23:39:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sdss",
"github_project": "lvmecp",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sdss-lvmecp"
}