In homey-rfdriver/RFDevice.js, onCommandMatch compares currentDeviceData with commandDeviceData.
async onCommandMatch(command) {
const signal = await this.driver.getRFSignal();
const currentDeviceData = await this.getData();
const commandDeviceData = signal.constructor.commandToDeviceData(command);
return RFUtil.deepEqual(currentDeviceData, commandDeviceData);
}
IN MY TEST CASE:
commandDeviceData contains:
2023-11-27T15:56:12.216Z [log] [ManagerDrivers] [Driver:temphum] [Device:533e1d76-2662-4df2-beda-db93baec23b3] { address: 209 }
currentDeviceData contains:
2023-11-27T15:56:12.218Z [log] [ManagerDrivers] [Driver:temphum] [Device:533e1d76-2662-4df2-beda-db93baec23b3] {
uuid: ‘6cc3317a-39d9-4db9-b076-5af17952f0b2’,
address: 209,
copiedFromRemote: true
}
From this link (Home - Homey RFDriver) the suggestion is the following for commandToDeviceData:
static commandToDeviceData(command) {
return {
address: command.address,
};
}
MY QUESTION:
The result of onCommandMatch will never be True. Should I add somehow uuid and copiedFromRemote values? If yes, how?
Please help me someone. I am a beginner for homey and do not have huge programming skills, but working on a 433mhz automation for munths and suffering a lot
Thank you in advance, if you take a few minutes on this.