{"id":30737762,"url":"https://github.com/ppostma/milight-v6-api","last_synced_at":"2025-10-05T09:55:09.868Z","repository":{"id":52454664,"uuid":"116292938","full_name":"ppostma/milight-v6-api","owner":"ppostma","description":"Ruby API for the Milight Wifi Bridge (or Wifi iBOX controller) version 6.","archived":false,"fork":false,"pushed_at":"2021-10-16T12:04:31.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-24T21:14:59.987Z","etag":null,"topics":["limitlessled","milight","milight-controller","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ppostma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-04T18:21:12.000Z","updated_at":"2025-03-01T09:33:53.000Z","dependencies_parsed_at":"2022-09-13T17:51:33.853Z","dependency_job_id":null,"html_url":"https://github.com/ppostma/milight-v6-api","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ppostma/milight-v6-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppostma%2Fmilight-v6-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppostma%2Fmilight-v6-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppostma%2Fmilight-v6-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppostma%2Fmilight-v6-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppostma","download_url":"https://codeload.github.com/ppostma/milight-v6-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppostma%2Fmilight-v6-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273517215,"owners_count":25119765,"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-09-03T02:00:09.631Z","response_time":76,"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":["limitlessled","milight","milight-controller","ruby"],"created_at":"2025-09-03T21:47:33.395Z","updated_at":"2025-10-05T09:55:04.813Z","avatar_url":"https://github.com/ppostma.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Milight Wifi Bridge v6 Ruby API\n\n[![Gem Version](https://badge.fury.io/rb/milight-v6.svg)](https://badge.fury.io/rb/milight-v6)\n[![Build Status](https://github.com/ppostma/milight-v6-api/actions/workflows/test.yml/badge.svg)](https://github.com/ppostma/milight-v6-api/actions)\n[![Code Climate](https://codeclimate.com/github/ppostma/milight-v6-api/badges/gpa.svg)](https://codeclimate.com/github/ppostma/milight-v6-api)\n\nThis gem provides a Ruby API for the Mi-Light Wifi Bridge using protocol version 6.\n\nSupported devices are the Mi-Light WiFi iBox models 1 and 2. The [esp8266_milight_hub](https://github.com/sidoh/esp8266_milight_hub) should also work, but I haven't tested this yet.\nThe bridges sold under the brand MiBoxer (such as model WL-Box1) are not supported by this gem.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'milight-v6'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install milight-v6\n\n## Usage\n\n### Connecting to a Mi-Light controller\n\nConnect to a Mi-Light controller by creating an instance of `Milight::V6::Controller` and supplying the IP address of the Mi-Light Wifi Bridge. If you don't know the IP address, you can use the class method `search` to discover devices on the local network.\n\n```ruby\nrequire \"milight/v6\"\n\ncontroller = Milight::V6::Controller.new(\"192.168.178.33\")\n\ncontrollers = Milight::V6::Controller.search\n```\n\n### Sending commands\n\nFirst select what you want control: the bridge lamp, a specific zone or all zones. Then you can start sending commands. See [Milight::V6::All](lib/milight/v6/all.rb), [Milight::V6::Bridge](lib/milight/v6/bridge.rb) and [Milight::V6::Zone](lib/milight/v6/zone.rb) for the supported commands.\n\nSome examples:\n\n```ruby\ncontroller.zone(1).on\n\ncontroller.zone(2).on\ncontroller.zone(2).warm_light.brightness(70)\n\ncontroller.zone(3).on\ncontroller.zone(3).hue(Milight::V6::Color::BLUE).saturation(10)\n\ncontroller.bridge.on\ncontroller.bridge.brightness(50)\n\ncontroller.all.off\n```\n\nThe commands will be sent with an interval of 100ms, to prevent commands being dropped by the controller. You can change or disable this by setting the `wait` parameter when creating an instance of `Milight::V6::Controller`, for example:\n\n```ruby\ncontroller = Milight::V6::Controller.new(\"192.168.178.33\", wait: false)  # don't delay commands\n\ncontroller = Milight::V6::Controller.new(\"192.168.178.33\", wait: 0.05)   # delay commands for 50 ms\n```\n\n## Command line\n\nA command line tool is included which can be used to control the lights.\n\nUsage: milight \u0026lt;host\u0026gt; \u0026lt;command\u0026gt; [zone]\n\nSupported commands: search, on, off, link, unlink\n\nExamples:\n\n```bash\n$ milight search               # search for devices\n$ milight 192.168.178.33 on 1  # turn on lights for zone 1\n$ milight 192.168.178.33 off   # turn off lights for all zones\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ppostma/milight-v6-api.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppostma%2Fmilight-v6-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppostma%2Fmilight-v6-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppostma%2Fmilight-v6-api/lists"}