sophie d2812df9b5 | ||
---|---|---|
client | ||
README.md | ||
conf.json | ||
hue-server.service | ||
index.js | ||
package.json |
README.md
hue-server
server to advertise a certain color
usage
to set a color;
$ curl -d "1c1c1c" example.com/api/hue
$ curl -d "#FF0000" example.com/api/hue
to get a color;
$ curl -d "#FF0000" example.com/api/hue
conf.json
{
"port": 8003,
"path": "/api/hue",
"client": true,
"auth": ":passwd",
"defaultColor": "EEBFFF"
}
port
is the port hue-server listens on
path
is the path to the api endpoint on your server's domain
client
not required, enable to serve an automatically changing color webapp on /client
(appended to path
)
auth
set to require authentication on the endpoint via http auth, a colon is required even if you just want a token. set to empty string or null to disable http auth
defaultColor
default color when starting server. may NOT include leading #
ntfy integration
this is useful when building something that you want to update in real-time based on your current published hue
to enable, add at least ntfyEndpoint
to your config, for example;
"ntfyEndpoint": "ntfy.sh/my-hue-server",
"ntfyAuth": "tk_abcdef..."
ntfyEndpoint
full url to your notify topic to publish color changes on
ntfyAuth
if authentication is required to publish on the topic, set to a token of an account with the permissions on your server