Linking tuya web platform devices

I'm using the node-red-contrib-homebridge-automation since month. in the last days I can switch with the hb-control node the lights on and off, but if someone switches the light at the switch, over home bridge or HomeKit, the status change does not arrive node red. the status is the whole time "0".

in former times I could read the status with the hb-status node.
how can I make it work again or even better, how can I directly read the status of Tuya web platform devices? in home bridge it works without problems, but I couldn't find a palette, which does the same in node red, so I chose last year the home bridge automation palette

who has a tipp for me?

I use those things I think. (Or TASMOTA... I don't quite get all the names)

But maybe you need to monitor the power messages in/on MQTT and set the message controls the state shown.

I use the node-red-contrib-tuya-smart-device to control my Tuya devices. There are a few hoops to jump through to get it working but once going works well.

MQTT would be so nice, but these Tuya device I couldn’t change to tasmota. So I need a solution over Homebridge or node red to get the power status. With that I will bring it into mqtt and can use my light steering again.

Thanks for replying. I have a linked iot app linked in Homebridge. An there it works. But if I look at the iot site, there are no linked devices.

I hope I will get it running again in node red.

Do you got a good explanation or YouTube video source for it?

Hey Buckskin,

Now I got the ids and keys for my Tuya devices, but I can’t get it running. What do you insert in the inject node to get the status of my switch out?

Depends on the device but this is a short section of an old function node that does that does the trick;

    // Get device current status (Normally only at STARTUP). Note operation === "SET" is default
    if (operation === "GET") {
        msg.payload = {dps: command_dps, operation: 'get'};

    } else {
        msg.payload = {dps: command_dps, set: command_value};

    }

So to turn on my light the inject node msg.payload would be set to JSON and {"dps": 20, "set": true}
To get the status of a device, in this case a power socket, the payload should be set to {"dps":1,"operation": "get"}. The dps can vary dependant on the device (for the status of a light for example the dps is 20)

If you have been using the device previously then presumably you have the dps codes for the various attributes of the device.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.