Python api wrapper for JellyFish Lights

Overview

Python api wrapper for JellyFish Lights

The hope is to make this a pip installable package

Current capabalilities:

  • Connects to a local JellyFish Lighting controller over websocket
  • Retrieve and store the following data:
    • Zones
    • Pattern Files
  • Turn on and off controller lights
  • Play a pattern
  • Set any lights you want

Example:

from jellyfishmain import JellyFishController, Light, LightString

controllerIP = "192.168.0.245"

#We set the printJSON parameter to true to see the JSON sent to and recieved from the controller
jfc = JellyFishController(controllerIP, True)
jfc.connectAndGetData()
jfc.turnOff()

lights = LightString()
#add red light
lights.add(Light(255, 0, 0))
#add green light
lights.add(Light(0, 255, 0))
#add blue light
lights.add(Light(0, 0, 255))

#Currently all commands that could turn on the lights themselves
#  have an optional zones parameter. If not filled the api wrapper
#  will fill it with all the zones it got from the controller
jfc.sendLightString(lights, ["Zone"])
You might also like...
REST API for sentence tokenization and embedding using Multilingual Universal Sentence Encoder.

What is MUSE? MUSE stands for Multilingual Universal Sentence Encoder - multilingual extension (16 languages) of Universal Sentence Encoder (USE). MUS

Submit issues and feature requests for our API here.

AIx GPT API Submit issues and feature requests for our API here. See https://apps.aixsolutionsgroup.com for more info. Python Quick Start pip install

API for the GPT-J language model 🦜. Including a FastAPI backend and a streamlit frontend

gpt-j-api 🦜 An API to interact with the GPT-J language model. You can use and test the model in two different ways: Streamlit web app at http://api.v

Spert NLP Relation Extraction API deployed with torchserve for inference

SpERT torchserve Spert_torchserve is the Relation Extraction model (SpERT)Span-based Entity and Relation Transformer API deployed with pytorch/serve.

Free and Open Source Machine Translation API. 100% self-hosted, offline capable and easy to setup.
Free and Open Source Machine Translation API. 100% self-hosted, offline capable and easy to setup.

LibreTranslate Try it online! | API Docs | Community Forum Free and Open Source Machine Translation API, entirely self-hosted. Unlike other APIs, it d

Named Entity Recognition API used by TEI Publisher

TEI Publisher Named Entity Recognition API This repository contains the API used by TEI Publisher's web-annotation editor to detect entities in the in

A simple Speech Emotion Recognition (SER) API created using Flask and running in a Docker container.

emovoz Introduction A simple Speech Emotion Recognition (SER) API created using Flask and running in a Docker container. The SER system was built with

topic modeling on unstructured data in Space news articles retrieved from the Guardian (UK) newspaper using API
topic modeling on unstructured data in Space news articles retrieved from the Guardian (UK) newspaper using API

NLP Space News Topic Modeling Photos by nasa.gov (1, 2, 3, 4, 5) and extremetech.com Table of Contents Project Idea Data acquisition Primary data sour

Mlcode - Continuous ML API Integrations

mlcode Basic APIs for ML applications. Django REST Application Contains REST API

Comments
  • getRunPattern issues (and publication to PyPI)

    getRunPattern issues (and publication to PyPI)

    Hi there - I see that you've recently added support for the get runPattern method. Thanks for that! I tested it out this evening and ran into a couple of issues.

    First, when running getRunPattern(zones=None) it picks one of my zones to send the request for (instead of defaulting to all zones as is the behavior for other functions).

    Also, I got this error:

    Traceback (most recent call last):
      File "/usr/local/python/lib/python3.10/concurrent/futures/thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/usr/local/python/lib/python3.10/site-packages/jellyfishlightspy/jellyfishmain.py", line 85, in getRunPattern
        runPatternsClass = RunPatternClassFromDict(runPatterns)
      File "/usr/local/python/lib/python3.10/site-packages/jellyfishlightspy/runPattern.py", line 95, in RunPatternClassFromDict
        return RunPatternClass.from_dict(s)
      File "/usr/local/python/lib/python3.10/site-packages/jellyfishlightspy/runPattern.py", line 57, in from_dict
        data = RunPatternDatafromdict(json.loads(obj.get("data")))
      File "/usr/local/python/lib/python3.10/json/__init__.py", line 346, in loads
        return _default_decoder.decode(s)
      File "/usr/local/python/lib/python3.10/json/decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/local/python/lib/python3.10/json/decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    

    Here is the JSON sent and received:

    Sending: {"cmd": "toCtlrGet", "get": [["runPattern", "Back lower"]]}
    Recieved: {"cmd":"fromCtlr","runPattern":{"data":"","file":"Special Effects/Pink Waves","id":"Back lower","state":1,"zoneName":["Back lower"]}}
    

    Hope you are already aware of this and working on a fix. I may work on a fix myself when I have time and will submit a PR if I do.

    Last, are you planning to publish these changes to PyPI? I'm working on a third party integration and will need these changes published to take advantage of them.

    opened by bdunn44 16
Owner
null
A python wrapper around the ZPar parser for English.

NOTE This project is no longer under active development since there are now really nice pure Python parsers such as Stanza and Spacy. The repository w

ETS 49 Sep 12, 2022
Python wrapper for Stanford CoreNLP tools v3.4.1

Python interface to Stanford Core NLP tools v3.4.1 This is a Python wrapper for Stanford University's NLP group's Java-based CoreNLP tools. It can eit

Dustin Smith 610 Sep 7, 2022
Visual Automata is a Python 3 library built as a wrapper for Caleb Evans' Automata library to add more visualization features.

Visual Automata Copyright 2021 Lewi Lie Uberg Released under the MIT license Visual Automata is a Python 3 library built as a wrapper for Caleb Evans'

Lewi Uberg 55 Nov 17, 2022
A Python wrapper for simple offline real-time dictation (speech-to-text) and speaker-recognition using Vosk.

Simple-Vosk A Python wrapper for simple offline real-time dictation (speech-to-text) and speaker-recognition using Vosk. Check out the official Vosk G

null 2 Jun 19, 2022
A script that automatically creates a branch name using google translation api and jira api

About google translation api와 jira api을 사용하여 자동으로 브랜치 이름을 만들어주는 스크립트 Setup 환경변수에 다음 3가지를 등록해야 한다. JIRA_USER : JIRA email (ex: [email protected]) JIR

hyunwook.kim 2 Dec 20, 2021
Wrapper to display a script output or a text file content on the desktop in sway or other wlroots-based compositors

nwg-wrapper This program is a part of the nwg-shell project. This program is a GTK3-based wrapper to display a script output, or a text file content o

Piotr Miller 94 Dec 27, 2022
A spaCy wrapper of OpenTapioca for named entity linking on Wikidata

spaCyOpenTapioca A spaCy wrapper of OpenTapioca for named entity linking on Wikidata. Table of contents Installation How to use Local OpenTapioca Vizu

Universitätsbibliothek Mannheim 80 Jan 3, 2023
A multi-lingual approach to AllenNLP CoReference Resolution along with a wrapper for spaCy.

Crosslingual Coreference Coreference is amazing but the data required for training a model is very scarce. In our case, the available training for non

Pandora Intelligence 71 Jan 4, 2023
Interactive Jupyter Notebook Environment for using the GPT-3 Instruct API

gpt3-instruct-sandbox Interactive Jupyter Notebook Environment for using the GPT-3 Instruct API Description This project updates an existing GPT-3 san

null 312 Jan 3, 2023
Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a Hemingwai

TextCortex - HemingwAI Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a Hemingw

TextCortex AI 27 Nov 28, 2022