{"id":26508821,"url":"https://github.com/adamkdean/pixoo-api","last_synced_at":"2025-08-31T13:36:09.055Z","repository":{"id":65176021,"uuid":"585703895","full_name":"adamkdean/pixoo-api","owner":"adamkdean","description":"Pixoo API that doesn't suck","archived":false,"fork":false,"pushed_at":"2023-01-12T15:54:37.000Z","size":38,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-24T13:44:18.016Z","etag":null,"topics":["divoom","pixoo","pixoo64"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamkdean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-05T21:18:07.000Z","updated_at":"2025-07-07T07:49:27.000Z","dependencies_parsed_at":"2023-02-09T12:30:32.492Z","dependency_job_id":null,"html_url":"https://github.com/adamkdean/pixoo-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adamkdean/pixoo-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkdean%2Fpixoo-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkdean%2Fpixoo-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkdean%2Fpixoo-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkdean%2Fpixoo-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamkdean","download_url":"https://codeload.github.com/adamkdean/pixoo-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamkdean%2Fpixoo-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272988777,"owners_count":25026959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["divoom","pixoo","pixoo64"],"created_at":"2025-03-21T00:38:12.149Z","updated_at":"2025-08-31T13:36:09.012Z","avatar_url":"https://github.com/adamkdean.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pixoo API\n\nPixoo API that doesn't suck.\n\nI've based this API on a number of sources, including the [Official Pixoo API](http://doc.divoom-gz.com/web/#/12?page_id=243) (which isn't great), a bunch of open source projects, and a lot of trial and error. Please open an issue if you find any bugs.\n\n## Install\n\n```\nnpm i pixoo-api\n```\n\n## Usage\n\nTo use the PixooAPI class, you need to import it in your JavaScript file:\n\n```js\nimport { PixooAPI } from 'pixoo-api'\n```\n\nThen you can create an instance of the PixooAPI class by calling the constructor with the address of the server to connect to and the size of the canvas in pixels (optional, default value is 64):\n\n```js\nconst pixoo = new PixooAPI('192.168.1.100', 64)\n```\n\nBefore using the instance, you should initialize it by calling the initialize method:\n\n```js\nawait pixoo.initialize()\n```\n\nThis will reset the push counter and send the current buffer to the server.\n\n### Methods\n\nThe PixooAPI class has several methods that you can use to manipulate the canvas and send the updates to the server:\n\n- `clear()`: fill the canvas with black pixels.\n- `fill(color)`: fill the canvas with the given color.\n- `drawPixel(x, y, color)`: draw a pixel at the given coordinates with the given color.\n- `drawChar(char, position, color, font?)`: draw a character at the given position with the given color.\n- `drawText(text, position, color, font?)`: draw a text on the canvas at the given coordinates with the given color.\n- `drawTextCenter(text, y, color, font?)`: draw a text centered on the canvas on the given horizontal line (y) with the given color.\n- `drawTextLeft(text, y, color, padding, font?)`: draw a text on the left side of the canvas on the given horizontal line (y) with the given color and padding.\n- `drawTextRight(text, y, color, padding, font?)`: draw a text on the right side of the canvas on the given horizontal line (y) with the given color and padding.\n- `drawRect(start, end, color, fill = false)`: draw a rectangle on the canvas between the given coordinates with the given color. If `fill` is true, the rectangle will be filled with the given color.\n- `drawLine(start, end, color)`: draw a line on the canvas between the given coordinates with the given color.\n- `drawImage(path, pos, size)`: draw an image on the canvas at the given position with the given size.\n- `push()`: send the current buffer to the server.\n\nYou can also use the following getters to retrieve information about the canvas and the server connection:\n\n- `buffer`: get the current pixel buffer.\n- `pushCount`: get the number of times the push() method has been called.\n- `pushAvgElapsed`: get the average elapsed time of the push() method in milliseconds.\n\nThere are also a number of methods that map directly to the Pixoo API, check the `lib/api.js` file for more information.\n\nFor example, to draw a red pixel at coordinates (10, 10) and send the update to the server, you can do:\n\n```js\npixoo.drawPixel(10, 10, [255, 0, 0])\nawait pixoo.push()\n```\n\n## License\n\nGNU General Public License v3.0.\n\nSee [LICENSE](LICENSE) to see the full text.\n\nSome parts of this project are based on community projects, and comments in the code indicate the original author and the license of the original code.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamkdean%2Fpixoo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamkdean%2Fpixoo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamkdean%2Fpixoo-api/lists"}