Closed JeffL1 closed 4 years ago
Hey @JeffL1
I think I can support these two models. I just need some more details:
Hey @MadMonkey87 ,
In tab advanced each plug has one API id. This is the same for all 3 of the plugs. (Screenshots are inside the PDF-file.
I have found the sensor information you were looking for. All 3 power plugs have each 3 JSON files. 1 Light JSON and 2 Sensor JSON files. I have made a new PDF with all the 9 JSON files and additional info per plug.
Let me know if your need more information.
Thx for the infos. What is strange to me is that it does not properly recognize the power, I've tested it on my homey with your data and I actually got a power capability on both plugs. Could you check if the unique id's are actually the same on the light and the sensor ressource (i.e upper- vs lowercase)?
Hey @MadMonkey87 ,
The unique ID's are for all the 3 plugs are not the same the pattern changes at the end. I have gathered the unique id and you can see the difference between the light and 2 sensors (see info below).
There are not 2 different plugs but 3: Xiaomi plug: Zigbee plug has been around for years Xiaomie EU plug: Zigbee plug with EU connection and no Zigbee 3.0 Aqara EU plug: Zigbee 3.0 plug with EU connection
Currently in the Homey app it looks like power is supported (sensor data 1) for 2 out of 3 devices. The Aqara EU plug reads only 0 watt no matter how much I use. The second sensor data for each device called consumption is not available.
Xiaomi smart plug (ZNCZ02LM) "modelid": "lumi.plug" Lights uniqueid": "00:15:XX:XX:XX:XX:XX:XX-01 Sensors "uniqueid": "00:15:XX:XX:XX:XX:XX:XX-02-000c" "uniqueid": "00:15:XX:XX:XX:XX:XX:XX-03-000c" Everything the same until the end, pattern at the end: -01 -02-000c -03-000c
Xiaomi smart plug (EU) (ZNCZ04LM) "modelid": "lumi.plug.mmeu01" Lights "uniqueid": "04:cf:XX:XX:XX:XX:XX:XX-01" Sensors "uniqueid": "04:cf:XX:XX:XX:XX:XX:XX-15-000c" "uniqueid": "04:cf:XX:XX:XX:XX:XX:XX-16-000c" Everything the same until the end, pattern at the end: -01 -15-000c -16-000c
Aqara smart plug EU (SP-EUC01) "modelid": "lumi.plug.maeu01" Lights "uniqueid": "04:cf:XX:XX:XX:XX:XX:XX-01" Sensors "uniqueid": "04:cf:XX:XX:XX:XX:XX:XX-01-0702" "uniqueid": "04:cf:XX:XX:XX:XX:XX:XX-01-0b04" Everything the same until the end, pattern at the end: -01 -01-0702 -01-0b04
Very strange, when I mock exactly the json responses you submitted I can add the plugs using the generic and metering seems to work. Anyways, I've submitted a beta version of the next release supporting your devices. Can you please install it from over here and confirm if it works or not?
-> https://homey.app/de-ch/app/de.dresden-elektronik.deconz/deCONZ/test/
Hey @MadMonkey87 ,
Installed the app it looks great. I almost got 2 out of 3 the plugs working. Now I am a bit stuck. I think some issues with rest-api hope you can provide some insight. Also I added some screenshots.
Xiaomi smart plug (ZNCZ02LM) Works perfect.
Xiaomi smart plug (EU) (ZNCZ04LM) 1 Worked perfect for some time and another did not have the device tab with power and consumption in the Homey app. Before I installed your Homey app I checked if the unique ID pattern of each type stayed the same for multiple plugs of the same type. The patterns were the same except for the second Xiaomi smart plug (EU) the new ligh JSON was added but their were no sensor JSON's added. ( Background: I installed 2 Xiaomi EU plugs on Deconz. After that I deleted one from Deconz and installed it directly on Homey for some testing. I installed a third Xiaomi EU plug the 2 sensor JSON’s of the second removed plug where still there.) Steps I took to get the plug working: 1 Removed the third plug from Phoscon and Homey > reinstall of plug did not work (no sensor JSON) 2 Removed the entries from the second "removed plug" with postman on restapi. > And add third plug again > no sensor JSON 3 Tried 2 mock JSON files based on the sensor info of a similir plug and an adapted unique ID based on pattern of the light. > Didn't get this working. 4 Removed all devices from Phoscon and Homey one by one. Did a complete reset of Phoscon gateway. Got a new API key, checked if the lights and sensor JSON's were empty. Added 6 devices to Phoscon 2 of each type. Changed the configuration in Homey with new Api Key. > No power and consumption tab available for Xiaomi smart plug EU. Also no sensor JSON for this plug 5 Opened a brand new never used plug and installed> No sensor JSON, no energy information in Homey. Result: 3 Xiaomi EU plugs none of them make entries in sensor and they don't show energy info in Homey.
Aqara smart plug EU (SP-EUC01) Gives the wrong Power values. I have tested 5 plugs 3 types with power information. 2 plugs where this Aqara. I have pluged in a 1watt continues device. All the other plugs show the correct information, the Aqara plugs show 15 watt.
Hey @JeffL1 Here is how my app works: it first takes the light ressource that represents the plug and then it tries to find all sensors belonging to it. If it cannot find them you will still be able to add the plug to turn it on/off, but it won't be displaying the consumption etc. You mentioned that one of your ZNCZ04LM devices has this sensor resources and the other one not? I would recommend to remove and pair the plug again or try to get help in the deconz repo. If these resources are not there the homey app has no way to read these values.
Did I get that right, the power values are correct for some devices but for others not?
Hey @MadMonkey87,
Thanks for the feedback. Here's a quick update.
Xiaomi smart plug (ZNCZ02LM) Multiple plugs tested. Shows sensor JSONS and all correct power values in Homey. I think this plug is ready to be included in the next update.
Xiaomi smart plug (EU) (ZNCZ04LM) 0 Devices have JSONS sensors. Already tried: Repair plugs, Reset Phoscon. Completely removed Deconz and extra files. Tried 5 plugs of this type result 0 sensors. Contacted Deconz for help. Will update you once I have sensor JSONS again. To confirm if the values are right.
Aqara smart plug EU (SP-EUC01) This is type with the wrong power values. I checked for multiple devices the values directly in rest-api with Postman. For example A 1 watt devices show 15 watt in Rest-api. My current assumption is that device is at this point in time not properly supported in rest-api.
Hey Sorry I forgot to answer:) I've pushed the updated as all remaining issues seem to be with deconz itself. Please feel free to reopen the case if there should be anything wrong in the app itself!
MadMonkey87,
Thank you for the Homey app and the support.
I have been gathering the information you requested. Since I am not a progammer and it's my first time working on Linux it took me a bit longer. If you need additional info I will do my best.
JSON and Sensor Xiaomi Aqara plugs v1.pdf