jeedom-zigate / jeedom-plugin-zigate

Plugin Jeedom for ZiGate key.
MIT License
29 stars 12 forks source link

Mijia Door Sensor no battery info #108

Closed smulle48 closed 5 years ago

smulle48 commented 5 years ago

https://github.com/Jeedom-Zigate/jeedom-plugin-zigate/issues/94#issuecomment-459113493

doudz commented 5 years ago

Could you provide your zigate.json file ?

doudz commented 5 years ago

@llaumgui si duplicate, merci d'indiquer l'autre issue

smulle48 commented 5 years ago

{ "devices": [ { "addr": "d42a", "endpoints": [ { "clusters": [ { "attributes": [ { "attribute": 1, "data": 10, "name": "application_version", "value": 10 }, { "attribute": 65282, "data": "100121e50b21a801240000000000217c012067" }, { "attribute": 5, "data": "lumi.sensor_magnet", "name": "type", "value": "lumi.sensor_magnet" } ], "cluster": 0 }, { "attributes": [ { "attribute": 0, "data": false, "name": "onoff", "value": false } ], "cluster": 6 } ], "device": 0, "endpoint": 1, "in_clusters": [], "out_clusters": [], "profile": 0 } ], "info": { "addr": "d42a", "ieee": "00158d000242f12d", "last_seen": "2019-01-31 16:06:07", "mac_capability": "10000000", "rssi": 120 } }, { "addr": "14cd", "endpoints": [ { "clusters": [ { "attributes": [ { "attribute": 1, "data": 11, "name": "application_version", "value": 11 }, { "attribute": 65282, "data": "100021ef0b21a8012400000000002106002059" }, { "attribute": 5, "data": "lumi.sensor_motion", "name": "type", "value": "lumi.sensor_motion" } ], "cluster": 0 }, { "attributes": [ { "attribute": 0, "data": 1, "expire": 10, "name": "presence", "value": true } ], "cluster": 1030 } ], "device": 0, "endpoint": 1, "in_clusters": [], "out_clusters": [], "profile": 0 } ], "info": { "addr": "14cd", "ieee": "00158d00022488e3", "last_seen": "2019-01-31 16:06:15", "mac_capability": "10000000", "rssi": 255 } } ], "groups": {}, "scenes": {} }

smulle48 commented 5 years ago

@doudz

doudz commented 5 years ago

Thanks, I'll have to support attribute 0xff02, it looks different than 0xff01

llaumgui commented 5 years ago

@doudz c'est pas celle du comment ?

doudz commented 5 years ago

partiel en 0.27.0, à tester

smulle48 commented 5 years ago

@doudz

Version plugin 1.2.0 Version lib 0.27.5 Version firmware 3.0e

Still no battery info :-(

Abeille is showing the correct battery info

smulle48 commented 5 years ago

Version plugin 1.2.0 Version lib 0.27.5 Version firmware 3.0f

Still no battery info after firmware upgrade :-(

doudz commented 5 years ago

if Abeille can do it, we can too ;) I'll take a look

smulle48 commented 5 years ago

if Abeille can do it, we can too ;) I'll take a look

That's what I thought :-) 👍

smulle48 commented 5 years ago

Just to be sure, I reinstalled everything and added just the button.

Version plugin 1.2.1 Version lib 0.27.8 Version firmware 3.0f

Here is the latest json file:

{
    "devices": [
        {
            "addr": "2ea7",
            "discovery": "",
            "endpoints": [
                {
                    "clusters": [
                        {
                            "attributes": [
                                {
                                    "attribute": 1,
                                    "data": 10,
                                    "name": "application_version",
                                    "value": 10
                                },
                                {
                                    "attribute": 5,
                                    "data": "lumi.sensor_switch",
                                    "name": "type",
                                    "type": "str",
                                    "value": "lumi.sensor_switch"
                                }
                            ],
                            "cluster": 0
                        },
                        {
                            "attributes": [
                                {
                                    "attribute": 32768,
                                    "data": 0,
                                    "expire": 2,
                                    "name": "multiclick",
                                    "type": "int",
                                    "value": 0
                                },
                                {
                                    "attribute": 0,
                                    "data": true,
                                    "name": "onoff",
                                    "type": "bool",
                                    "value": true
                                }
                            ],
                            "cluster": 6
                        }
                    ],
                    "device": 0,
                    "endpoint": 1,
                    "in_clusters": [],
                    "out_clusters": [],
                    "profile": 0
                }
            ],
            "generictype": "",
            "info": {
                "addr": "2ea7",
                "ieee": "00158d00026b6765",
                "last_seen": "2019-02-14 11:11:22",
                "mac_capability": "10000000",
                "rssi": 207
            }
        }
    ],
    "groups": {},
    "scenes": {}
}
doudz commented 5 years ago

ça sera corrigé dans la lib 0.28

smulle48 commented 5 years ago

Just updated manually to lib 0.28 and now it's showing battery info for all my Xiaomi/Mijia/Auara devices. I had to remove all devices and add them as new devices though (PDM/EEPROM erase not required).

I could not get the battery info by refreshing the device, but that's okay with me :-D

One "problem" though. On the "Equipment" page it shows the battery on percentage, but on the "Commandes" page, it shows it in Voltage. I can't get it to show the percentage on dashboard, only Voltage. skaermbillede 2019-02-20 kl 08 27 40 skaermbillede 2019-02-20 kl 08 27 51

doudz commented 5 years ago

Great news ! You can't refresh the value manually, because the device is responsible of the update. Since the percent is a part of Jeedom core, we don't have info command for it but I think there's way to display a battery icon on the dashboard (sorry I don't use Jeedom so I'm not a expert)

doudz commented 5 years ago

beside that, what's your native language ? Looks like we have to translate the plugin :smile:

smulle48 commented 5 years ago

I can see that the percentage is reported correctly elsewhere in Jeedom so I can still use it as ex battery warning :-) so that’s fine with me :-)

Thank you for your great job :-)

smulle48 commented 5 years ago

I’m Danish:-)

Home automation is beginning to become real big here, but atm. we are stuck with either a system from a alarm provider (Verisure, etc.) or Samsung SmartThings or the bigger player Vera, Fibaro, etc.

So far, I have tried ALL of them, but Jeedom and your Zigate plugin has been the best for me and many of my friends.

I have for along time ago (6 month or so) applied for Danish language translation for the Jeedom core, but they have assigned me to the English translation and are not replying me when contacting them regarding danish translation :-(

doudz commented 5 years ago

Sometimes the Jeedom team is not listening. Similar you have NextDom (fork of Jeedom) I'm using Home Assistant, it's not always user friendly but so far more efficient and open than Jeedom

smulle48 commented 5 years ago

I’m actually mostly using Jeedom as a “relay” for homebridge :-)

I’m used to use plain HAP but found Jeedom a lot easier. I also love the way it handles the connection to homebridge. Just click and run :-)

Mostly my wife is using Jeedom to get an overview over our house and all the sensors