Git Product home page Git Product logo

pixoo1664's Introduction

PIXOO1664

Unofficial Divoom pixoo REST library, beer not included.

To install

pip install pixoo1664

To use:

from pixoo1664 import Pixoo

pixoo = Pixoo("192.168.16.64")

Text

To send text:

pixoo.send_text("Hello there !")

To clear text:

pixoo.clear_text()

Image

To create and send an image:

from PIL import Image, ImageDraw

img = Image.new("RGB", size=(64,64))

draw = ImageDraw.Draw(img)
draw.text(text="Who's the", xy=(3, 10), fill=(255, 43, 43, 255))
draw.text(text="BOSS NOW ??", xy=(3, 20), fill=(43, 255, 43, 255))
draw.line(xy=((0, 20), (64, 20)))

pixoo.send_image(img)

Send gif frames in one call (60ms btw frames)

# list of Image
pixoo.send_images(images, speed=60)

Brightness

Get brightness 0~100

pixoo.get_brightness() # -> 80

Set brightness 0~100

pixoo.set_brightness(90)

Set screen on/off

pixoo.set_screen(True)
pixoo.set_screen(False)

Time

Set system time

pixoo.set_system_time(1672416000)

Get system time

pixoo.get_system_time() # -> 1672416000

Set 24 hour mode (reset when the device power off)

pixoo.set_24_hour_mode(True)

Set 12 hour mode (reset when the device power off)

pixoo.set_24_hour_mode(False)

Temperature mode

Set temperature in Celsius

pixoo.set_temperature_in_celsius(True)

Set temperature in Fahrenheit

pixoo.set_temperature_in_celsius(False)

Screen rotation

Set rotation angle in degree 0, 90, 180 and 270

pixoo.set_rotation_angle(90)

Configuration

Get all settings (https://doc.divoom-gz.com/web/#/12?page_id=243)

pixoo.get_all_conf()
#   {
#     "Brightness":100,
#     "RotationFlag":1,
#     "ClockTime":60,
#     "GalleryTime":60,
#     "SingleGalleyTime":5,
#     "PowerOnChannelId":1,
#     "GalleryShowTimeFlag":1,
#     "CurClockId":1,
#     "Time24Flag":1,
#     "TemperatureMode":1,
#     "GyrateAngle":1,
#     "MirrorFlag":1,
#     "LightSwitch":1
#   }

Page

Set a timer

pixoo.set_timer(minute=1, second=3, start=True)

pixoo1664's People

Contributors

yo1l avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.