Yagusmart 4 button Scene Switch

Great work! Mine works now, finally! Mine is basically the same as Martin_P's. The box and the back are identical, except my MPN is 171600000285 where his ends in 248. He didn't picture his buttons though.

Mine have dots at the bottom center of each. Top left has 1 dot, top right 2 dots, bottom left 3 dots, and bottom right 4 dots.

The custom driver generates events so that button 1 is bottom left, button 2 is bottom right, button 3 is top right, and button 4 is top left. A bit odd, but no show stopper.

4|3
1|2

Anyway, THANKS, KKOSSEV for the great work with the driver!

1 Like

Unfortunately that quirkiness with the button numbers is how they actually made it in the factory and not an issue with the driver

@kkossev you are amazing. thanks for figuring this out.. so far the 4 I had and thought were garbage but held just in case are now alive and working well.. thank you

2 Likes

Amazing work.

Mine is identical.

I'm pretty sure I have "normal layout":

1|2
3|4

I will see at the weekend how it will be after changing the driver.

That is the normal layout for this particular hardware. Ie all the ones that "look like" this device. I wouldn't want a driver to reverse this as I have all my button rules set up with this button layout assumed

If it's more convenient for you, it's good.

Through "the normal layout" I was thinking about the dots printed by the manufacturer.

Maybe I was wrong, but for me it is logical that the button with one printed dot should be number 1, the button with two dots is number 2 etc.

Similarly, I set it up at home on another system. each touch panel follows this sequence:

1|2
3|4
5|6
7|8

Of course, on my panels it does not matter which button is related to what but in the software the buttons are marked from left to right and so I know which circuit is on which button when i change something in my object manger.

But hey... it is more important that it works for us.

The HE built-in driver that works with the older model TS0044 has a 'Reverse button order' preference setting, which I think does exactly the same reordering of the button numbers. The default keys settings are however the same as in the TS004F driver.

I can add the same option in this driver, hopefully during the weekend.

Well if I can get all my 4-button devices working the same way round then I don't mind updating my button rules from this point forward. I also have a Wallmote Quad with buttons in a different order from the Yagusmarts, sigh.

Actually, checking, the Wallmote does go 1/2 then 3/4 below so if I chose the button reversal (it's not exactly a reveral) option I could just add the yagusmarts to the rule I had to make specially for the wallmote.

I'm just grateful that you got it working in the first place! I can live with strange numbering!

1 Like

A new driver version 2.2.1 was just published, where there is a new "Reverse button order" preference option. When selected, buttons numbering will be 1-2-3-4 going from top left to the bottom right. This should match these models, that have dots engraved on the buttons.

I have also applied for including the driver repository into Hubitat Package Manager (HPM), so hopefully, future updates will be applied much easier and conveniently.

1 Like

"Tuya Scene Switch TS004F" driver is now available for installation from the Hubitat Package Manager community app.

For new installations, you can search by keyword TS004F. For existing manual installations of the same driver, you can use "Match Up" function to ensure you will be notified of future updates.

EDIT 04/24/2022: "Tuya Scene Switch TS004F" driver dedicated thread is : "Tuya Scene Switch TS004F" driver

3 Likes

Are you able to add the battery level, please?

1 Like

In fact I see you do have code related to battery level in the driver, checking events shows it is reporting! But it's not appearing on the Edit Device page. I added the line capability "Battery" and I await to see if it appears there.

Yes, you are right, this is the only line of code that must be added to the driver.
I will publish the updated version in a few days - no other changes, just some (careful) code cleanup.

2 Likes

Version 2.2.2 is now available from Hubitat Package Manager.

  • added battery reporting capability;

  • added button push() doubleTapped() and held() handlers for use in Hubutat dashboards

  • code cleanup

image

image

3 Likes

I am trying to get this switch to work with zigbee2mqtt. Is there anything I can do with the groovy solution to make this work in z2m?

@michalk z2m developers need to implement the custom initialization sequence somewhere into the code I think... This device can be initialized in scene mode only during the ZigBee initial pairing / interviewing process.

1 Like

Hi, I would like to help report that this driver is working PERFECTLY even with my MOES Scene Switch. The TS004F version works fine and all my 4 buttons works. Hoping that others using the MOES sees this too.

1 Like

I have a few of these Yagusmart scene switches ( TS0044) and they have worked well. I've just moved one to be on my desk so it is in my line of vision though, and a couple of times I have noticed the green LEDs flash on and off. The battery is showing 100%. Looking at the device events log the flash would seem to coincide with the battery update which seems to occur every 30 mins. (edit it's actually sending a battery status report every 20 mins and the LED flashes everytime - my other units don't send a battery report anything like as often -weird!)

Not sure this would be popular in a bedroom when it's pitch black.

This prompted me to look at mine (the TS0044s) and I have noticed that one of them stopped reporting battery status a couple of weeks back although it's working perfectly as a button,