Using LightwaveRF remote with RFXCOM USB plugin

I am using a LightWaveRF remote as a cheap alternative to Z-Wave remote. It sets up a virtual binary light switch for each button pair. I can set up Scenes to control my Z-Wave devices that that trigger when the LwRF remote is operated.
This works well if I exclusively use a single LwRF remote to control my scenes, but I also use wall switches and other Z-Wave controllers. This means that the state of the Z-wave device will not match the state of the virtual LwRF switches that represent the remote. When this happens, activating the LwRF remote does not trigger the scene because it thinks my LwRF device is already in the required state. The only way I can re-trigger the scene is to toggle the LwRF remote ON/OFF or OFF/ON (depending on current state), which is very annoying.

Is there any LUUP code I can implement to always trigger a scene with these virtual RFXCOM devices?
If not, can anyone think of a creative way to work around this problem?
I am using Vera Lite with UI5 version 1.5.346. Many thanks.
jtmoore.

I’m replying to my own post, as I think I have a solution…
The RFXcom switch devices seem to always remember their state, so repeatedly pressing the On (or Off) button does not update the power status and therefore does not trigger any scenes associated with it. I have to fool the device into thinking it is neither On or Off, so that a button press on the remote will trigger the relevant scene. To do this, I am setting power status to -1, as per this example:

luup.variable_set("urn:upnp-org:serviceId:SwitchPower1","Status",-1,yourdeviceid)

So, as long as I remember to add the above line into my scenes, I can use my LightwaveRF remote as a very cheap (£12) scene controller.

What might be really nice is if an option existed within the device settings for it to “forget” its state after an event is triggered, so that it can be used more easily as a Scene Controller. Might apply equally well to other non-Zwave RF remotes. Perhaps this is something for lolodomo to consider within the RFXcom USB plugin?

Hope someone finds the above information of some use.
jtmoore.

Just a further update to my experiences with LightwaveRF remotes (and probably applies to any brand of RF remote supported by RFXcom). Some of these remotes would normally be used to dim up and dim down a corresponding LightwaveRF plug-in module. Unfortunately this won’t work on z-wave dimmer modules (but does still work directly with the LightwaveRF modules). Now that I have found a way to get the Scene to re-trigger on multiple button presses (by setting switch status=-1), I can develop this concept further to get the lights to dim up and down.

Each press of the ON button will increase the current light level by a specified percent. Likewise the OFF button will reduce current dimmer value by specified percent.

I got this idea from the the threads discussing the Aeon Minimote, that has its dimmer functionality disabled when it is added to Vera as a secondary controller. Obviously this needs a small amount of luup code with hard coded device IDs in the Scenes associated with each button, but the results are well worth the small effort involved.

If this is of interest to anyone then please let me know and I’ll post the luup code I am using in my scenes.

For information, the plugin will update the status of the BinaryLight device each time you push the button of the remote. The problem could be relative to the behaviour of the standard BinaryLight device that would not trigger the ON event if status is already ON. I have not checked myself but it seems that it is what you noticed.
As you proposed, a solution for the plugin could be to set status to -1 and then immediately after to 1. It is something I can change more or less easily.

I have now checked by myself and that’s true that event ON is not triggered when status is already set to 1.
Setting it to -1 first seems to solve the problem allow retriggering the ON event for example.
I will integrate it in the plugin but I need to keep the user choose between the standard behaviour and the new behaviour.

This is now implemented in my plugin and working well
http://forum.micasaverde.com/index.php/topic,9563.msg84008.html#msg84008
So it will be included in the next alpha release.

But now I think I should have a different approach for remotes and use a scene controller device, like for the minimote for example. I take a very quick look on this device definition this morning, it seems to allow triggering event when a scene (remote button) is activated and deactivated. I will test that it is working well with my minimote and if it is the case, I will use/create this device type in my plugin (in complement to BinaryLight devices).

Hi lolodomo.

I have now tested your update with my low cost LightwaveRF remote. It has 4 on and 4 off buttons (plus 2 buttons for all-on/all-off that I don’t think is supported by the RFXtrx433). A 4 position selector means I can have up to 16 scenes.

I am very pleased to confirm that the scene function works perfectly, enabling this remote to behave as a proper scene controller that triggers events every time. Well done! I can now remove my status=-1 hack and use the scene controller in a conventional manner.

I can see the benefit of your approach, and for such remote controllers I much prefer it to having the binary switches. Is there any way to (optionally) remove the binary switches since I now don’t need them, or would they reappear if I tried to delete them? Each of my remotes creates 16 binary switch devices plus the scene controller device. The total number of RFX devices on my Vera is therefore growing quite large because I have a lot of these remote controls (one in each room). I am a little worried that I may reach the device count limit within Vera.

Many thanks for all your hard work.

They will reappear except if you set the variable AutoCreate to 0.

Each of my remotes creates 16 binary switch devices plus the scene controller device. The total number of RFX devices on my Vera is therefore growing quite large because I have a lot of these remote controls (one in each room). I am a little worried that I may reach the device count limit within Vera.

I have already imagined such a question will arise soon :wink:
An idea would be to add a variable in which the user would put the (alt)id of devices he don’t want to be created. In your case, that would mean a lot of id to put manually in the variable, so not perfect solution.
Other idea: defining a variable on the remote device to indicate if another device has to be considered when a button is pushed. But this idea is not very easy to implement.

Another user request would be to distinguish motion sensor with binary light for example. So a more general idea could be to define in a variable on the remote device what kind of device must created for each unit code:

  • nothing
  • binary light
  • motion sensor
  • door sensor

@lolodomo - just reading your conversation with jtmoore.

The effect that the lightwave remote control is having on the rfxrtx plugin is an interesting one?

I have an old ATI Wonder RF remote somewhere, now if i used that will it look to create a device for each different button type I press? Or is that treated differently?

[quote=“parkerc, post:9, topic:171980”]@lolodomo - just reading your conversation with jtmoore.

The effect that the lightwave remote control is having on the rfxrtx plugin is an interesting one?

I have an old ATI Wonder RF remote somewhere, now if i used that will it look to create a device for each different button type I press? Or is that treated differently?[/quote]

Currently, my plugin does not support ATI or Medion RF remotes. But soon I will add support for these RF remotes like this:

  • one time again through a scene controller device that will trigger an event with the id of each button (ids defined in the RFXtrx user guide)
  • add a callback to send commands with the RFXtrx in place of the remote (something that could be called for example in a scene)