Smanar / Domoticz-deCONZ

deCONZ plugin for Domoticz (Zigbee application)
GNU General Public License v3.0
36 stars 27 forks source link

Aqara Vibration - DJT11LM #76

Closed flopp999 closed 3 years ago

flopp999 commented 3 years ago

In DZ I do not see tilt degree, should it be there?

Maybe I did something wrong in DZ?

In Deconz API I get a lot of information

{"config":{"battery":100,"on":true,"pending":[],"reachable":true,"sensitivity":null,"sensitivitymax":21,"temperature":2400},"ep":1,"etag":"d1d721bdee4c2xff4f5c7f3ddf793970","lastseen":"2020-11-23T20:38Z","manufacturername":"LUMI","modelid":"lumi.vibration.aq1","name":"Vibration Sensor","state":{"lastupdated":"2020-11-23T20:38:19.652","orientation":[1,-1,89],"tiltangle":176,"vibration":true,"vibrationstrength":8},"swversion":"20180130","type":"ZHAVibration","uniqueid":"00:15:8d:00:03:b6:44:55-01-0101"}

Smanar commented 3 years ago

Right, I can complete it, 2 possibilities

I can use the same widget (the selector) and add the tiltangle. So you will have tiltangle as nvalue and event as svalue Or I need to create a second widget with "orientation" and in this one you will have the 3 angles, but IDK if there usefull.

Wich one you prefer ? Or if you have better idea ?

flopp999 commented 3 years ago

Thanks,

"orientation" is the best, I think :)

I have played around little bit with the sensor and checked the output and "tiltangle" I don't understand how it works, but with the "orientation" I can see some logic

Smanar commented 3 years ago

Ok, I will make the code tommorow I think, I will notice you to make test.

Smanar commented 3 years ago

@flopp999 you can test the beta.

The device will be re created + 1 more widget (I have choose the text widget, because It don't create regulary logs) that display the angle on format [X,Y,Z]

flopp999 commented 3 years ago

Worked as you said, thank you very much :)

flopp999 commented 3 years ago

Hi, is this something from the Beta or is it normal?

2020-11-27 15:15:00.156 (ConBee) onCommand called for Unit 28: Parameter 'On', Level: 0, Hue:
2020-11-27 15:15:00.158 (ConBee) onCommand called for Unit 24: Parameter 'On', Level: 0, Hue:
2020-11-27 15:15:00.161 (ConBee) onCommand called for Unit 23: Parameter 'On', Level: 0, Hue:
2020-11-27 15:15:00.238 (ConBee) ### Groupe > 65520 Name:All
2020-11-27 15:15:00.233 Error: (ConBee) Websocket error, unknow device > 65520 (groups)
Smanar commented 3 years ago

Yep, you have it only 1 time ? There is an hidden group in deconz, (that contain all devices), but the plugin can't see it at startup. When it detect it, it will print this error message and add it in database, after that you will not have this error message again (else there is something wrong, for exemple you have blocked the new device detection)

flopp999 commented 3 years ago

Yep, you have it only 1 time ?

There is an hidden group in deconz, (that contain all devices), but the plugin can't see it at startup. When it detect it, it will print this error message and add it in database, after that you will not have this error message again (else there is something wrong, for exemple you have blocked the new device detection)

Ok, great.

Will see if it pops up again, then I will notice you. You can close this issue now.

flopp999 commented 3 years ago

Hi, I got this again today.

2020-11-30 14:05:21.996 (ConBee) onCommand called for Unit 73: Parameter 'Off', Level: 0, Hue:
2020-11-30 14:05:22.063 (ConBee) ### Groupe > 65520 Name:All
2020-11-30 14:05:22.059 Error: (ConBee) Websocket error, unknow device > 65520 (groups)
flopp999 commented 3 years ago

Hi, I got this again today.

2020-11-30 14:05:21.996 (ConBee) onCommand called for Unit 73: Parameter 'Off', Level: 0, Hue:
2020-11-30 14:05:22.063 (ConBee) ### Groupe > 65520 Name:All
2020-11-30 14:05:22.059 Error: (ConBee) Websocket error, unknow device > 65520 (groups)

Unit 73 is an Aqara Wall plugg

Smanar commented 3 years ago

And in the device list you havent a device with

ID = GROUP_All
Name = deCONZ - All

If I m right the complete log is

