I am pulling my hairs out. I am a rookie regarding javascript and Homey apps, but I have been working on an app for a 433mhz device. Out of a sudden (or I have broke something), I get this error when trying to pair a remote:
[err] [MyApp] TypeError: Cannot read properties of undefined (reading 'name')
at AsyncFunction.listener (/app/node_modules/homey-rfdriver/lib/RFDriver.js:174:25)
at /app/node_modules/homey-rfdriver/lib/RFSignal.js:120:26
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I can’t recall making any change that caused the paring to fail. I am using the standard rf-transmitter-learn.html
when looking at the error, the specific line says:
await session.emit('createDevice', {
---> name: this[sRF].name, <----
data: {
uuid: RFUtil.generateUUIDv4(),
...signal.constructor.commandToDeviceData(command),
copiedFromRemote: true,
},
});
Looking at the object this[sRF]
it logs as undefined
so the error make sense, but can’t figure out what is causing it…
(when changing to: name: "something",
it pairs fine.