parkerjfl / JellyfishLightingAPIExplorer

This repo contains and API Explorer app, source code, and documentation for the Jellyfish Lighting API
23 stars 2 forks source link

Invalid file name in runPattern will lock-up controller - requires hard reset to recover #2

Open dotchance opened 3 years ago

dotchance commented 3 years ago

Sending an invalid file name in the runPattern call will result in the controller locking up and not processing any further commands. Controller is still available via SSH, but web socket will fail to respond further.

example valid command (from documentation): '{"cmd":"toCtlrSet","runPattern":{"file":"Christmas/Christmas Tree","data":"","id":"","state":1,"zoneName":["Zone", "Zone1"]}}' example command that causes the system to fail (note: file foo/bar does not exist on system). '{"cmd":"toCtlrSet","runPattern":{"file":"foo/bar","data":"","id":"","state":1,"zoneName":["Zone", "Zone1"]}}'

Recommendation: send back failure message if pattern file isn't found.

Note: The system should have a failure response message in its API.