2020-11-30 17:55:59.578 Error: (deCONZ) Websocket error, unknow device > 65520 (groups)
2020-11-30 17:55:59.579 (deCONZ) Send Command /api/36E138297E/groups/65520 with None (0 in buffer)
2020-11-30 17:55:59.579 (deCONZ) Making Request : http://127.0.0.1:80/api/36E138297E/groups/65520 with params None
2020-11-30 17:55:59.596 (deCONZ) Request Return : {"action":{"alert":"none","bri":127,"colormode":"hs","ct":0,"effect":"none","hue":0,"on":false,"sat":127,"scene":null,"xy":[0,0]},"devicemembership":[],"etag":"f82f16aefc535c3a7ccd7d9005f038","id":"65520","lights":["2","3","8","9","12","1","5"],"name":"All","scenes":[],"state":{"all_on":false,"any_on":true},"type":"LightGroup"}
2020-11-30 17:55:59.596 (deCONZ) Classic Data : {'state': {'any_on': True, 'all_on': False}, 'name': 'All', 'scenes': [], 'action': {'effect': 'none', 'xy': [0, 0], 'alert': 'none', 'on': False, 'colormode': 'hs', 'ct': 0, 'scene': None, 'bri': 127, 'sat': 127, 'hue': 0}, 'devicemembership': [], 'lights': ['2', '3', '8', '9', '12', '1', '5'], 'etag': 'f82f16aefc535c3a7ccd7d905f0138', 'id': '65520', 'type': 'LightGroup'}
2020-11-30 17:55:59.597 (deCONZ) ### Groupe > 65520 Name:All 

It mean the group was just detected, then the plugin ask for information and add it. After that, it will never do it again, so if all is working you will have this message only one time after the restart

flopp999 commented 3 years ago

And in the device list you havent a device with


ID = GROUP_All

Name = deCONZ - All

If I m right the complete log is


2020-11-30 17:55:59.578 Error: (deCONZ) Websocket error, unknow device > 65520 (groups)

2020-11-30 17:55:59.579 (deCONZ) Send Command /api/36E138297E/groups/65520 with None (0 in buffer)

2020-11-30 17:55:59.579 (deCONZ) Making Request : http://127.0.0.1:80/api/36E138297E/groups/65520 with params None

2020-11-30 17:55:59.596 (deCONZ) Request Return : {"action":{"alert":"none","bri":127,"colormode":"hs","ct":0,"effect":"none","hue":0,"on":false,"sat":127,"scene":null,"xy":[0,0]},"devicemembership":[],"etag":"f82f16aefc535c3a7ccd7d9005f038","id":"65520","lights":["2","3","8","9","12","1","5"],"name":"All","scenes":[],"state":{"all_on":false,"any_on":true},"type":"LightGroup"}

2020-11-30 17:55:59.596 (deCONZ) Classic Data : {'state': {'any_on': True, 'all_on': False}, 'name': 'All', 'scenes': [], 'action': {'effect': 'none', 'xy': [0, 0], 'alert': 'none', 'on': False, 'colormode': 'hs', 'ct': 0, 'scene': None, 'bri': 127, 'sat': 127, 'hue': 0}, 'devicemembership': [], 'lights': ['2', '3', '8', '9', '12', '1', '5'], 'etag': 'f82f16aefc535c3a7ccd7d905f0138', 'id': '65520', 'type': 'LightGroup'}

2020-11-30 17:55:59.597 (deCONZ) ### Groupe > 65520 Name:All 

It mean the group was just detected, then the plugin ask for information and add it.

After that, it will never do it again, so if all is working you will have this message only one time after the restart

I just got it once today. I do have a device with ID Group _all and name deConz - all

Smanar commented 3 years ago

Ha ? and you haven't restarted the plugin ?

unknow device > 65520 (groups)

This message just mean you have received a notification from gateway about an unknow group the "all" group, but now I m looking again your log

2020-11-30 14:05:22.063 (ConBee) ### Groupe > 65520 Name:All
2020-11-30 14:05:22.059 Error: (ConBee) Websocket error, unknow device > 65520 (groups)

Look at timestamp, it s in reversed order, so all is fine

2020-11-30 14:05:22.059 Error: (ConBee) Websocket error, unknow device > 65520 (groups)

Notification from unknow group

2020-11-30 14:05:22.063 (ConBee) ### Groupe > 65520 Name:All

Group creation with the name "All"

flopp999 commented 3 years ago

Yes, I had restarted it Will close this Issue since you fixed rotation for Aqara