I 'solved' this by monitoring the Z-Way logs and trapping a signature that looks like:
01 09 00 04 00 xx 03 20 01 yy
where xx = the device id in hex and yy is the level in hex (yy == 0 means motion stopped, yy == FF means motion started)
These messages seem correctly formatted and are identical to e.g. the Everspring and Fibaro ones (provided BASIC ON/OFF is configured for the latter one). I am therefor puzzled they are not picked up correctly specifically for this device. Perhaps something is wrong in the ZDDX file? The motion instance shows as 'Generic' where the Fibaro one shows 'General Purpose' as Device Type in the Expert GUI.
I am looking at using the new HomeAutomation functionality for trigger management. I am not able to use it since it does not pick up the motion via the Z-Way stack. I have 5 of these devices at 70 EUR each so bit too expensive to replace, plus they work nicely with pets in the house since they don't detect motion below a certain height and can be powered via USB. So would be greatly appreciated if this could be fixed.
EZMotion PIR detector - any success?
-
- Posts: 26
- Joined: 04 Mar 2014 03:31
Re: EZMotion PIR detector - any success?
Checked device types of the different motion sensors mentioned and it seems the Everspring and Fibaro sensors report as device type 'Binary sensor' whereas the EZMotion reports as 'Multilevel sensor'. Raw Z Wave messages sent on motion detection seem identical though. Wrong device type detected/used?
Also, the value 0 for Level in the expert UI seems incorrect when dealing with a motion sensor. The other two report 'idle' and 'triggered'. See screenshot below.
Also, the value 0 for Level in the expert UI seems incorrect when dealing with a motion sensor. The other two report 'idle' and 'triggered'. See screenshot below.
Re: EZMotion PIR detector - any success?
Some Basic reports are also triggering Sensor Binary state changes inside z-way (for some special device classes), so you can see it for other sensors.
But they're never mapped to Multilevel Sensor states, so you don't see anything on EZMotion when Basic arrives. Even more, Basic report arrives for default channel, while Mutlilevel Sensor is located on a non-default one. There's simply no way it can be mapped automatically.
It is actually a pretty good question why it identifies as Multilevel sensor. And I don't have a reasonable answer to it.
Nevertheless, you can still handle Basic report in JS code and invoke explicit Get() for correct channel and command class.
But they're never mapped to Multilevel Sensor states, so you don't see anything on EZMotion when Basic arrives. Even more, Basic report arrives for default channel, while Mutlilevel Sensor is located on a non-default one. There's simply no way it can be mapped automatically.
It is actually a pretty good question why it identifies as Multilevel sensor. And I don't have a reasonable answer to it.
Nevertheless, you can still handle Basic report in JS code and invoke explicit Get() for correct channel and command class.
-
- Posts: 26
- Joined: 04 Mar 2014 03:31
Re: EZMotion PIR detector - any success?
pofs, thanks for your quick reply. Some questions remain.
I would love to throw my log monitoring code out for your nice HA JS implementation which looks great, but cannot due to this one sensor problem.
Is this something the device reports itself, or is this something provided by metadata such as the ZDDX file? Is there a means to change this into 'Sensor Binary' by changing an XML file?It is actually a pretty good question why it identifies as Multilevel sensor. And I don't have a reasonable answer to it.
Hoping you can tell me how. I was using the 'Data logging' module in the HA software to trigger on level change, but that seems to fire not at all or too many times (besides always having value 0), whereas my 'log monitoring' works 100% correct.Nevertheless, you can still handle Basic report in JS code and invoke explicit Get() for correct channel and command class.
I would love to throw my log monitoring code out for your nice HA JS implementation which looks great, but cannot due to this one sensor problem.
Re: EZMotion PIR detector - any success?
That is something the device reports itself. XMLs are mostly for a nice device picture and fancy parameter names, while device capabilities are determined by its NIF.
Try something like:
Try something like:
Code: Select all
var dev = zway.devices[7];
dev.Basic.data.level.bind(function(type) {
if ((type & 0x3F) == 0x01) {
dev.instances[1].SensorMultilevel.Get();
// or just dev.SensorMultilevel.Get(), not sure - try both
}
});
-
- Posts: 26
- Joined: 04 Mar 2014 03:31
Re: EZMotion PIR detector - any success?
Thanks for the example. I decided to try it out with a sensor that normally works fine (The everspring, device 5):
No 'fired' message when I triggered the motion sensor. Same for device 7 (the EZMotion).
However, this works just fine on the everspring:
Which printed:
as expected.
I did another simple test on the EZMotion (device 7) by asking for any changes after a certain timestamp. I started with state 'Idle' and triggered motion.
Then I asked for any changes since the last date by issuing: http://10.0.0.11:8083/ZWaveAPI/Data/1428017861, and I got only this change back (cut out only 'devices.7.*'):
which is of no value, since the value is always 0, whether triggered or idle.
Any suggestions how to proceed?
Note: I am on v2.0.0
Code: Select all
zway.devices[5].Basic.data.level.bind(function(type) {
console.log("fired zway.devices[5].Basic.data.level");
});
However, this works just fine on the everspring:
Code: Select all
zway.devices[5].instances[0].commandClasses[48].data[1].level.bind(function(type) {
console.log("fired zway.devices[5].instances[0].commandClasses[48].data[1]");
});
Code: Select all
[2015-04-03 01:33:56.418] [I] [core] fired zway.devices[5].instances[0].commandClasses[48].data[1]
I did another simple test on the EZMotion (device 7) by asking for any changes after a certain timestamp. I started with state 'Idle' and triggered motion.
Then I asked for any changes since the last date by issuing: http://10.0.0.11:8083/ZWaveAPI/Data/1428017861, and I got only this change back (cut out only 'devices.7.*'):
Code: Select all
devices.7.data.lastReceived: {
value: 0,
type: "int",
invalidateTime: 1421504307,
updateTime: 1428017954
},
Any suggestions how to proceed?
Note: I am on v2.0.0