tuya-cloud-to-influxdb icon indicating copy to clipboard operation
tuya-cloud-to-influxdb copied to clipboard

TypeError: Cannot read properties of undefined (reading 'type')

Open yjeanrenaud opened this issue 1 year ago • 1 comments

/home/user/tuya-cloud-to-influxdb/lib/common.js:31
    if (def.property.type === 'value') {
                     ^

TypeError: Cannot read properties of undefined (reading 'type')
    at /home/user/tuya-cloud-to-influxdb/lib/common.js:31:22
    at Array.forEach (<anonymous>)
    at Object.getDeviceMeasurement (/home/user/tuya-cloud-to-influxdb/lib/common.js:26:24)
    at /home/user/tuya-cloud-to-influxdb/cli.js:75:34
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.12.1

yjeanrenaud avatar Nov 23 '22 12:11 yjeanrenaud

Sorry but I don't have any Tuya devices anymore (I've converted them to Tasmota FW for easier integration with HA).

When You raise an issue, it would be great to write steps to reproduce - from the backtrace I assume You've tried to get the current data from some device. Probably the error relates to some changes in API on Tuya servers.

You can verify it by enabling debug output:

DEBUG=* ./cli.js show

(You will see the raw JSON data being sent/received)

nalajcie avatar Nov 23 '22 12:11 nalajcie