Example MSR rule to bridge back a device from an Ezlo hub to a Vera hub for Home Remote dashboard

What about a device that would need two way comms ?

For example I have a Z-Wave Light bulb paired to my Ezlo Plus controller and I’d now like a virtual device on the Vera Plus controller / Home Remote app, to reflect the real device.

So I add a new virtual Dimmer Light on my Vera Plus.

On the Params tab of the new Virtual Device you should have these present in the fields:

device_type = urn:schemas-upnp-org:device:DimmableLight:1

device_file = D_DimmableLight1.xml

device_json = D_DimmableLight1.json

impl_file = I_DimmableLight1.xml

(Note - you may need to upload this impl file to your Vera controller via Apps - Develop Apps - Luup Files. Its attached, unzip it first.)

I_DimmableLight1.zip (602 Bytes)

image

Then in MSR Entities list, I found the existing real Z-Wave Light bulb device and made a note of its device ID:

61f0a203123e431284c14148

I then created a new MSR rule (Ezlo controller → Vera Controller)

Trigger is the real Z-Wave Light bulb device on the Ezlo Plus and if its dimming level “changes” from anything to anything.

I then created a new local expression within the rule named “DimmingLevel”

This is the example expression code, I inserted the device ID of the real Z-Wave Light Bulb off the Ezlo Plus controller, I noted earlier.

(getEntity( 'ezlo_plus>device_61f0a203123e431284c14148' ).attributes.dimming.level)

I then added an Action in to the MSR rule, I selected the Virtual Dimmer device off the Vera Plus controller (ID 786) the action should be dimming.set and the level should be the name of the expression like this ${{DimmingLevel}}

I then saved the rule and tested by changing the dim level of the real device on the Ezlo Plus hub and seeing if the dim level on the virtual dimmer device on the Vera Plus was also now changed to that same current level and it was.

The ON / OFF buttons also worked and change the virtual dimmer device also.

Now this is only currently one way Ezlo controller → Vera controller.

If I use the virtual dimmer device on the Vera Plus and start controlling the diming level on that device, then the real device on the Ezlo Plus is not currently controlled.

So I needed to add a second MSR rule. Vera controller → Ezlo controller.

(Wasn’t sure if I could do all this in just one MSR rule).

Trigger is the Virtual Dimmer device on the Vera Plus dimming level “Changes” from anything to anything.

I added an expression with this code, device ID 786 being the ID of my virtual dimmer device on the Vera Plus.

(getEntity( 'vera>device_786' ).attributes.dimming.level)

And for my Action I selected the real Z-Wave Light Bulb device off the Ezlo Plus controller with dimming.set and the level is the expression name like this ${{DimmingLevel}}

Now when I control the virtual dimmer device on the Vera Plus controller the real Z-Wave Light Bulb device on the Ezlo Plus controller is also controlled.

So its now two way !

Here are the two rules in the rules list in MSR:

image

This is all a bit clunky but it does work and I have now got the light that is directly paired to the Ezlo Plus controller also working on the Vera Plus controller as a virtual device. So now I can add it into the Home Remote dashboard app.

image

Obviously this would be a ball ache to do for lots of devices if you have all your devices paired to an Ezlo Plus controller, but if you just have a few real devices paired on the Ezlo Plus controller then this solution might be OK.

Ideally I’d like a reserved bridge plugin Ezlo Controller to Vera Controller.

We do currently have @reneboer Vera Controller to Ezlo Controller bridge plugin here which works well.

And I’ve documented what I’ve done here today, so I remember how I did it in the future.

UPDATE:

There is a problem with this logic as the light paired to the Ezlo Plus hub doesn’t go straight to 0% when you press the OFF button. There is some “middle step” that happens for some reason. Ezlo say this behaviour is normal.

However this “middle step” does not happen with lights on my Vera Plus.

I did the following tests from the light being OFF to begin with.

Moved Dimmer Slider to 100% Pressed the OFF button. It then jumped to 66% before going to 0%

Moved Dimmer Slider to 50% Pressed the OFF button. It then jumped to 17% before going to 0%

Moved Dimmer Slider to 74% Pressed the OFF button. It then jumped to 41% before going to 0%

The end result is the light is turned back ON when I expect it to have been turned OFF and to have remained OFF.

UPDATE 2:

So the work around for the Ezlo Controller reporting dimmer steps when the light is being turned OFF, from its current dim level going down to 0% is to add a delay in the Ezlo → Vera rules action.

This gives the Ezlo controller enough time to fully turn off the light and set it to 0% The current OFF status is then sent after the delay, to the virtual dimmer device on the Vera controller.

This prevents the other Vera → Ezlo rule turning the light back ON again, as it was picking up on the middle dim level step and causing the light to turn back on when you expected it to remain off.

Its hacky but I now have two way comms and control of a dimmer light on the Vera controller / Home Remote dashboard app, that is actually paired to the Ezlo controller.