Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moes Smart Zigbee Push Button Switch 2 Gang: _TZ3000_18ejxno0 / TS0012 #6798

Closed
MrMEScott opened this issue Mar 13, 2023 · 24 comments · Fixed by #6801
Closed

Moes Smart Zigbee Push Button Switch 2 Gang: _TZ3000_18ejxno0 / TS0012 #6798

MrMEScott opened this issue Mar 13, 2023 · 24 comments · Fixed by #6801

Comments

@MrMEScott
Copy link

Device

  • Product name: Moes Smart Zigbee Push Button Switch 2 Gang
  • Manufacturer: _TZ3000_18ejxno0
  • Model identifier: TS0012
  • Device type :
    • Switch

Screenshots

image

Basic

Screenshot from 2023-03-13 13-05-01

Identify

image

Groups

image

Scenes

image

On/Off

image

@Mimiix
Copy link
Collaborator

Mimiix commented Mar 13, 2023

Hi,

Please add all screenshots of all clusters in full. including the attributes section being read.

Kind regards,

@MrMEScott
Copy link
Author

Sorry about that. The cluster info panels are longer than my screen, so these screengrabs come in sections.
The content seems to be the same for both switch 1 and switch 2, with the exception of the On/Off attributes.

Identify

1 of 2

Identify_1

2 of 2

Identify_2

Groups

1 of 3

Groups_1

2 of 3

Groups_2

3 of 3

Groups_3

Scenes

1 of 5

Scenes_1

2 of 5

Scenes_2

3 of 5

Scenes_3

4 of 5

Scenes_4

5 of 5

Scenes_5

On/Off

Switch 1, 1 of 2

OnOff_1

Switch 1, 2 of 2

OnOff_2

Switch 2, attribute section (the switch was on when I grabbed this)

image

@BabaIsYou
Copy link
Contributor

BabaIsYou commented Mar 13, 2023

Could you try this DDF ?

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3000_18ejxno0",
  "modelid": "TS0012",
  "product": "Battery 2 gang switches",
  "sleeper": true,
  "status": "Silver",
  "subdevices": [
    {
      "type": "$TYPE_ON_OFF_LIGHT",
      "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",
          "default": "none"
        },
        {
          "name": "state/on",
          "refresh.interval": 5
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_ON_OFF_LIGHT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x02"
      ],
      "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",
          "default": "none"
        },
        {
          "name": "state/on",
          "refresh.interval": 5
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ]
}

@MrMEScott
Copy link
Author

I'd be happy to, if I knew how to! :)
Where do I put it / how do I install it?

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2023

Depend of OS.
For classic OS

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.

For HA https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839 need to put it in the folder /data/.local/share/dresden-elektronik/deCONZ/devices/

It's a wired device ?

@MrMEScott
Copy link
Author

MrMEScott commented Mar 13, 2023

It's a wired device ?

It is. See https://www.amazon.co.uk/dp/B096W1J72D

Everything is a little bit more complicated for me because I'm running the deCONZ Docker container so I'm on a steep learning curve to work out how to do apparently simple things like copying a file to a suitable location.

@MrMEScott
Copy link
Author

Suppose I copied the DDF @BabaIsYou posted, then what? I restart deconz, then does the device become discoverable by Phoscon? Do I have to re-pair it? Or is there some other step I need to take to make it visible to the Home Assistant deconz integration?

@Mimiix
Copy link
Collaborator

Mimiix commented Mar 13, 2023

Suppose I copied the DDF @BabaIsYou posted, then what? I restart deconz, then does the device become discoverable by Phoscon? Do I have to re-pair it? Or is there some other step I need to take to make it visible to the Home Assistant deconz integration?

Restart deconz. Re pair might also work after that.

@Mimiix
Copy link
Collaborator

Mimiix commented Mar 13, 2023

Suppose I copied the DDF @BabaIsYou posted, then what? I restart deconz, then does the device become discoverable by Phoscon? Do I have to re-pair it? Or is there some other step I need to take to make it visible to the Home Assistant deconz integration?

Restart deconz. Should show up in the rest api.

You can see the events in Phoscon under help, then api information.

@Mimiix
Copy link
Collaborator

Mimiix commented Mar 13, 2023

If it works, the hex name should be gone and has something like switch.

Additionally i am not sure if we need a button map?

@MrMEScott
Copy link
Author

Doesn't seem to have worked. Did I put the DDF in the right place?

I connected to the deconz-docker container docker exec -it e7e2a4dcda4d /bin/bash, and found myself at a root command prompt. There was no directory '.local/share/dresden-elektronik/deCONZ/devices', so I created it, and then, back out of the container bash shell, I copied the DDF to that directory by docker cp TX3000.ddf e7e2a4dcda4d:/.local/share/dresden-elektronik/deCONZ/devices

