# Node-RED control-device node throw an error

**URL:** https://forum.ewelink.cc/t/node-red-control-device-node-throw-an-error/22019
**Category:** eWeLink CUBE
**Created:** [September 21, 2023, 8:16pm UTC](https://forum.ewelink.cc/t/node-red-control-device-node-throw-an-error/22019 "2023-09-21T20:16:13Z")
**Posts on this page:** 1
**Showing post:** 37

<div class="post-metadata">

### Author: ![SuiKa](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.ewelink.cc/suika/32/8656_2.png) [@SuiKa](https://forum.ewelink.cc/u/SuiKa)
#### Post date: [October 9, 2023, 3:40am UTC](https://forum.ewelink.cc/t/node-red-control-device-node-throw-an-error/22019/37 "2023-10-09T03:40:41Z")

</div>

Hi, aerograf.

For sync your temp and hum sensor data to a virtual device.

1. Use a register-device node to register a virtual device.  
 ![微信截图_20231009112435](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/b/b8bfddf986b9f5354e33bcd4f6d096af77b57d38.png)  
Here are some initial state  
 ![微信截图_20231009112446](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/6/687fe3027e4161cc961937c6bbfa1e4a7e05af60.png)
2. Use a event-state to monitor a real temp and hum sensor data.  
 ![微信截图_20231009112500](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/5/5b227b6e5565235f0738e7691b8e4569aaf157a4.png)
3. Use a function node to receive and transfer the data.  
 ![微信截图_20231009112534](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/e/ed462e9095f8d1c2e186d5820c964f7ab5e483e9.png)
4. Use a put-device-state node to recevie the data and sync to iHost.  
 ![微信截图_20231009112615](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/c/c17f1c4c5ecdeb9e269d5ae8ada7b70c5e9a82b0.png)
5. Then you can see your real data are synced to your virtual device.  
 ![微信截图_20231009112728](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/b/bdec3f5734d6dfb6e5c4438b638387e8e55bf625.png)

Here are the whole flow.

 ![微信截图_20231009113433](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/1/1d0818f9571291cd1c02a946db83e20f29596352.png)

As for a POWR3 synchronization, we are cuurently not support a register ability for POWR3.  
So you can’t register a virtual POWR3 device to iHost.  
But you can still receive a POWR3 data from a event-state node, like here

 ![微信截图_20231009113921](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/a/ae27697d252766b1d1011c3a492fa4deeb3a4b0d.png)

---

_[View the full topic](https://forum.ewelink.cc/t/node-red-control-device-node-throw-an-error/22019)._
