Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PKG=`basename $PWD`
DEST=../build
rm -rf ../build
if [ ! -d node_modules ]; then
npm ci --verbose || exit;
fi
mkdir -p ../build || exit
for f in *; do
if [ "$f" != "node_modules" ] && \
[ "$f" != "build.sh" ] && \
[ "$f" != "images" ]
then
cp -rv $f ../build
fi
done
cd ../build || exit
npm pkg delete devDependencies || exit
cd ../$PKG || exit
tar -zcvf ../$PKG.tar.gz -C ../build . || exit
rm -rf ../build
71 changes: 25 additions & 46 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
"required": true,
"description": "Projector Accessory name"
},
"ip": {
"title": "IP",
"type": "string",
"description": "IP address, will skip discovery if set",
"required": false
},
"tuyaId": {
"title": "Tuya ID",
"type": "string",
Expand All @@ -40,11 +46,11 @@
"description": "Tuya Key / API Secret",
"required": true
},
"ip": {
"title": "IP",
"tuyaVersion": {
"title": "Tuya API Version",
"type": "string",
"description": "Device IP",
"required": false
"description": "Tuya API Version (some newer models require 3.5)",
"placeholder": "3.3"
},
"manufacturer": {
"name": "Manufacturer",
Expand Down Expand Up @@ -152,15 +158,11 @@
"oneOf": [
{
"title": "Flash",
"enum": [
"FLASH"
]
"enum": ["FLASH"]
},
{
"title": "Breath",
"enum": [
"BREATH"
]
"enum": ["BREATH"]
}
],
"condition": {
Expand All @@ -186,45 +188,31 @@
"oneOf": [
{
"title": "Red",
"enum": [
"RED"
]
"enum": ["RED"]
},
{
"title": "Blue",
"enum": [
"BLUE"
]
"enum": ["BLUE"]
},
{
"title": "Green",
"enum": [
"GREEN"
]
"enum": ["GREEN"]
},
{
"title": "Yellow",
"enum": [
"YELLOW"
]
"enum": ["YELLOW"]
},
{
"title": "Orange",
"enum": [
"ORANGE"
]
"enum": ["ORANGE"]
},
{
"title": "Purple",
"enum": [
"PURPLE"
]
"enum": ["PURPLE"]
},
{
"title": "Cyan",
"enum": [
"CYAN"
]
"enum": ["CYAN"]
}
]
},
Expand Down Expand Up @@ -256,33 +244,26 @@
"buttonText": "Add Projector",
"items": [
"projectors[].name",
"projectors[].ip",
"projectors[].tuyaId",
"projectors[].tuyaKey",
"projectors[].ip",
"projectors[].tuyaVersion",
{
"key": "projectors[]",
"type": "section",
"title": "Branding",
"expandable": true,
"expanded": false,
"orderable": false,
"items": [
"projectors[].manufacturer",
"projectors[].model",
"projectors[].serialNumber"
]
"items": ["projectors[].manufacturer", "projectors[].model", "projectors[].serialNumber"]
},
{
"key": "projectors[]",
"title": "Extras",
"expandable": true,
"expanded": false,
"orderable": false,
"items": [
"projectors[].color",
"projectors[].laser",
"projectors[].starRotation"
]
"items": ["projectors[].color", "projectors[].laser", "projectors[].starRotation"]
},
{
"key": "projectors[].scenes",
Expand All @@ -307,9 +288,7 @@
"expanded": false,
"orderable": false,
"buttonText": "Add Color",
"items": [
"projectors[].scenes[].colors[]"
]
"items": ["projectors[].scenes[].colors[]"]
}
]
}
Expand Down Expand Up @@ -338,4 +317,4 @@
]
}
]
}
}
27 changes: 14 additions & 13 deletions example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"platforms": [
{
"name": "StarProjector",
"debug": true,
"debug": false,
"projectors": [
{
"name": "Star Projector Livingroom",
Expand All @@ -19,22 +19,23 @@
"name": "Star Projector Bedroom",
"tuyaId": "asdsadsafasvasfsfs",
"tuyaKey": "12w31231ascasdqasd",
"manufacturer": "Suppou",
"model": "Smart Projector",
"tuyaVersion": "3.5",
"manufacturer": "Blisslights",
"model": "Sky Lite Evolve",
"serialNumber": "1234567890",
"color": true,
"laser": true,
"starRotation": true,
"dps": {
"powerState": 20,
"laserState": 102,
"colorState": 103,
"laserBrightness": 22,
"color": 24,
"rotation": 101,
"scene": 25,
"mode": 21
},
"powerState": 20,
"laserState": 53,
"colorState": 52,
"laserBrightness": 54,
"color": 24,
"rotation": 62,
"scene": 58,
"mode": 51
},
"scenes": [
{
"active": true,
Expand All @@ -56,4 +57,4 @@
"platform": "StarProjector"
}
]
}
}
Loading