This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Closed
Homey light switch not updated although reports are being received
RobinVanKekem
Member
I'm able to switch the switch through Homey but the status of the switch in Homey isn't updated when the physical switch is used.
The reports being send by the physical switch are received but Homey doesn't understand them.
In driver.js I have
Log output:
Full code:
https://github.com/inversion-nl/me.zwave
The reports being send by the physical switch are received but Homey doesn't understand them.
In driver.js I have
capabilities: {
onoff:
[
{
command_class : 'COMMAND_CLASS_SWITCH_BINARY',
command_get : 'SWITCH_BINARY_GET',
command_set : 'SWITCH_BINARY_SET',
command_set_parser : value => {
return { 'Switch Value': value }
}
},
{
command_class : "COMMAND_CLASS_SWITCH_BINARY",
command_report : 'SWITCH_BINARY_REPORT',
command_report_parser : report => {
console.log(JSON.stringify(report));
return report['Value'] === 'on/enable';
},
pollInterval : "poll_interval"
} ]
Log output:
[debug] node.CommandClass['COMMAND_CLASS_SWITCH_BINARY'].on('report') arguments: { '0': { value: 3, name: 'SWITCH_BINARY_REPORT' }, '1': { 'Value (Raw)': <Buffer ff>, Value: 'on/enable' }, '2': null } {"Value (Raw)":{"type":"Buffer","data":[255]},"Value":"on/enable"} [debug] node.CommandClass['COMMAND_CLASS_SWITCH_BINARY'].on('report') arguments: { '0': { value: 3, name: 'SWITCH_BINARY_REPORT' }, '1': { 'Value (Raw)': <Buffer 00>, Value: 'off/disable' }, '2': null } {"Value (Raw)":{"type":"Buffer","data":[0]},"Value":"off/disable"}
Full code:
https://github.com/inversion-nl/me.zwave
This discussion has been closed.
Comments
my guess you will need to check first if it is on, or off:
report => {
my mistake, the value is a sub value of "1":console.log(JSON.stringify(report)); if( report['Value'][1] === 'on/enable' ) return report['Value'] === 'on/enable' : 'off/disable';
},
Else Homey would report the switch on all the time, and it doesn't.
Tried your suggestion still not updating the state in Homey.
Had to change the code a bit because Visual Studio gave an lint error.
Forgot to thank you for your time!
So you could try to do it this way:
The default association group is default set to 3 times 0. Since Homey has ID 1, Homey did not receive any reports.
After changing that I started receiving the reports when using the physical button, but only for the main device, not for channel 1 or 2.
This device has 2 channels, ant Homey creates 3 devices, Domoticz did the same.
I don't get any reports of the first and second channel, only for the main device.
Anyone know how to do this?
I don't think athom has implemented different endpoint yet,
it should indeed create devices for all end points (this is 2 endpoints + the main device in your case)
This will include them separately in insight as well.
it did so in the previous Z-Wave, but now not just yet. (hopefully soon)
Thanks (again!)
Any idea as to why Z-wave creates three devices?
Domoticz also did this, I don't get why.
No problem.! that's why we have a forum
well it could be possible with just one device, but i have not seen any devices having 2 (or 3) on/off buttons (or dimming bars) in 1 device card, with being able to properly say which one is which.
So most controllers just include it as separate devices, and also because it's easier to handle as well.
And it's three (and not just two) because you can turn them on (or off) at exactly the same time with the main controller (inside the device).
you also need the one main controller to be able to send parameters etc.
Have send a direct message to Jeroen Vollenbrock on Slack to ask if they have some undocumented code somewhere or I'll have to wait.
I'm already working on the multi instance reporting issue with Jeroen Vollenbrock.
Did you create an Github issue for that?
If not: I think you should so people can potentially now that the issue is there and being worked on.
https://github.com/athombv/homey/issues/773