Error when adding custom watcher

Hi all

I tried to use a custom watcher. I basically copied the QRCodeDetector and changed it to detect colors. However, I get the following error:

Folder structure when uploading to /apps is the following:

    • index.html
    • main.js
    • [some other files]
    • watchers
      • color-detector

What am I doing wrong?

Hi @Yves,

The folder structure seems fine.

Please make sure that the name of your Custom Watcher (ColorDetector) is the same as the name declared in the web application. That error should represent this incompatibility.

I check everything and the names are identical:
const colorWatcher = {
name: ‘ColorDetector’,
logger = logging.getLogger(“lampix.ColorDetector”)
class ColorDetector(Watcher):

Error message:
Something went wrong while trying to execute the request received from JS
Traceback (most recent call last):
File “lampix/”, line 36, in lampix.cefbridge.CefBridge.javascript_request_listener
File “lampix/applications/”, line 250, in lampix.applications.webapp.WebAppController.add_watchers
KeyError: u’ColorDetector’

Any ideas?

Hi @Yves,

If the watcher names match, try setting a ‘watchers’ key, in ‘lampixConfig’ that can be found in the package.json file of your application. Here is an example:

Let us know if this helps.