dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.89k stars 496 forks source link

Nous Smart ZigBee Socket A1Z (_TZ3000_2putqrmw) #6594

Closed nWRqenkF closed 1 year ago

nWRqenkF commented 1 year ago

Device

Screenshots

grafik grafik

Basic

grafik

Identify

grafik

Groups

grafik

Scenes

grafik grafik grafik grafik

On/Off

grafik grafik

Simple Metering

grafik grafik

Other clusters that are not mentioned above

Electrical Measurement

grafik grafik

OTAU

grafik

nWRqenkF commented 1 year ago

I'm aware of the issue https://github.com/dresden-elektronik/deconz-rest-plugin/issues/5917 but the alphanumeric part of the manufacturer part is different (here "_TZ3000_2putqrmw" vs "_TZ3000_ksw8qtmt" in issue 5917).

I assume, this is a new version of the device.

Anyhow: the device is recognized in phoscon, but in openhab3 via deconz-REST-API only the On/Off-Channel is available, the electric measurement is missing.

nWRqenkF commented 1 year ago

Current DDF from deCONZ application:

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3000_2putqrmw",
  "modelid": "TS011F",
  "product": "TS011F",
  "sleeper": false,
  "status": "Draft",
  "subdevices": [
    {
      "type": "$TYPE_ON_OFF_PLUGIN_UNIT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "state/alert",
          "description": "The currently active alert effect.",
          "default": "none"
        },
        {
          "name": "state/on",
          "description": "True when device is on; false when off.",
          "refresh.interval": 5
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ]
}
Smanar commented 1 year ago

Can test if it's just a clone. You already have the DDF for the Nous A1z here https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/tuya/_TZ3000_ksw8qtmt_plug_nous_a1z.json

You just need to edit

  "manufacturername": "_TZ3000_2putqrmw",
  "modelid": "TS011F",

and replace them with

  "manufacturername": ["_TZ3000_2putqrmw", "_TZ3000_2putqrmw"]
  "modelid": ["TS011F", "TS011F"],

Them you can restart deconz and re-include your device.

To edit the file, it will depend of you OS you can edit it on your deconz installation in the "devices" folder, if you have HA, will be easier to put a new complete DDF in the hidden persistent folder.

