HowTo: Zigbee - read 4x wall switches TuYa TS0044 using Node Red

In a big part of mine smart home i use the Ikea TRADFRI E1743 push button. These can be used to conveniently switch up to four devices on and off.

Recently, however, I stumbled across the TuYa TS0044 wall switch shown here. This push-button can switch up to 12 devices with its four buttons. This is because it can not only evaluate short button presses. Short "double clicks" and long button presses are also registered. This means you can switch up to three devices per button.

In addition, the TuYa TS0044 wall switch also looks very stylish. The design is very much based on the typical wall buttons known from a fixed light installation. It is not even immediately obvious that there is a Zigbee button for the Smart Home hidden behind it.

How to connect the button to your Zigbee network and with Node Red can evaluate is described in the following article.

The TuYa TS0044 wall button is powered by a 2430 button cell. The format is a bit unusual, but should provide the wall button with more energy than the usual 2032 button cells.

The button cell can also be changed after the wall button has been attached to the wall.


Safety instructions

I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/

Affiliate links/advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂 


Requirements

Helpful articles:
Before you start this article, you should have prepared a Raspberry Pi so that it can be reached via the network and controlled via SSH. Of course, zigbee2mqtt and Node Red should also be installed and configured.

In the following lists you will find all the parts you need to implement this article.

Required tool:

NumberLink
1xScrewdriver set  Buy at Amazon
1xSD card reader  Buy at Amazon

Required material:

NumberLink
1x No products found. No products found.
1xSONOFF Zigbee 3.0 USB Dongle Plus  Buy at Amazon
1xUSB extension cable  Buy at Amazon
1x Raspberry Pi  Buy at Amazon
1x Raspberry Pi power supply  Buy at Amazon
1x Raspberry Pi case  Buy at Amazon
1x Micro SD card 64GB  Buy at Amazon


Enable Zigbee2mqtt Dashboard

In my opinion, the easiest way to add new devices to your Zigbee network is to use the zigbee2mqtt dashboard. In case you haven't activated this yet, you will find helpful hints in the article Zigbee - Administration of Zigbee2mqtt via the dashboard.


Register the button at zigbee2mqtt

Before you use the TuYa TS0044 wall switch Node Red evaluate it, you must first integrate it into your Zigbee network.

I have a little more detail on how to integrate devices into your own Zigbee network in the article Zigbee – register devices or sensors and actuators with zigbee2mqtt described. The following two steps summarize this briefly.

View of the log tab of the zigbee2mqtt dashboard. The area marked in red contains the button with which access to the Zigbee network can be controlled. Click on this to unlock access to the Zigbee network.

To put the TuYa TS0044 wall button into pairing mode, you have to insert the battery and the button bottom left

  • hold down for about 10 seconds

The LED in the button should then flash and the button should connect to your Zigbee network shortly afterwards.

You can track the status of the connection process in the zigbee2mqtt log.


Log into the NodeRed configuration interface

Before you can edit your NodeRed configuration, you must - if activated - first log into the NodeRed configuration interface.

View of the login dialog. Here you have to enter the login data that you specified during the configuration of the login. You can find information about this in the article NodeRed - set up user login.


Import node code

The dashboard node should already be installed and configured so that you can also control your Zigbee device via the NodeRed dashboard or display the values. You can find information about this in the following article.

If you are also over pushbullet If you want to be automatically reminded of a dead battery in your Zigbee button, you should also have the pushbullet node installed. You can find information about this in the following article.

As an alternative you can of course also pushover or E-mail use as a notification. You can find information about this in the following articles.

After that, all you have to do is import the NodeCode linked below into your NodeRed environment. Information on how to import NodeRed code can be found in the article Node Red - Import and export Node code .

As always, you can find the NodeRed code in the Nerdiy Git repository under the following link:

View of the Node Red code in the Node Red configuration view.

Of course, you still have to adapt the code to your push-button. For this to work correctly, you must enter the IEEE address or the "friendly name" of your push-button in the Node Red code.

To do this, open the properties of the selected node and enter your IEEE address in the selected area under "Payload...". How to find out the IEEE address of your Zigbee device is described in the article Zigbee – register devices or sensors and actuators with zigbee2mqtt described.

At the point marked here you can also adjust the message that is sent as soon as the charge level of the button's battery falls below 20%.

The respective keystrokes are forwarded to the debug nodes in the red marked position.

Just try it out and then connect the keystrokes to the functions you want.

You can of course also use the newly registered Zigbee device via the zigbee2mqtt Dashboard control or read out.

In the following category I have also listed other Zigbee devices which can be controlled or read out with the Node Red code offered there.


More articles on the topic

I have summarized other articles on the subject of Zigbee and zigbee2mqtt in the following category. There you will also find articles on various Zigbee devices and how they look like Node Red can be controlled.

External links:


Have fun with the project

I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂

PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂

Buy Me a Coffee at ko-fi.com       

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.