joshgetter/hassio-addons

Kasa Camera not start

paveldelpozo opened this issue · 3 comments

Hi, i trying to setup this add-on with this config:

kasausername: [my-kasa-account-email]
kasapassword: [my-kasa-account-password]
cameras:
  - cameraname: salon
    cameraip: 192.168.0.127
    videofilter: transform=clock
  - cameraname: despacho
    cameraip: 192.168.0.158
    videofilter: transform=clock
retrylimit: 5
retrysleep: 30
toggleentity: input_boolean.kasa_camera_enabled

But the log has this message error (and the container appears as stopped in portainer):

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Nginx
Nginx Started
Starting controller
[Controller] Controller is starting.
[Controller] Loading configuration.
Traceback (most recent call last):
  File "/Controller/Controller.py", line 79, in <module>
    main()
  File "/Controller/Controller.py", line 76, in main
    controller.run()
  File "/Controller/Controller.py", line 66, in run
    initialState = self.getToggleValue()
  File "/Controller/Controller.py", line 32, in getToggleValue
    return response["state"] == "on"
KeyError: 'state'
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

If I check the container log, it have exactly the same message...

Any idea?

Removing the toggleentity param from config, the error disappears, but an other error related with videofilter: transform is shown.
Finally removing the videofilter param of both cameras, I have managed to make it work.

I have the version 1.8 of Add-on

Hi @paveldelpozo -

Glad it's working now. Just trying to figure out what may have happened. I see your config had a toggleentity set to input_boolean.kasa_camera_enabled. Did you create that input boolean in Home Assistant? If not that would likely cause the first error you saw. If you don't want to have a toggle to enable/disable the camera stream you can just remove the toggleentity from the config (like you did).

The videofilter option is also optional. I mainly added this to do things like rotating the video. If you don't need to do anything like that, then you can also remove it from the config.

Feel free to re-open the issue if you're trying to use the videofilter option but get an error.