# Reading a device

**URL:** https://discourse.nodered.org/t/reading-a-device/87633
**Category:** General
**Created:** [1 May 2024 21:54 UTC](https://discourse.nodered.org/t/reading-a-device/87633 "2024-05-01T21:54:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jmgimo75](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jmgimo75](https://discourse.nodered.org/u/jmgimo75)
#### Post date: [1 May 2024 21:54 UTC](https://discourse.nodered.org/t/reading-a-device/87633/1 "2024-05-01T21:54:01Z")

</div>

Before, on a device it read as follows:  
{"dps":24,"set":"000000000000"} text {"data":{"dps":{"1":false},"t":1714599444},"deviceId": "bfb66a17fd95982996kw4n"," deviceName":""Input Light"}

Now after changing the device for an identical one, I read:  
{"data":"3.3\u0000\u0000\u0000\u0000\u0000\u0000]Y\u0000\u0000\u0000\u0001e����\u0003�Ϲ���, �F7�ϛ �\u0005zK�E �Hey슆\u0002E ��\u001d\u0010='$��\u0012��Y","deviceId":"bfb39fe512e1479cf1jcvl","deviceName":"Entry Light"}

My question, is how can I solve it?  
How can I read the other format again?

Thanks a lot

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 May 2024 05:00 UTC](https://discourse.nodered.org/t/reading-a-device/87633/2 "2024-05-02T05:00:10Z")

</div>

What is "the device"? A PLC? A sensor? A smart thing?

Does node-red run on this device or a computer or?

Was node-red flows, settings or anything changed in any way?

Please provide more detail.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [2 May 2024 09:33 UTC](https://discourse.nodered.org/t/reading-a-device/87633/3 "2024-05-02T09:33:30Z")

</div>

Without anything solid to go on, my guess would be that the replacement device is not configured the same as the old one.

Is this connected via USB or Serial? If so, it probably has different serial settings.

---

<div class="post-metadata">

### Author: ![jmgimo75](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jmgimo75](https://discourse.nodered.org/u/jmgimo75)
#### Post date: [2 May 2024 18:00 UTC](https://discourse.nodered.org/t/reading-a-device/87633/4 "2024-05-02T18:00:41Z")

</div>

Good again.  
First of all, thank you very much for your attention.

The device is: GIRIER-Smart Dimmer Switch Module Wifi Device. Through the Tuya Smart app and the IO Tuya program, as a communication gateway with NodeRed.  
This is the link of the device on Aliexpress:  
[https://es.aliexpress.com/item/1005005366347080.html?spm=a2g0o.order\_list.order\_list\_main.116.6779194duKSMS4&gatewayAdapt=glo2esp](https://es.aliexpress.com/item/1005005366347080.html?spm=a2g0o.order_list.order_list_main.116.6779194duKSMS4&gatewayAdapt=glo2esp).

What you should be reading:  
DPS: 20 / STYLE: Boolean / MARGINS: true/false / DESCRIPTION: On/Off  
DPS: 21 / STYLE: chain / MARGINS: white/color / DESCRIPTION: White or color selection  
DPS: 22 / STYLE: Int / MARGINS: 0…100 / DESCRIPTION: % white power

I use NodeRed to interface Tuya Smart and an S7-1200 plc. Being able to give on-off commands from the PLC.

Thank you so much
