Koenkk / zigbee2mqtt

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

Issues in latest dev branch #373

Closed AnhDuc85 closed 6 years ago

AnhDuc85 commented 6 years ago

Hi, just pulled the latest dev image and it seems there are some issues.

Some examples:

When I switch back to the latest images, these sensors reporting normal values.

tb-killa commented 6 years ago

Please provide full log via debug and do some samples. I think i know the reason But need some input debug stuff first..

AnhDuc85 commented 6 years ago

example with device WSDCGQ01LM debug log with latest-dev: https://pastebin.com/raw/YpS6FNh2 debug log with latest: https://pastebin.com/raw/RDa5qF7U

tb-killa commented 6 years ago

Recieved zigbee message of type 'attReport' with data '{"cid":"genBasic","data":{"65281":"\u0001!�\u000b\u0004!�\u0013\u0005!\u0006\u0000\u0006$\u0000\u0000\u0000\u0000\u0000d)�\be!�\u0015\n!\u0000\u0000"}}' of device 'lumi.sens' (0x00158d0001c2cf7e)

The structure isnt parse correct.

Koenkk commented 6 years ago

This is due to https://github.com/Koenkk/zigbee-shepherd-converters/pull/63

@evildad @lolorc did you ever experience this?

evildad commented 6 years ago

Just grepped in my logs for the pattern voltage":"!" and found zero entries. So the answer is no, never had that issue... Edit: I don't understand why the Xiaomi Plug has this issue, too. We didn't change this Model

azuwis commented 6 years ago

I have the same problem on WSDCGQ01LM - Xiaomi MiJia temperature & humidity sensor, debug log:

9/17/2018, 4:02:35 PM - debug: Recieved zigbee message of type 'attReport' with data '{"cid":"genBasic","data":{"65281":"\u0001!�\u000b\u0004!�\u0013\u0005!\u001c\u0000\u0006$\u0002\u0000\u0000\u0000\u0000d)�\ne!�\u001e\n!\u0000\u0000"}}' of device 'lumi.sens' (0x00158d0001e81c40)
9/17/2018, 4:02:35 PM - info: MQTT publish, topic: 'zigbee2mqtt/ht_bedroom', payload: '{"battery":"NaN","voltage":"!","linkquality":26,"temperature":26.98,"humidity":82.43}'
9/17/2018, 4:02:35 PM - debug: Recieved zigbee message of type 'devChange' with data '{"cid":"genBasic","data":{"65281":"\u0001!�\u000b\u0004!�\u0013\u0005!\u001c\u0000\u0006$\u0002\u0000\u0000\u0000\u0000d)�\ne!�\u001e\n!\u0000\u0000"}}' of device 'lumi.sens' (0x00158d0001e81c40)

Zigbee2mqtt git revision 6ede5a3

Koenkk commented 6 years ago

Can you try if this issue also happens in issue_373.

Note: do a rm -rf node_modules && npm install after checking out this branch.

azuwis commented 6 years ago

I can confirm that the problem does not happen on branch issue_373.

tb-killa commented 6 years ago

We should check if this is correct?? var deviceId = zclId.device(260, 10).key; Maybe there comes faulty result.?

dzungpv commented 6 years ago

@tb-killa You are right, this PR will solve the problem https://github.com/Koenkk/zcl-packet/pull/6

hdo commented 6 years ago

I can confirm that battery values are not read correctly with 'latest-dev':

'zigbee2mqtt/0x00158d00022c9005', payload: '{"temperature":23.21,"linkquality":92,"humidity":46.08,"pressure":1002,"battery":"NaN","voltage":"!"}' 'zigbee2mqtt/0x00158d0001f535eb', payload: '{"temperature":25.1,"linkquality":21,"humidity":45.19,"pressure":1002,"battery":"NaN","voltage":"!"}' 'zigbee2mqtt/0x00158d0001e50c7c', payload: '{"illuminance":110,"linkquality":13,"occupancy":false,"battery":"NaN","voltage":"!"}'

Koenkk commented 6 years ago

Can you check if this has been fixed in the latest dev branch?

hdo commented 6 years ago

Can you check if this has been fixed in the latest dev branch?

Running Docker latest-dev (commit #8376b7c). Still issues with battery reading but some values seem to be correct. Maybe it's an issue with retained values.

I'll keep an eye on that.

'{"temperature":13.38,"linkquality":0,"humidity":38.24,"pressure":1002,"battery":"NaN","voltage":"!"}' '{"temperature":13.38,"linkquality":0,"humidity":32.16,"pressure":1002,"battery":"NaN","voltage":"!"}' '{"temperature":27.55,"linkquality":63,"humidity":35.98,"pressure":1002,"battery":"98.33","voltage":2995}' '{"temperature":27.6,"linkquality":63,"humidity":39.43,"pressure":1002.37,"battery":"98.33","voltage":2995}'

hdo commented 6 years ago

I can confirm that battery voltage is read correctly again with latest-dev. Thank you.

AnhDuc85 commented 6 years ago

can also confirm, will close the issue

lolorc commented 6 years ago

@Koenkk yes I experiencing this issue at the moment. :-) probably because you reverted @dzungpv PR.

Koenkk commented 6 years ago

Fixed again!