Skip to content

MQTT parsing error shelly1pluspm #70

@GregoryDC

Description

@GregoryDC

example MQTT info:
topic: "shellies/shellyplus1pm-3083980a70ac/status/switch:0"
payload: "{"id":0, "source":"init", "output":true, "apower":291.5, "voltage":226.5, "current":1.437, "aenergy":{"total":80.415,"by_minute":[3619.099,4730.434,4729.123],"minute_ts":1652655284},"temperature":{"tC":63.2, "tF":145.7}}"

RPC notifications disabled in Shelly config.

resulting in the following errors in HA logs:
2022-05-16 08:57:59 ERROR (Thread-9) [pyShelly] Error parsing MQTT message, Client, shellies/shellyplus1pm-3083980a70ac/status/switch:0
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pyShelly/mqtt.py", line 64, in receive_msg
self._root.update_block(device_id,
File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 355, in update_block
block.update_mqtt(payload)
File "/usr/local/lib/python3.9/site-packages/pyShelly/block.py", line 169, in update_mqtt
data = data['params'] if 'params' in data else data['result']
KeyError: 'result'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions