Remote control to control lights

Hi Gents & Ladies.
I just expanded my Homegenie system with a 4 button remote, Aeotec Wallmote (Z wave). It looks great and has good features.
So far i have managed to control 1 wall plug with it via a very simple program i created.
Now to the quiestion. How can i create a function that will turn of all my gear with a touch of a button or say, trigger the all lights off?
If i press button nr 2 (top right) on the remote it says: Unknown parameter [object object) in the logs.

This is my ~20th device in total and i have never had a 4 button remote before. This is also my first device that is not recognized by Pepper-One DB.
Device info below:

Many thanks and kind regards,
Tompa

Hi, @70MP4.

I have no experience with such devices but I think you can easily find out commands from your remote and handle them using programs.
First of all, enable Events History on the Maintenance page:

Then from any page click on the blue circle in the top right corner of the page and this will open an Events page. Press buttons on your remote and you will see corresponding events on appearing on the page.

On the example above I used my Fibaro dimmer which supports second key operations and pressed it 1, 2 and 3 times respectively. So in my case pressing the second button two times produces a Sensor.Generic event with value 24.
Now I can write a program that reacts to this event:

When.ModuleParameterChanged((module, parameter) => {
  if (module.Instance.Domain == "HomeAutomation.ZWave" && 
      module.Instance.Address == "3" &&
      parameter.Name == "Sensor.Generic" && 
      parameter.Value == "24")
  {
      // do something
  }
  return true;
});
// the program will be running in the background waiting for events
Program.GoBackground();

See more information about programs here: https://genielabs.github.io/HomeGenie/#/develop/programs.
To turn off all lights you can use something like

// turn off all lights
Modules.OfDeviceType("Light,Dimmer,Switch").Off();
1 Like

Hello
Thank you for this lesson.
I have been trying for some time to get the multi Inputs (L2,L3) of the Z-Wave Qubino Flush Dimmer Plus to work.
I will give this a go when my new modules get here.

Thanks
IanR

Thanks for the suggestions. I will give it a try and let the forum know.

Many thanks,
T

Hi Bounz, my problem is that when i press button 2,3 and 4 i get this(21:14:01, object object):

Any suggestions?

Kind regards,
T

Hi, Thomas.

Looks like the data being sent from your device are not correctly parsed by HG, so it handles this data as an object and when it is serialized you see [object Object].

The other possibilities to check, what has been sent are:

  1. write a program that logs your data to the browser’s console (but if [object] is originated inside the backend then this method will not help)
  2. check the raw ZWave data in logs or
  3. use ZWave Test program to see the data sent over ZWave network.

Here is an example of what you can see in ZWave Test program:

2017-11-06 11:45:29.6305	SerialPortLib.SerialPortInput.OnMessageReceived	Debug	01-0A-00-04-00-03-04-2B-01-19-FF-3A
2017-11-06 11:45:29.6320	ZWaveLib.ZWaveMessage..ctor	Debug	ZWaveMessage (RawData=01-0A-00-04-00-03-04-2B-01-19-FF-3A)
2017-11-06 11:45:29.6336	ZWaveLib.ZWaveMessage..ctor	Debug	ZWaveMessage (Direction=Inbound, Header=SOF, NodeId=3, Type=Request, Function=ApplicationCommandHandler, CommandClass=SceneActivation)
2017-11-06 11:45:29.6352	SerialPortLib.SerialPortInput.SendMessage	Debug	06
2017-11-06 11:45:29.6368	ZWaveLib.ZWaveController.OnNodeUpdated	Debug	NodeUpdated (NodeId=3, Parameter=SensorGeneric, Value=25)
NodeUpdated 3 Event Parameter SensorGeneric Value 25

UPDATE:
After digging into the code I’ve found that despite CentralScene command class is implemented in ZWaveLib, nobody updated MIG library to handle events from this command class handler :disappointed:.

UPDATE 2:
Created 2 pull-requests to fix this:
ZWaveLib: https://github.com/genielabs/zwave-lib-dotnet/pull/30
MIG service: https://github.com/genielabs/mig-service-dotnet/pull/13

Many thanks will give it a try,

BR
T