All DDF provided directly with deCONZ typically reside in /usr/share/deCONZ/devices/ on a Linux system and are loaded first. However, files residing in the home directory of the user running deCONZ (e.g. /home/<DECONZUSER>/.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.

If it work can add your model here https://github.com/dresden-elektronik/deconz-rest-plugin/pull/6589

nWRqenkF commented 1 year ago

Thanks worked for me!

Minor correction (missing comma in 1st line):

"manufacturername": ["_TZ3000_2putqrmw", "_TZ3000_2putqrmw"],
"modelid": ["TS011F", "TS011F"],
nWRqenkF commented 1 year ago

But I do have a follow-up question:

The device is now presented as three different devices in the REST-API and in openHAB3 (deconz:onofflight, deconz:consumptionsensor, deconz:powersensort) each with 2-3 attributes.

Other devices with switch and sensor(s) - such as thermostats - show up as a single device holding all attributes.

Is the multi-device-approach of this DDF definition intentional? Or is it better to have one devices with all attributes?

Smanar commented 1 year ago

It's the deconz working mode ^^. Look at the uniqueID, it's composed by the MAC adress - the endpoint - The cluster.

Deconz make a part for "light" + a part for "sensor" And you have 1 sensor by used cluster.

So it depend of device, some device have consumption and power on the same cluster, not this one.

SvenMartin81 commented 1 year ago

Hi, i have the Same device with the Same situation. Only the Switch is there.

Smanar commented 1 year ago

The switch ? Not a plug ?

You have too the _TZ3000_2putqrmw ? You can use this DDF https://github.com/dresden-elektronik/deconz-rest-plugin/pull/6589

SvenMartin81 commented 1 year ago

Hi,

Yes i will Check this. Can i Upload from Deconz with any doubt? Or Simi Need my Special Write access on and Folders?

Mit freundlichen Grüßen

Sven Martin Mühlenring 63 23923 Selmsdorf

Tel.: +49 (0)172 5180261


Von: Smanar @.> Gesendet: Wednesday, December 14, 2022 6:53:02 PM An: dresden-elektronik/deconz-rest-plugin @.> Cc: SvenMartin81 @.>; Comment @.> Betreff: Re: [dresden-elektronik/deconz-rest-plugin] Nous Smart ZigBee Socket A1Z (_TZ3000_2putqrmw) (Issue #6594)

The switch ? Not a plug ?

You have too the _TZ3000_2putqrmw ? You can use this DDF #6589https://github.com/dresden-elektronik/deconz-rest-plugin/pull/6589

— Reply to this email directly, view it on GitHubhttps://github.com/dresden-elektronik/deconz-rest-plugin/issues/6594#issuecomment-1351856191, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVOMXS47XUNBU6BJSTKCBXTWNICP5ANCNFSM6AAAAAASUSIQQY. You are receiving this because you commented.Message ID: @.***>

SvenMartin81 commented 1 year ago

Do you know when this will be integrales in the next Deconz Update?

Or can I add a new file in the Tuya Finder with These changes and the System will recognice this.

In the actuall Deconz-2.19.03-qt5.deb was this Not changed.

Please, leg ne know.

Mit freundlichen Grüßen

Sven Martin Mühlenring 63 23923 Selmsdorf

Tel.: +49 (0)172 5180261


Von: Smanar @.> Gesendet: Wednesday, December 14, 2022 6:53:02 PM An: dresden-elektronik/deconz-rest-plugin @.> Cc: SvenMartin81 @.>; Comment @.> Betreff: Re: [dresden-elektronik/deconz-rest-plugin] Nous Smart ZigBee Socket A1Z (_TZ3000_2putqrmw) (Issue #6594)

The switch ? Not a plug ?

You have too the _TZ3000_2putqrmw ? You can use this DDF #6589https://github.com/dresden-elektronik/deconz-rest-plugin/pull/6589

— Reply to this email directly, view it on GitHubhttps://github.com/dresden-elektronik/deconz-rest-plugin/issues/6594#issuecomment-1351856191, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVOMXS47XUNBU6BJSTKCBXTWNICP5ANCNFSM6AAAAAASUSIQQY. You are receiving this because you commented.Message ID: @.***>

Smanar commented 1 year ago

What is your OS ?

On normal one

All DDF provided directly with deCONZ typically reside in /usr/share/deCONZ/devices/ on a Linux system and are loaded first. However, files residing in the home directory of the user running deCONZ (e.g. /home/<DECONZUSER>/.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.

On HA https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839

I hope we will have the file officialy in next version.

SvenMartin81 commented 1 year ago

Hi, I am Running raspi on a Pi4B with Raspbee on it. But i cannot overwrite the files because I have No write Access with the User „Pi“. What can i do?

Mit freundlichen Grüßen

Sven Martin Mühlenring 63 23923 Selmsdorf

Tel.: +49 (0)172 5180261


Von: Smanar @.> Gesendet: Thursday, December 15, 2022 6:47:04 PM An: dresden-elektronik/deconz-rest-plugin @.> Cc: SvenMartin81 @.>; Comment @.> Betreff: Re: [dresden-elektronik/deconz-rest-plugin] Nous Smart ZigBee Socket A1Z (_TZ3000_2putqrmw) (Issue #6594)

What is your OS ?

On normal one

All DDF provided directly with deCONZ typically reside in /usr/share/deCONZ/devices/ on a Linux system and are loaded first. However, files residing in the home directory of the user running deCONZ (e.g. /home//.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.

On HA https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839

I hope we will have the file officialy in next version.

— Reply to this email directly, view it on GitHubhttps://github.com/dresden-elektronik/deconz-rest-plugin/issues/6594#issuecomment-1353479262, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVOMXSYRCVFQLJ2EBYAKJY3WNNKRRANCNFSM6AAAAAASUSIQQY. You are receiving this because you commented.Message ID: @.***>

SvenMartin81 commented 1 year ago

Hi,

I got it but the only missing Sensor in Home Assistant is the voltage Sensor. The „power“ and „consumption“ Sensor is Running fine.

What can i so to have the „voltage“ Sensor?

Mit freundlichen Grüßen

Sven Martin Mühlenring 63 23923 Selmsdorf

Tel.: +49 (0)172 5180261


Von: Sven Martin @.> Gesendet: Thursday, December 15, 2022 7:03:14 PM An: dresden-elektronik/deconz-rest-plugin @.>; dresden-elektronik/deconz-rest-plugin @.> Cc: Comment @.> Betreff: Re: [dresden-elektronik/deconz-rest-plugin] Nous Smart ZigBee Socket A1Z (_TZ3000_2putqrmw) (Issue #6594)

Hi, I am Running raspi on a Pi4B with Raspbee on it. But i cannot overwrite the files because I have No write Access with the User „Pi“. What can i do?

Mit freundlichen Grüßen

Sven Martin Mühlenring 63 23923 Selmsdorf

Tel.: +49 (0)172 5180261


Von: Smanar @.> Gesendet: Thursday, December 15, 2022 6:47:04 PM An: dresden-elektronik/deconz-rest-plugin @.> Cc: SvenMartin81 @.>; Comment @.> Betreff: Re: [dresden-elektronik/deconz-rest-plugin] Nous Smart ZigBee Socket A1Z (_TZ3000_2putqrmw) (Issue #6594)

What is your OS ?

On normal one

All DDF provided directly with deCONZ typically reside in /usr/share/deCONZ/devices/ on a Linux system and are loaded first. However, files residing in the home directory of the user running deCONZ (e.g. /home//.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.

On HA https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839

I hope we will have the file officialy in next version.

— Reply to this email directly, view it on GitHubhttps://github.com/dresden-elektronik/deconz-rest-plugin/issues/6594#issuecomment-1353479262, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVOMXSYRCVFQLJ2EBYAKJY3WNNKRRANCNFSM6AAAAAASUSIQQY. You are receiving this because you commented.Message ID: @.***>

Mimiix commented 1 year ago

@SvenMartin81 Voltage is a attribute of the Power entity in HA. You need to create a template sensor for taht to become a seperate sensor.

Alex-joomla commented 1 year ago

I' ve managed to edit the ddf and so I'm able to display power and consumption. Consumption is running fine but power is displayed as 0 as in deconz. But power is a calculated value of current and voltage, should it been calculated by the device or by deconz?

Bildschirmfoto 2022-12-17 um 23 16 26 Bildschirmfoto 2022-12-17 um 23 16 41
Alex-joomla commented 1 year ago

The „power“ and „consumption“ Sensor is Running fine.

Really, your power sensor is running fine? Mine shows nothing

Smanar commented 1 year ago

Perhaps you don't have enought consumption ? But if the value is 0 in deconz, you will have 0 in the API, the value is gived by the device.

Alex-joomla commented 1 year ago

Perhaps you don't have enought consumption ? But if the value is 0 in deconz, you will have 0 in the API, the value is gived by the device.

Thats exactly the case. Power draw was too low, had fairy lights in it. Tested it with a water boiler and it worked.

Although I cannot understand it. Current is measured, why doesn't it calculate it to power? Consumption rises anyway.

karsten-eger commented 1 year ago

hmm, got two of those as well and they are detected just fine as a plug. All other parts are missing. I upgraded deconz and phoscon and edited the files as mentioned in #6589 but it's still detected as _TZ3000_2putqrmw and not nous at all.

restarted deconz and the raspi several times, no change. there are no files in the users local folder either.

Smanar commented 1 year ago

Although I cannot understand it. Current is measured, why doesn't it calculate it to power? Consumption rises anyway.

Need to ask that to tuya devs ^^

but it's still detected as _TZ3000_2putqrmw and not nous at all.

It is and will stay a _TZ3000_2putqrmw , the only difference is with the DDF you will have 2 more sensors

karsten-eger commented 1 year ago

It is and will stay a _TZ3000_2putqrmw , the only difference is with the DDF you will have 2 more sensors

I thought the device manufacturer is named nous after the change in the phoscon ui

But anyways, no, no new sensors detected. Only the plugs so far.

Smanar commented 1 year ago

You have the GUI ? you can check if the DDF is used by deconz with making a right clic and "edit DDF", it will open the editor and you will see the used DDF.

After adding the DDF you need to re-include the device, for new entries will be created.

karsten-eger commented 1 year ago

I only have the web gui for phoscon, not deconz gui. There's no right click I am aware of. Need to check if I can get on the raspberry with vnc. It's a zero w headless in my case :)

Thx so far

Smanar commented 1 year ago

You can run deconz with command line with debug enabled, but will be a little overkill just for that.

You have edited the old file ? perhaps a typo inside ? You are not using docker ?

karsten-eger commented 1 year ago

Ah they are reachable via the API but they are not listed as sensors in the sensor list.

{
    "config": {
        "on": true,
        "reachable": true
    },
    "etag": "[...]",
    "lastannounced": null,
    "lastseen": "2022-12-22T14:08Z",
    "manufacturername": "_TZ3000_2putqrmw",
    "modelid": "TS011F",
    "name": "Consumption 35",
    "state": {
        "consumption": 0,
        "lastupdated": "2022-12-22T14:04:56.880"
    },
    "swversion": "1.0.13",
    "type": "ZHAConsumption",
    "uniqueid": "a4:c1:38:0d:7e:b9:71:38-01-0702"
}

The rest is not a deconz problem I guess.

Smanar commented 1 year ago

But this JSON is from the sensors list ? You mean in the phoscon sensors list ?

karsten-eger commented 1 year ago

yep, Phoscon Webapp API client sensor information. Each of those two plugs exposes two sensors - consumtion and power respectively

Smanar commented 1 year ago

So it's working now ?

karsten-eger commented 1 year ago

I guess this counts as working regarding deconz. Thought it will use the given manufacturer name though.

Now it's a phoscon issue.

Thx for your help and patience. 😄

bankhans commented 1 year ago

"manufacturername": ["_TZ3000_2putqrmw", "_TZ3000_2putqrmw"] "modelid": ["TS011F", "TS011F"],

Thank You, i can see now power and consumption in openhab. grafik

RezzZ commented 1 year ago

@karsten-eger did you just press the plug button for 10 seconds for the new sensors to show up while looking for new lights in phoscon app? I'm trying to get the plugs working with power consumption but API and homeassistant only show on/off switch for me. I'm running deconz in docker and I updated the file inside my docker container to reflect the recommended changes..

never mind, I commented out the original lines originally. Now I removed them, restarted deconz and everything works for me too! Thanks for the changes and hope the can be merged with the official code soon

Kenny-BC commented 1 year ago

Hey Guys, i can add my Nous 2putqrmw and after i edit the ddf and save it under: /home//.local/share/dresden-elektronik/deCONZ/devices Now i´ve the consumption and power values in homeassistant.

I don´t know but when i open the phoscon gui sometimes there are 3 plugins online and sometimes 1 and 5 minutes later 5.

Can someone explain why they hopping? Normally they run as repeater and at the moment i´ve 68 devices listed in deconz.

Mimiix commented 1 year ago

Hey Guys, i can add my Nous 2putqrmw and after i edit the ddf and save it under: /home//.local/share/dresden-elektronik/deCONZ/devices Now i´ve the consumption and power values in homeassistant.

I don´t know but when i open the phoscon gui sometimes there are 3 plugins online and sometimes 1 and 5 minutes later 5.

Can someone explain why they hopping? Normally they run as repeater and at the moment i´ve 68 devices listed in deconz.

The above is unrelated to this issue or device(interference issues). Please ask on Discord or Forums.

github-actions[bot] commented 1 year ago

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

github-actions[bot] commented 1 year ago

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.