{"id":15655517,"url":"https://github.com/sparten11740/allmylights","last_synced_at":"2025-05-05T14:42:07.016Z","repository":{"id":153164825,"uuid":"317865936","full_name":"sparten11740/allmylights","owner":"sparten11740","description":"Sync your RGB devices through MQTT with OpenRGB, your Desktop Wallpaper, Chroma devices, and more to come","archived":false,"fork":false,"pushed_at":"2023-11-15T12:14:34.000Z","size":182,"stargazers_count":31,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T21:51:10.858Z","etag":null,"topics":["broker","chroma","home-automation","lighting","mqtt","openrgb","rgb","rgb-led","smart-home"],"latest_commit_sha":null,"homepage":"","language":"C#","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/sparten11740.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-02T13:10:31.000Z","updated_at":"2025-02-16T10:13:05.000Z","dependencies_parsed_at":"2023-11-15T13:30:20.104Z","dependency_job_id":"a098896e-19f1-4637-895f-7e32b234fc0b","html_url":"https://github.com/sparten11740/allmylights","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparten11740%2Fallmylights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparten11740%2Fallmylights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparten11740%2Fallmylights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparten11740%2Fallmylights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sparten11740","download_url":"https://codeload.github.com/sparten11740/allmylights/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252516161,"owners_count":21760738,"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","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":["broker","chroma","home-automation","lighting","mqtt","openrgb","rgb","rgb-led","smart-home"],"created_at":"2024-10-03T12:59:35.230Z","updated_at":"2025-05-05T14:42:06.995Z","avatar_url":"https://github.com/sparten11740.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿[![test](https://github.com/sparten11740/allmylights/actions/workflows/test.yml/badge.svg)](https://github.com/sparten11740/allmylights/actions/workflows/test.yml) [![build](https://github.com/sparten11740/allmylights/actions/workflows/build.yml/badge.svg)](https://github.com/sparten11740/allmylights/actions/workflows/build.yml)\r\n\r\n#  allmylights \r\n## What am I?\r\nI am a command line app that synchronizes your ambient lighting and RGB \r\nperipherals. I serve as a broker that consumes input values through MQTT and \r\nother sources, and applies those to a number of configurable \r\nsinks. Those can be an OpenRGB instance, Chroma enabled devices, or your Desktop \r\nwallpaper.\r\n\r\n\r\n[View demo on YouTube](https://www.youtube.com/watch?v=1Y9CBZFACro\u0026ab_channel=JanWendland)\r\n\r\n## Dependencies\r\n### OpenRGB\r\nOpenRGB is one of the supported options to control the RGB peripherals of your\r\nhost system. \r\n\r\n\u003e Open source RGB lighting control that doesn't depend on manufacturer software. \r\n\u003e Supports Windows and Linux.\r\n\r\nYou can download the OpenRGB binaries in the \r\n[release section of the project's gitlab](https://gitlab.com/CalcProgrammer1/OpenRGB/-/releases)\r\n\r\nFollow [these instructions](https://gitlab.com/CalcProgrammer1/OpenRGB/-/wikis/Frequently-Asked-Questions#can-i-have-openrgb-start-automatically-when-i-log-in) \r\nto run a minimized OpenRGB server when logging in to your machine.\r\n\r\nFor questions around the detection of your devices, please refer to the OpenRGB \r\ncommunity. \r\n\r\n### MQTT Server\r\nInputs such as profile names, or color strings are received through subscription \r\nof an [MQTT](https://mqtt.org/) topic. \r\n\r\n\u003e MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT).\r\n\u003e It is designed as an extremely lightweight publish/subscribe messaging \r\n\u003e transport that is ideal for connecting remote devices with a small code \r\n\u003e footprint and minimal network bandwidth\r\n\r\nGiven that you are looking at this page, you probably have a smart home \r\nframework in place already and want to integrate with it. Chances are that \r\nyou are using MQTT as part of that setup. In that case you can go ahead and \r\nskip the rest of this section. If you're using a smart home framework without \r\nMQTT, please refer to the following resources for getting your MQTT server \r\nstarted and integrated.\r\n\r\n#### OpenHAB Integration\r\n\u003e An OpenRGB Binding for OpenHAB does not exist. However, it is something \r\n\u003e that would be easy to implement.\r\n\r\nOpenHAB has a binding that connects with an MQTT broker. Install the broker \r\n[Mosquitto](https://mosquitto.org/) on your device running OpenHAB and afterwards \r\nproceed installing the [MQTT Binding](https://www.openhab.org/addons/bindings/mqtt/).\r\n\r\nYou could then create a rule along the lines (using the rules DSL):\r\n\r\n```kotlin\r\n\"Set RGB value\"\r\n    when\r\n        Item My_Color_Item received command\r\n    then\r\n    \r\n    val actions = getActions(\"mqtt\",\"mqtt:broker:mosquitto\")\r\n    \r\n    val HSBType hsb = receivedCommand as HSBType\r\n    val Color color = Color::getHSBColor(hsb.hue.floatValue / 360, hsb.saturation.floatValue / 100, hsb.brightness.floatValue / 100)\r\n    val String rgb = String::format(\"%1$02x%2$02x%3$02xFF\" , color.red, color.green, color.blue)\r\n\r\n    actions.publishMQTT(\"stat/open-rgb/RESULT\", rgb)\r\nend\r\n```\r\n\r\n##  Installation\r\n### Using the binaries \r\nDownload the binaries for your target platform in the \r\n[releases section](https://github.com/sparten11740/allmylights/releases) (stable) \r\nor from the uploaded artifacts of the \r\n[most recent workflow runs](https://github.com/sparten11740/allmylights/actions). \r\nPlace them in your desired target location. You can also clone this repository \r\nand build the project yourself.\r\n\r\n### Building the project yourself\r\n\u003e In order to build the binaries for Windows, you have to use a Windows machine. \r\n\u003e This is because of a framework dependency on `Microsoft.WindowsDesktop.App` \r\n\u003e that is only available on Windows. However, MacOS and Linux binaries can be \r\n\u003e built and published from any host system.\r\n \r\nFirst you need to install the \r\n[Visual Studio Community Edition 2019](https://visualstudio.microsoft.com/vs/) \r\non your machine.\r\n\r\nMake sure `dotnet` is available in your path and run the following command from \r\nthe project root to build a standalone `.exe` (Windows):\r\n\r\n```sh\r\ndotnet publish --runtime win-x64 --configuration Release -p:PublishSingleFile=true --self-contained false\r\n```\r\n\r\nRun the following if you want the application to work on a target without the \r\n.NET runtime installed:\r\n\r\n```sh\r\ndotnet publish --runtime win-x64 --configuration Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true\r\n```\r\n\r\n## Configuration\r\nThe required parameters such as connection details are provided in a \r\nconfiguration file called `allmylightsrc.json` (default). Hereinafter, I will \r\nadivse on what this file should look like to satisfy your requirements. \r\n\r\nA number of usage examples can also be found in \r\n[the wiki](https://github.com/sparten11740/allmylights/wiki).\r\n\r\nThe configuration distinguishes between \r\n- sources, that provide values to the app\r\n- transformations, that alter those values\r\n- sinks, that consume and apply those values\r\n- (optional routes that define from which sources to what sinks those values travel)\r\n\r\nAny value emitted by a source is routed to all sinks unless routes are specified.\r\n\r\nThe structure of the `allmylightsrc.json` is the following:\r\n\r\n```json5\r\n// allmylightsrc.json\r\n\r\n{\r\n  \"Sources\":  [\r\n    // ... see available options below\r\n  ],\r\n  \"Sinks\": [\r\n    // ... see available options below\r\n  ],\r\n  \"Routes\": [\r\n    // ... see route section\r\n  ]\r\n}\r\n```\r\nAvailable source, sink, and transformation types are:\r\n\r\n| Type           | Options                                      |\r\n| ---------------| ---------------------------------------------|\r\n| Source         | `Mqtt`, `OpenRGB`                            |\r\n| Sink           | `OpenRGB`, `Wallpaper`, `Chroma`, `Mqtt`     | \r\n| Transformation | `JsonPath`, `Color`, `Mapping`, `Expression` |\r\n\r\n\r\n### Sources\r\nSources produce values that are eventually consumed by sinks. All sources have a \r\n`Transformations` property in common. Therein you can define transformations \r\nthat alter the value emitted by the source to suit your requirements.\r\n\r\n#### MQTT\r\nThe MQTT source subscribes to a topic and emits all values that are published to \r\nthat topic.\r\n\r\n```json5\r\n{\r\n  // optional id that can be used to define routes\r\n  \"Id\": \"my-mqtt-source\",\r\n  \"Type\" : \"Mqtt\",\r\n  \"Server\": \"192.168.1.20\",\r\n  \"Port\": 1883,\r\n  \"Topics\": {\r\n    // optional command topic that is used to request the current color on startup\r\n    \"Command\": \"cmnd/sonoff-1144-dimmer-5/color\",\r\n    \"Result\": \"stat/sonoff-1144-dimmer-5/RESULT\"\r\n  },\r\n  // transformations are applied in order on any received message \r\n  \"Transformations\": [\r\n    // ... see section transformations for options\r\n  ]\r\n}\r\n```\r\n\r\n\r\n#### OpenRGB\r\nThe OpenRGB source continueously polls your configured OpenRGB server and emits \r\nan object that contains the colors per device whenever a device state changes.\r\n\r\n```json5\r\n{\r\n  // optional id that can be used to define routes\r\n  \"Id\": \"my-openrgb-source\",\r\n  \"Type\" : \"OpenRGB\",\r\n  \"Server\": \"127.0.0.1\",\r\n  \"Port\": 6742,\r\n  // controls how often OpenRGB is asked for changes, default is 1000ms\r\n  \"PollingInterval\": 1000,\r\n  // transformations are applied in order on any received message \r\n  \"Transformations\": [\r\n    // ... see section transformations for options\r\n  ]\r\n}\r\n```\r\n\r\nThe produced value is of type `Dictionary\u003cstring, DeviceState\u003e` where the\r\nkey is the name of your OpenRGB device and `DeviceState` is a struct that\r\nhas the following properties:\r\n\r\n```csharp\r\npublic struct DeviceState\r\n{\r\n    public IEnumerable\u003cColor\u003e Colors;\r\n}\r\n```\r\n\r\nTo extract values from it, use the [`Expression`](#expression) transformation such as \r\n\r\n```json5\r\n{\r\n  \"Type\": \"Expression\",\r\n  \"Expression\": \"value[\\\"Corsair H150i PRO RGB\\\"].Colors.Cast().First().ToCommaSeparatedRgbString()\"\r\n}\r\n```\r\n\r\n### Sinks\r\nSinks conclude the transformation process and consume values. A sink can define \r\ntransformations which are applied on the value **before** it is consumed by the sink.\r\n\r\n#### OpenRGB\r\nThe OpenRGB sink can receive values of type `System.Drawing.Color` or `string`.\r\n\r\nColors are applied to all devices connected to your OpenRGB instance \r\nunless specified otherwise in the sink's `Overrides` property. A color type can \r\nbe converted from a string (such as `#FF0022` or `Red`) by adding a `Color` \r\ntransformation to the sink.\r\n\r\nString values received by the sink have to be valid OpenRGB profile names such \r\nas `MyProfile.orp`. They end in `.orp` and have to exist on your OpenRGB host. \r\nNote that a working version of the profile management API was only added in \r\ncommit `f63aec11` to OpenRGB. Please make sure that you have an up-to-date \r\nversion on your machine.\r\n\r\n```json5\r\n{\r\n  // optional id that can be used to define routes\r\n  \"Id\": \"my-openrgb-sink\",\r\n  \"Type\": \"OpenRGB\",\r\n  \"Server\": \"127.0.0.1\", \r\n  \"Port\": 6742,\r\n  // if you want to override certain OpenRGB controlled devices you can do so here\r\n  \"Overrides\": {\r\n    // ignore an entire device\r\n    \"Razer Copperhead\": {\r\n      \"Ignore\": true,\r\n    },\r\n    \"MSI Mystic Light MS_7C84\": {\r\n      \"Zones\": {\r\n        // configure what color is passed to what channel of a zone\r\n        \"JRGB2\": {\r\n          \"ChannelLayout\": \"GRB\"\r\n        },\r\n        // ignore a single zone of a device\r\n        \"JRAINBOW1\": {\r\n          \"Ignore\": true\r\n        }\r\n      }\r\n    }\r\n  },\r\n  // transformations can also be applied before a sink consumes a value\r\n  \"Transformations\" : []\r\n}\r\n```\r\n\r\n#### MQTT\r\nThe MQTT sink publishes any value it consumes to all configured topics.\r\n\r\n```json5\r\n{\r\n  // optional id that can be used to define routes\r\n  \"Id\": \"my-mqtt-sink\",\r\n  \"Type\" : \"Mqtt\",\r\n  \"Server\": \"192.168.1.20\",\r\n  \"Port\": 1883,\r\n  // Optional username, remove if not required\r\n  \"Username\": \"\",\r\n  // Optional password, remove if not required\r\n  \"Password\": \"\",\r\n  \"Topics\": [ \"some/topic\", \"another/topic\" ],\r\n  \"Transformations\": [\r\n    // ... see section transformations for options\r\n  ]\r\n}\r\n```\r\n\r\n#### Wallpaper\r\nThe Wallpaper sink currently only works on Windows machines and only if you \r\nrun the app on the host machine itself. It can receive values of type `string`\r\nwhich have to be valid file paths to apply the same wallpaper to all screens \r\nor multiple file paths keyed by screen index to apply different wallpapers \r\nindividually (see [this wiki example](https://github.com/sparten11740/allmylights/wiki/Loading-a-profile-\u0026-setting-invidual-backgrounds-per-monitor) for the latter). The command line flag \r\n`--info` can be used to print available \r\nscreen indexes. If `RelativeTo` is specified, the command also prints available \r\nfiles under that directory.\r\n\r\n```json5\r\n{\r\n  // optional id that can be used to define routes\r\n  \"Id\": \"my-wallpaper-sink\",\r\n  \"Type\": \"Wallpaper\",\r\n  // if the input value is a relative path or file name and RelativeTo is specified, it will be prepended to the input value\r\n  \"RelativeTo\": \"C:\\\\Users\\\\brucewayne\\\\Pictures\\\\Wallpaper\",\r\n  \"Transformations\": [\r\n    // one could for example map from a color to a filename here, see transformation options down below\r\n  ]\r\n}\r\n```\r\n\r\n#### Chroma\r\nThe Chroma sink controls the RGB of your Chroma enabled devices. You can provide \r\nvalues of type `System.Drawing.Color` (returned by the `Color` transformation) \r\nor `string`.\r\n\r\nIt depends on the Razer Synapse software on your machine with the Chroma Connect \r\nmodule added.\r\n\r\nAny `System.Drawing.Color` received will be applied to all devices listed in \r\n`SupportedDevices` as static effect.\r\n\r\nAny `string` received must be valid JSON and conform to the expected Chroma SDK \r\nstructure. Examples of valid inputs can be found in the \r\n[Razer Chroma SDK REST Documentation](https://assets.razerzone.com/dev_portal/REST/html/md__r_e_s_t_external_04_8mouse.html)\r\n\r\n\r\n```json5\r\n{\r\n  // optional id that can be used to define routes\r\n  \"Id\": \"my-chroma-sink\",\r\n  \"Type\": \"Chroma\",\r\n  \"SupportedDevices\": [\r\n    // can be any combination of the following\r\n    \"keyboard\",\r\n    \"mouse\",\r\n    \"headset\",\r\n    \"mousepad\",\r\n    \"keypad\",\r\n    \"chromalink\"\r\n  ]\r\n}\r\n```\r\n\r\n### Transformations\r\n#### JsonPath\r\nThis transformation can be used for extracting values from a JSON input.\r\n\r\n```json\r\n  { \"Type\": \"JsonPath\", \"Expression\": \"$.data[0].color\" }\r\n```\r\n\r\nFor further information on how to extract a value from JSON using `JsonPath` \r\nexpressions, please refer to \r\n[this documentation](https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html). \r\n\r\n\r\n#### Color\r\nThis transformation is used to deal with the type conversion from an input \r\nstring to a Color type that can be consumed by a sink that expects such.\r\n\r\n```json\r\n  { \"Type\": \"Color\", \"ChannelLayout\": \"RGBA\" }\r\n```\r\n\r\nSupported values are hex strings such as the following `#f2d`, `#ed20ff`, \r\n`#2020ffed` and color names where the name can be any \r\n[known color](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.knowncolor?view=net-5.0).\r\n\r\nIt also supports the optional property `ChannelLayout` to deal with cases where\r\nthe channels of a color in the hex string are mixed up for some reason such as \r\nf.i. when the first hex number does not correspond with red but with green. \r\nPossible values are any string of up to 4 characters containing `R`, `G`, `B`, \r\nor `A` for alpha. Also `_` can be used to ignore values, for instance if you had\r\nan RGBA hex string, you could use the channel layout `RGB_` to ignore the alpha \r\nvalue which then will default to `Oxff` (255). The default for ignored color \r\nchannels is `0x00` (0);\r\n\r\n#### Mapping\r\nThis transformation is used to map an input value to an output value. It can be \r\nprovided a number of mappings where the first matching one is used to map the \r\ninput value. Per default `FailOnMiss` is false so that input values that are not\r\nmatched by any mapping are simply passed through.\r\n\r\nThe `From` property of a mapping expects a regular expression. Please make sure \r\nthat you escape any control characters if your goal is a simple string match.\r\n\r\n```json\r\n  {\r\n    \"Type\": \"Mapping\",\r\n    \"FailOnMiss\":  false,\r\n    \"Mappings\": [\r\n      {\r\n        \"From\": \"#?FFFFFF.+\",\r\n        \"To\": \"#ff0000\"\r\n      }\r\n    ]\r\n  }\r\n```\r\n\r\n#### Expression\r\nThis transformation is used to transform a value by applying advanced logic. Any \r\nexpression covered in the \r\n[simple expression section](https://github.com/codingseb/ExpressionEvaluator/wiki/Getting-Started#simple-expressions) of the ExpressionEvaluator repo \r\ncan be evaluated by this transformation. The input value provided to this \r\ntransformation is made available to the context of the expression as `value`.\r\n\r\nNon primitive types are also supported. For instance by prepending a color \r\ntransformation, any method or property defined in the `System.Drawing.Color` \r\n([documentation](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.color?view=net-5.0)) \r\nbecomes available in the expression context on value.\r\n\r\n\r\n```json\r\n  {\r\n    \"Type\": \"Expression\",\r\n    \"Expression\":  \"value.B \u003e value.R \u0026\u0026 value.B \u003e value.G ? \\\"Blueish\\\" : \\\"Some other color\\\"\"\r\n  }\r\n```\r\n\r\n### Routes\r\nA route connects a source to one or more sinks. If any route is defined in\r\nyour `allmylightsrc.json`, the default behaviour of values being emitted\r\nto all sinks is no longer applied. Each sink has to be connected to at least\r\none source explicitly to receive values.\r\n\r\nAs a prerequisite to using routes, you need to specify IDs on your sinks and\r\nsources. A route has the following structure:\r\n\r\n\r\n```json5\r\n  // allmylightsrc.json\r\n  //...\r\n  \"Routes\": [\r\n    {\r\n      // valid ID of a source defined in your config\r\n      \"From\": \"my-mqtt-source\",\r\n      // valid IDs of sinks defined in your config\r\n      \"To\": [ \"my-openrgb-sink\", \"my-chroma-sink\"]\r\n    }\r\n  ]\r\n```\r\n\r\nInitial validation will make you aware of any unconnected sinks or sources on \r\nstartup (warning). Referencing a non-existing ID will prevent startup.\r\n\r\n## Run me\r\n### Windows\r\nBefore you start, download and install the .NET core runtime \r\n[here](https://dotnet.microsoft.com/download). \r\n\r\nYou can run the app as simple as follows (assuming the \r\n`allmylightsrc.json` resides in the same directory as the executable)\r\n\r\n```powershell\r\n.\\AllMyLights.exe\r\n```\r\n\r\nYou can also change the log level to one of the following: \r\n`info`, `debug`, `warn`, `error`, `off`.\r\n\r\n```powershell\r\n.\\AllMyLights.exe --config /config/elsewhere/allmylightsrc.json --log-level off\r\n```\r\n\r\n### Linux\r\nAs a prerequisite follow \r\n[Microsoft's instructions](https://docs.microsoft.com/en-us/dotnet/core/install/linux) \r\nto install the .NET Core runtime or alternatively build the project yourself \r\nwith the `--self-contained` flag set to `true`. The latter results in a \r\nframework independant binary.\r\n\r\nYou can run the app by simply calling (assuming the default config file \r\n`allmylightsrc.json` in the same folder as the binary)\r\n\r\n```sh\r\n./AllMyLights\r\n```\r\n\r\n### Command Line Arguments\r\n\r\n| Argument                                 | Description                                                                                    |\r\n| -----------------------------------------| ---------------------------------------------------------------------------------------------- |\r\n| \u0026#x2011;\u0026#x2011;config                   | Path to the config file that contains the sink \u0026 source settings. Default `allmylightsrc.json` |\r\n| \u0026#x2011;\u0026#x2011;fail-on-unknown-property | Fails if an unknown property is encountered in the provided config file                        |\r\n| \u0026#x2011;\u0026#x2011;export-config-schema-to  | Writes the configuration schema (Open API v3) to the provided filepath.                        |\r\n| \u0026#x2011;\u0026#x2011;log-level                | Change the log level to either debug, info (default), warn, error, or off.                     |\r\n| \u0026#x2011;\u0026#x2011;log-file                 | If provided, log output will additionally be captured in the provided file.                    |\r\n| \u0026#x2011;\u0026#x2011;minimized                | Minimize to tray after startup (Windows only)                                                  |\r\n| \u0026#x2011;\u0026#x2011;info                     | List dynamic information of your sinks such as available options                               |\r\n| \u0026#x2011;\u0026#x2011;enable-autostart         | Generates an autostart entry                                                                   |\r\n\r\n## Autostart\r\n### Windows\r\n#### CLI\r\nA shortcut can be generated in the user startup folder by runningthe following \r\n(the config file `allmylightsrc.json` is expected to reside in the same folder \r\nas the executable, but can be customized by providing the `--config` parameter)\r\n```ps\r\n.\\AllMyLights.exe --enable-autostart\r\n```\r\n#### Manually\r\nCreate a shortcut to your `AllMyLights.exe`, open its properties and change the \r\ntarget to something along the lines:\r\n\r\n```powershell\r\n\"D:\\Program Files\\AllMyLights\\AllMyLights.exe\" --config allmylightsrc.json --minimized true\r\n```\r\n\r\nMove the shortcut to `%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup`\r\n\r\nMake also sure that your OpenRGB server is run on startup as described in the \r\n[OpenRGB Section](#openrgb)\r\n\r\n### Linux\r\n\r\n#### CLI\r\nI can generate a service definition and enable startup on boot (in distributions \r\nusing systemd). Simply call me with elevated privileges using the \r\n`--enable-autostart` flag. I assume that a config file named \r\n`allmylightsrc.json` resides in the same folder as my executable. This can be \r\ncustomized using the `--config` parameter. Also the log level can be changed. \r\nBefore executing the following lines, please make sure that the environment \r\nvariable DOTNET_ROOT is set (f.i. in `/etc/environment`)\r\n\r\n```bash\r\nsudo su\r\n./AllMyLights --enable-autostart --log-level debug\r\n\r\n# double check that I am up and running\r\nservice allmylights status\r\n```\r\n#### Manually\r\n\u003e The following instructions work for Raspbian or any other distribution that \r\n\u003e uses systemd. \r\n\r\nCopy the binary for your platform and the `allmylightsrc.json` to a target \r\ndirectory (f.i. `$HOME/allmylights`) on your machine. Create a service \r\ndefinition using `sudo vi /etc/systemd/system/allmylights.service` and copy the \r\nfollowing configuration:\r\n\r\n```ini\r\n[Unit]\r\nDescription=AllMyLights service to sync colors via MQTT to an OpenRGB instance\r\n\r\n[Service]\r\nWorkingDirectory=/home/pi/allmylights\r\nExecStart=/home/pi/allmylights/AllMyLights --config allmylightsrc.json --log-level info\r\nRestart=always\r\nRestartSec=10\r\nKillSignal=SIGINT\r\nSyslogIdentifier=allmylights\r\nUser=pi\r\nEnvironment=DOTNET_ROOT=/home/pi/dotnet-arm32\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n```\r\nCustomize the `WorkingDirectory` and `ExecStart` to use the folder created in \r\nthe previous step if required. Change the value of `User` to the user you want \r\nthe service to be run as. Also note the `DOTNET_ROOT` environment variable. For \r\nframework dependant binaries, you have to change the path to the directory where \r\nyour .NET Core runtime resides.\r\n\r\nStart the service with `sudo service allmylights start` and check that \r\neverything is running smoothly using `sudo service allmylights status`. \r\nAfterwards use `sudo systemctl enable allmylights` to make systemd automatically \r\nstart your service during boot up.\r\n\r\nMake also sure that the OpenRGB server on the machine you want to control is run \r\non startup as described in the [OpenRGB Section](#openrgb)\r\n\r\n## Attribution\r\n\"[RGB Icon](https://icon-icons.com/icon/rgb/23694)\" by [Elegantthemes](http://www.elegantthemes.com/) licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparten11740%2Fallmylights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparten11740%2Fallmylights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparten11740%2Fallmylights/lists"}