🎨 cute little color server
Go to file
sophie d2812df9b5 ignore casing in validation check 2024-04-25 15:56:32 +01:00
client add client 2024-03-28 02:39:56 +00:00
README.md add client 2024-03-28 02:39:56 +00:00
conf.json add client 2024-03-28 02:39:56 +00:00
hue-server.service initial commit 2024-03-28 00:37:33 +00:00
index.js ignore casing in validation check 2024-04-25 15:56:32 +01:00
package.json initial commit 2024-03-28 00:37:33 +00:00

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