Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.17k stars 1.68k forks source link

mqtt publish set json only changes first value #5970

Closed Gibbz closed 3 years ago

Gibbz commented 3 years ago

What happened

MQTT Json payloads are only applying the first value.

What did you expect to happen

As per the documentation, all values sent in the json blob should be sent on to the device. https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html

topic: zigbee2mqtt/Alarm A/set payload: '{"melody":18,"volume":"low","alarm": true}'

the actual message sent from the log: INFO: MQTT publish: topic 'zigbee2mqtt/Alarm A', payload '{"alarm":false,"humidity":54,"humidity_alarm":false,"linkquality":102,"melody":1,"temperature":"21.6","temperature_alarm":false,"volume":"medium"}'

How to reproduce it (minimal and precise)

Send the payload to change multiple values at once... topic: zigbee2mqtt/Alarm A/set payload: '{"melody":18,"volume":"low","alarm": true}'

Debug info

Zigbee2MQTT version: 1.17 Adapter hardware: zzh Adapter firmware version:

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

Gibbz commented 3 years ago

This is still an issue.

Koenkk commented 3 years ago

What do you mean with not sent? Do you mean that they are not honored by the device?

Gibbz commented 3 years ago

That's what it shows in the log. I guess it depends what the log is showing, what was sent to the device? Or what the device accepted? I assume the log is showing what is sent to the device, so then in this case it is not sending the command I am giving the zigbee2mqtt, only the first attribute of my json is accepted.

Koenkk commented 3 years ago

What was sent to the device

Gibbz commented 3 years ago

Neo NAS-AB02B0 https://www.zigbee2mqtt.io/devices/NAS-AB02B0.html#neo-nas-ab02b0

esion-net commented 3 years ago

Tried that today, too. If sending more than one attribute at once, log confirms only sending the first one. Eq: payload: '{"melody":18,"volume":"low","alarm": true}' Only 'melody' seems to be handled and confirmed as per logs. 'volume' and 'alarm' seems to be discarded.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

weltmeyer commented 1 year ago

I have the same Issue. Only the first Json property gets applied. Any updates on this?