Restarted deconz by docker-compose restart , but Phoscon still doesn't see it. Tried re-pairing, but nothing found.
In deconz UI the device still shows with name 0xED8B.

I then put the DDF in the /usr/share/deCONZ/devices/ directory in the Docker container, again restarted deconz, but still nothing appears.

@BabaIsYou
Copy link
Contributor

If you gain access to DeConz gui then you can edit DDF and simulate a save as … just to get the path ;-)

@MrMEScott
Copy link
Author

If you gain access to DeConz gui then you can edit DDF and simulate a save as … just to get the path ;-)

I don't see any option to edit DDF in the deConz gui. I'm accessing it via VNC, and the only window on the desktop is deCONZ - Conbee II (/dev/ttyACM0). I have no way to open other windows.
Unde deConz preferences I see an interface to add/remove ZCLDB XML files but I guess that's something different?

@BabaIsYou
Copy link
Contributor

You should have this
image
and then after selecting a device on the right map, you have to select the far right radio button to display the clusters list
image
after that slect the basic cluster and do a click on "read" button above attributes list
image
Then with Control+E or in the Edit menu you gain access to the DDF Editor
image

Then perhaps could you load the previously copied DDF and save it the place Deconz offers you to to do with Save as option

image

Hope this help with the other indication given by Smanar and Mimiix

@BabaIsYou
Copy link
Contributor

BabaIsYou commented Mar 14, 2023

I also modified the DDF in the initial post because the fingerprint part was useless and false, then I propose a specific DDF for this device. Hope that it doesn't need buttonmap as Mimiix suggested.

BTW, you have also to change the setting in DeConz to pick up "Silver" DDF. Bronze and Silver status DDFs must explicitly be enabled prior to usage in the Control panel. Select Panels -> Control in deCONZ GUI to have the respective panel show up at the left bottom, then make your choice. Having a look at https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/DDF-cheat-sheet should also help.

@MrMEScott
Copy link
Author

I don't see a Control entry in the menu. Here's what I have:
image

This has opened a whole new can of worms.

I'm running the marthoc/deconz Docker image, which I hadn'r realised is now deprecated in favour of deconzcommunity/deconz.
Should I migrate to the new one? Or maybe there's some startup parameter I can use on the existing container to surface the Control panel?

@Mimiix
Copy link
Collaborator

Mimiix commented Mar 14, 2023

I don't see a Control entry in the menu. Here's what I have: image

This has opened a whole new can of worms.

I'm running the marthoc/deconz Docker image, which I hadn'r realised is now deprecated in favour of deconzcommunity/deconz. Should I migrate to the new one? Or maybe there's some startup parameter I can use on the existing container to surface the Control panel?

Yes, you need to migrate. Your on a very old version of deCONZ.

@MrMEScott
Copy link
Author

Hallelujah! Thanks to everyone for your patience and advice, I finally have the switch working in Home Assistant.

It was a bit of a journey of discovery. I backed up my old deconz configuration, and took down the container. Then had a few false starts getting the deconzcommunity/deconz container to work. Firstly the example docker-compose file needed some editing - to use host networking like the old one, and to add the VNC related environment variables.
Then I was able to access the deconz DDF editor and so discover the right location for @BabaIsYou 's DDF.
Then Phoscon came up with a blank Gateway page - a Google search revealed that I needed to clear the browser cache.
Finally I restored my backup config, restarted deconz, and... nothing.

But I'd noticed that the Control menu specified only using "Gold" level DDFs, so I changed that to "Silver" which is what's in that DDF, and as if by magic the switch unit was found, and turned up in Home Assistant after reloading the deconz integration.

Now at last I can get on with my plans to automate these lights, which are on my drive, so that they turn on and off based on proximity, ambient light levels, time of day, etc.

Thanks again!

@Smanar
Copy link
Collaborator

Smanar commented Mar 14, 2023

Just for information there is a shared/persistent folder in the official deconz docker, you can just put your DDF in the opt/deCONZ/devices folder.

deconz-community/deconz-docker#163

@BabaIsYou
Copy link
Contributor

Just to be sure, is it working each button individualy ?

@MrMEScott
Copy link
Author

Just for information there is a shared/persistent folder in the official deconz docker, you can just put your DDF in the opt/deCONZ/devices folder.

deconz-community/deconz-docker#163

I found it, and that's where I put the DDF.

@MrMEScott
Copy link
Author

Just to be sure, is it working each button individualy ?

Yes, I have two entities in Home Assistant and I can control them individually.
image

although it displays in deconz gui with only the name I gave to the #1 endpoint.
image

@MrMEScott
Copy link
Author

I think this can close now?

@Mimiix
Copy link
Collaborator

Mimiix commented Mar 15, 2023

No, don't close yet. I've linked the PR to this issue and if that one is merged this will auto close :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants