TCP Timeout error when using node-red-contrib-tplink-iot

With the code below, I succeeded to realize an own function node for a tp-link HS100 plug drectly with the tplink api. In this way, I can get and set the status of the plug and have no TCP Timeout-Error-Messages anymore. In the API-documentation, the access on the plug-object was described as ".relayState ⇒ boolean".
But now I want to realize the same thing for a tp-link HS110 plug meter (or a LB120 bulb) where the structure of the object is more complicated as I have to access (sub-)obects in the plug meter object.
In the API-documentation, this is described as e.g. ".getPowerState([sendOptions]) ⇒ Promise.<boolean, ResponseError>".
I tried a lot of days but didnt get it working.
Could anybody give me the code or an easy understandible code example on how to realize such a function call?
Help would be great.

const { Client } = global.get('My_tplink_API');

const client = new Client();

var relay_state = 0;

const plug = client.getPlug({ host: '192.168.XXX.XXX' });

//just get status
if (msg.payload === "getInfo")

{
const plug = client.getDevice({ host: '192.168.XXX.XXX' }).then((device)=>{
msg.payload = Number(device.relayState);
node.send(msg);

 });

}
//plug has been activated
else if (msg.payload === true)
{
plug.setPowerState(true);
relay_state=1;
msg.payload = relay_state;
return msg;

} else if (msg.payload === false)
    {
        plug.setPowerState(false);
        relay_state=0;
        msg.payload = relay_state;
        return msg;
    }

msg.payload = relay_state;
return;

Did you ever try the node-red-contrib-tplink-iot node?

Yes, and there is the problem. Unfortunately, the "ready to use" smart bulb and the smart plug nodes of this package send messages of their own that I can not stop or control. The results are error messages in the console window of my node red installation which lets the processor load climb more and more until my system "collapses". So I searched and found this function-node solution for the HS100 but for the HS110 and the LB120 tp-link products, my programming- / coding-skills are insufficent. I would be thankfull for further help.

Well if adjusting the poll interval and filtering out unwanted messages won't work, you will hqve to hope someone else will chime in on this issue

Thanks for your research.

No other hints or help?