If you use NODERED there is a tuyasmart plugin that works extremely well. Still needs the id and key, but works. Below is one of my many flows to control the switch and energy. You will also need an Openhab plugin.
[{"id":"5f16131c.a1f42c","type":"openhab-v2-in","z":"30c0a648.302bba","name":"","controller":"2535dec5.17e512","item":"SmartLifeSW12b","ohCompatibleTimestamp":false,"eventTypes":["ItemCommandEvent"],"outputAtStartup":true,"storeStateInFlow":false,"x":80,"y":740,"wires":[["9c605353.6e998"],[]]},{"id":"9c605353.6e998","type":"change","z":"30c0a648.302bba","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"ON","fromt":"str","to":"{\"set\":true, \"dpsIndex\": 2}","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"OFF","fromt":"str","to":"{\"set\":false, \"dpsIndex\": 2}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":740,"wires":[["3fbbcb4c.2cd4a4"]]},{"id":"3fbbcb4c.2cd4a4","type":"tuya-smart","z":"30c0a648.302bba","deviceName":"Mini Plug 12b","deviceIp":"192.168.1.67","deviceId":"10670365bcddc2fa5507","deviceKey":"4283f743e3a856b0","request":"{\"schema\": true}","pollingInterval":10,"x":440,"y":740,"wires":[["6af32640.d2b8b8","9fd1da8.12c2428"]]},{"id":"6af32640.d2b8b8","type":"switch","z":"30c0a648.302bba","name":"","property":"payload.data.dps[\"2\"]","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":570,"y":740,"wires":[["f1080e07.bb6ac"],["bbe5d8ea.f10fa8"]]},{"id":"9fd1da8.12c2428","type":"function","z":"30c0a648.302bba","name":"Power","func":"var newmsg = {};\nnewmsg.payload = {};\nnewmsg.payload = msg.payload.data.dps[\"8\"]/10;\nreturn newmsg;","outputs":1,"noerr":0,"x":570,"y":780,"wires":[["cd6437f4.ae41f8"]]},{"id":"cd6437f4.ae41f8","type":"openhab-v2-out","z":"30c0a648.302bba","name":"","controller":"2535dec5.17e512","item":"SmartLifeSW12Energy","topic":"ItemCommand","topicType":"oh_cmd","payload":"payload","payloadType":"msg","storeStateInFlow":false,"x":800,"y":780,"wires":[]},{"id":"bbe5d8ea.f10fa8","type":"openhab-v2-out","z":"30c0a648.302bba","name":"","controller":"2535dec5.17e512","item":"SmartLifeSW12b","topic":"ItemUpdate","topicType":"oh_cmd","payload":"OFF","payloadType":"oh_payload","storeStateInFlow":false,"x":790,"y":740,"wires":[]},{"id":"2535dec5.17e512","type":"openhab-v2-controller","z":"","name":"Openhab","protocol":"https","host":"192.168.1.64","port":"8443","path":"","username":"","password":"","allowRawEvents":true}]