Appdaemon unsuccessful in calling service "zwave_js/invoke_cc_api"


I am attempting to make use of the LED indicators in a Zooz ZEN32 5-button scene controller.

I have been able successfully write config parameters to the device using the following call:

self.call_service("zwave_js/set_config_parameter", device_id='eeddd26cbccf9afc7550103dd7c37b41', parameter=2 , value=3)

However, when I attempt to call use the service zwave_js/invoke_cc_api (to get additional functionality) I get the following log entries in AppDaemon:

2024-03-24 05:53:31.815401 WARNING HASS: Code: 400, error: 400: Bad Request
2024-03-24 05:53:31.815172 WARNING HASS: Error calling Home Assistant service default/zwave_js/invoke_cc_api

Full code below:

import hassapi as hass

class HelloWorld(hass.Hass):
    def initialize(self):
        self.log("Attempting to call service zwave_js/invoke_cc_api")
        ## Test ZEN32 LED indications:
        self.call_service('zwave_js/invoke_cc_api', device_id='eeddd26cbccf9afc7550103dd7c37b41', command_class='135' , method_name='set', parameters={'indicatorId': 69, 'propertyId': 2, 'value': False})

Full Log:

2024-03-24 05:56:28.767619 WARNING HASS: Code: 400, error: 400: Bad Request
2024-03-24 05:56:28.767375 WARNING HASS: Error calling Home Assistant service default/zwave_js/invoke_cc_api
2024-03-24 05:56:28.763875 INFO hello_world: Attempting to call service zwave_js/invoke_cc_api
2024-03-24 05:56:28.761334 INFO AppDaemon: Calling initialize() for hello_world
2024-03-24 05:56:28.759537 INFO AppDaemon: Loading app hello_world using class HelloWorld from module hello

I am able to successfully accomplish what I want to do from within HA’s Developer Tools, using the following YAML service call:

service: zwave_js.invoke_cc_api
  command_class: '135'
  method_name: set
    - - indicatorId: 0x45
        propertyId: 2
        value: false
  device_id: eeddd26cbccf9afc7550103dd7c37b41

Has anybody else seen something like this, or have an idea where I may be going wrong?

Some additional things I have tried include: restarting AppDaemon, passing the “parameters” as both strings and Booleans/Integers as well as passing the “command_class” as both a string and an integer. All attempts have resulted in WARNING HASS: Code: 400, error: 400: Bad Request


Just a guess, this:

parameters={'indicatorId': 69, 'propertyId': 2, 'value': False}

can be reformatted as:

  indicatorId: 69
  propertyId: 2
  value: False

Which is not the same as:

    - - indicatorId: 0x45
        propertyId: 2
        value: false

The first is an object, the second is a list of a list of objects.

I would try:

parameters=[[{'indicatorId': 69, 'propertyId': 2, 'value': False}]]

But, you should have switch entities that do all of this for you. Do you not see those?

That was it! Thank you so much.

And you are correct - I do have switch entities for turning the indicators on and off. I am trying to use the additional functionality in the Indicator Command Class to make the LED indicators blink/flash. In my case I’m using this functinoality to indicate that the user (myself), via multiple taps of a scene control button, has elected to pause any automation on a given device and hold it in its current state.

The new line is the following, which now results in the indicator light blinking:

        self.call_service("zwave_js/invoke_cc_api", device_id=str('eeddd26cbccf9afc7550103dd7c37b41'), command_class='135' , method_name="set", parameters=[[
            {'indicatorId': 69, 'propertyId': 3, 'value': 17},
            {'indicatorId': 69, 'propertyId': 4, 'value': 255},
            {'indicatorId': 69, 'propertyId': 5, 'value': 0}]])

I did not see a way to flash/blink the indicator from the switches that HA brings in - but I’m pretty new to HA so may be missing something.

For anyone else that comes across this, also see this post where I got some information on what the ZEN32 responds to:


You’re right, the entities are only switches so they only support on/off, not any effects. You are taking the correct approach to blink the indicator given the current HA support.

Maybe a better representation in HA would be a light entity with support for flash effects, still that would not give you full control of the blink frequency.

1 Like