zachowj / node-red-contrib-home-assistant-websocket

Node-RED integration with Home Assistant
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/
MIT License
501 stars 93 forks source link

device node action "unknown_error" #877

Closed select-star-from closed 1 year ago

select-star-from commented 1 year ago

Describe the bug

when attempting to run an action, device node outputs to debug frame: {"code":"unknown_error","message":"Unknown error"}

device is VZM31-SN Inovelli Blue 2-1 Switch using zha on home assistant

ha debug log shows:

2023-03-04 00:23:46.732 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547272488080] Error handling message: Unknown error (unknown_error) from 172.30.32.2 (HomeAssistantSupervisor/2023.01.1 aiohttp/3.8.3 Python/3.10)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy/types/struct.py", line 39, in _convert_type
    return self.type(value)
  File "/usr/local/lib/python3.10/site-packages/zigpy/types/basic.py", line 93, in __new__
    n = super().__new__(cls, *args, **kwargs)
ValueError: invalid literal for int() with base 10: 'Fast_Blink'

The above exception was the direct cause of the following exception:

Capabilities object in Flow.js: "capabilities": [ { "name": "effect_type", "type": "integer", "value": "Fast_Blink" },

My guess is that the value property is meant to be a number but ui is supplying string. Second guess is that it is a problem with zigpy, not node-red.

To Reproduce

No response

Expected behavior

No response

Screenshots

image

Example Flow

{
        "id": "200c4d5465da5eec",
        "type": "inject",
        "z": "9497205a89d9d80e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 260,
        "y": 400,
        "wires": [
            [
                "baea9f2e28e94595"
            ]
        ]
    },
    {
        "id": "baea9f2e28e94595",
        "type": "ha-device",
        "z": "9497205a89d9d80e",
        "name": "",
        "server": "5c1242ec.c091ec",
        "version": 0,
        "debugenabled": false,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "inputs": 1,
        "deviceType": "action",
        "device": "be7a49b8208cb1a9d0ceb16867f270ca",
        "event": {
            "type": "issue_all_led_effect",
            "domain": "zha",
            "device_id": "be7a49b8208cb1a9d0ceb16867f270ca",
            "metadata": {}
        },
        "capabilities": [
            {
                "name": "effect_type",
                "type": "integer",
                "value": "Fast_Blink"
            },
            {
                "name": "color",
                "type": "integer",
                "value": 128
            },
            {
                "name": "level",
                "type": "integer",
                "value": 50
            },
            {
                "name": "duration",
                "type": "integer",
                "value": 128
            }
        ],
        "outputProperties": [],
        "x": 430,
        "y": 400,
        "wires": [
            []
        ]
    }

This package's version (not the Home Assistant add-on version)

0.48.1

Is Node-RED running in Docker?

Home Assistant add-on

Node-RED version

3.0.2

Node.js version

14.0.3

Additional context

No response

github-actions[bot] commented 1 year ago

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.