subzero79 / node-red-contrib-tuya-local

NodeRED node to control tuya devices locally. Based on tuyapi module
29 stars 17 forks source link

JSON Request for Requesting current data from SmartPlug #25

Open Idefix0496 opened 4 years ago

Idefix0496 commented 4 years ago

Hi, I would really like to know how on Earth I can Request the Current Values (Voltage, Current, etc.) from my SmartPlug. In node Red the Plug is configured and working but I'm only getting real time Values if I have the App open. With {"set":true, "dps": 1} and {"set":false, "dps": 1} I can switch the Plug On an Off. So my question is what the JSON Request for Requesting all or just a particular set of Data looks like.

subzero79 commented 4 years ago

Not all smart plugs report power usage. If is not coming out on normal usage when is on and on load I think it doesn’t have capability.

Idefix0496 commented 4 years ago

Hi, thanks for the fast Reply. The PowerPlug is perfectly capable of Measuring these Values. As I have stated earlier, If I have the App open and the Powermeter of the SmartPlug selected, NodeRed is Displaying all the Data under Payload in the Debug Screen. My Problem is to How to Request these messages manually.

EDIT: I've fidlled around with Commands like "get" and "schema" but I'm always getting a JSON Error in the Injection Node.

subzero79 commented 4 years ago

If i am not mistaken just sent a payload with a string "request".