4ch1m / pixoo-rest Goto Github PK
View Code? Open in Web Editor NEWA RESTful API to easily interact with the Wi-Fi enabled Divoom Pixoo devices.
License: MIT License
A RESTful API to easily interact with the Wi-Fi enabled Divoom Pixoo devices.
License: MIT License
Hi,
first, I really like what you built and it works well in my tests.
But I would like to know what parameter to change in which file to have the service no longer only accepting requests on 127.0.0.1.
In your screenshot you use the interface IP and I would need that as well to access the REST from external.
Thanks
I want to create a python client based on the swagger spec:
swagger_to_py_client.py \
--swagger_path ./apispec_1.json \
--outpath ./pixoo-rest-client
Traceback (most recent call last):
File "/Users/Phlogi/Downloads/docker_playground/pixoo/pixoo-venv/bin/swagger_to_py_client.py", line 33, in <module>
sys.exit(load_entry_point('swagger-to==5.0.0', 'console_scripts', 'swagger_to_py_client.py')())
File "/Users/Phlogi/Downloads/docker_playground/pixoo/pixoo-venv/lib/python3.10/site-packages/swagger_to/bin/swagger_to_py_client.py", line 34, in main
raise AssertionError("Errors in {}:\n{}".format(swagger_path, "\n".join(errs)))
AssertionError: Errors in apispec_1.json:
"paths"/"/brightness/{percentage}"/"put"/"parameters"/0:RawDict([('default', 85), ('description', 'Percentage value of display brightness.'), ('in', 'path'), ('maximum', 100), ('minimum', '0'), ('name', 'percentage'), ('required', True), ('type', 'integer')]) is not valid under any of the given schemas
Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^/']['properties']['put']['properties']['parameters']['items']:
{'oneOf': [{'$ref': '#/definitions/parameter'},
{'$ref': '#/definitions/jsonReference'}]}
On instance['paths']['/brightness/{percentage}']['put']['parameters'][0]:
RawDict([('default', 85),
('description', 'Percentage value of display brightness.'),
('in', 'path'),
('maximum', 100),
('minimum', '0'),
('name', 'percentage'),
('required', True),
('type', 'integer')])
We used the JSON schema of OpenAPI 2 from: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/88cd94419e117b154b67b834fa8e471bb98bd346/schemas/v2.0/schema.json
I have Pixoo 64's in multiple rooms of my house; I would like the ability to have either multiple devices in your add on, or the ability to add additional instances of your addon. Thank you!
Love this by the way, I'm having a blast in Home Assistant with this.
It would be nice to be able to upload a GIF via a URL.
That means: I enter a URL, the API downloads the image and forwards it to the Pixoo.
this is a great utility, thank you. i'm using it to upload gifs to the pixoo 64 and it's working great except for the 1st frame of each gif gets glitched - meaning colors are slightly off, sharpness too. super noticeable with looped gifs.
i wonder if there's some fine tuning to that process that needs to take place?
Hi,
is it possible to add divoom times gate?
Hello,
I install your Docker on my Synology NAS and with the Interface i can select, upload and send images / gifs to my pixoo 64. As I want to use the REST calls via CURL (Twitch Chat integration) and tried to execute the CURL commands via Shell but I can't figure out how I can send a local (file is on the Synology NAS) to the pixoo. No matter what syntax, folder will all permission I use, I always get a curl: (26) Failed to open/read local data from file/application error.
e.g. with this one:
curl -X POST "http://192.168.178.32:8085/sendGif" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "gif=@/volume1/web/HEADICORN.gif;type=image/gif" -F "speed=100" -F "skip_first_frame=false" curl: (26) Failed to open/read local data from file/application
I hope you can help me out. Thanks in Advance!
Would it be possible to sniff the bluetooth packets and reverse engineer the initial setup of the Pixoo64 over bluetooth, so that the Divoom app is no longer needed?
https://hackaday.com/2021/03/23/a-crash-course-on-sniffing-bluetooth-low-energy/
Thank you.
Hello,
Thanks for your work on this!
I am trying to build and run the docker container option in your documentation on Ubuntu 20.04 LTS. However SomethingWithComputers latest pixoo library includes a Python TK simulator. This causes the docker container to fail to run. I don't want to use the simulator, just your rest API web functions.
I add :
RUN apt-get update && apt-get install --yes --no-install-recommends python-tk
to the DockerFile and the image builds. However it fails to start with the following:
[2022-10-02 15:21:08 -0700] [7] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.10/site-packages/gunicorn/util.py", line 359, in import_app
mod = importlib.import_module(module)
File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/app/app.py", line 11, in <module>
from pixoo.pixoo import Channel, Pixoo
File "/usr/app/pixoo/pixoo/__init__.py", line 10, in <module>
from .simulator import Simulator, SimulatorConfig
File "/usr/app/pixoo/pixoo/simulator.py", line 5, in <module>
from pixoo import Palette
ImportError: cannot import name 'Palette' from 'pixoo' (unknown location)
Thanks for your work and help!
Achim klingt deutsch, daher bin ich mal so frei: Ich bin jetzt durch Zufall auf deine Swagger-Integration gestoßen... Super Sache - danke dafür! Nun zum Thema:
Unter http://doc.divoom-gz.com/web/#/12?page_id=89 steht eine offizielle API-Beschreibung zur Verfügung. Vielleicht sind da noch unentdeckte Funktionen vorhanden.
Spannend dürfte hier insbesondere der Find device command sein. Vielleicht könnte man sich damit die Angabe des PIXOO_HOST sparen und automatisiert im Netzwerk nach dem Gerät suchen?
Hello and thank you for your work on this project!
After creating the .env file as specified in the documentation to the same directory as the app.py file, I need to add to the Dockerfile the following line after the 'COPY app.py .' line
COPY .env .
Fresh install of Ubuntu 20
Followed instructions
Set .env variables
Ran docker-compose up
Site is accessible but when I try to run a command, the IP it uses is the server's IP, not PIXOO_HOST
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.