You can now use Lua code in Ezlo scenes - How to Examples

Hi @Crille,

This type of functionality would more need a plugin than code in a scene. A plugin you can subscribe to events and you can set a filer for the device you are interested in. Then change a setting in another zwave device may not yet be supported in Lua as each plugin runs in its own space (called gateway) and you cannot control a device of another gateway. We have asked to allow it, but I have not yet heard it can be done. How to create your first plugin with Ezlo LUA API - Ezlo Library - Ezlo Community

Cheers Rene

1 Like

I suspected the subscribe to events function but writing a plugin seems a bit overkill for this purpose and overwhelming for me.
I know it’s not suitable for a scene and maybe the only way to mimic Startup Lua is a plugin.
If I find the time, perhaps I should start digging in that direction to be prepared when we can interact between gateways, thanks for the link!

Hello @reneboer,
all provided examples change items of any gateway and you can use it in your plugins.
Ezlo Firmware provides:
core.update_item_value() - it can update items of your plugin only. It updates value in firmware database.

core.set_item_value() - it can update any item of any gateway. This call redirects to the plugin which is responsible for the target item.

Hello @Crille,
It depends how you want to see it and control. It’s possible to do via Lua in scenes if control part is enough. If you also want to see some states then better to do it via own plugin as @reneboer advised.
Could you describe expected flow for your case?

Hi @andryist,

Aha, i was trying to understand what the API documentation about the set_item_value. On it self it does not state it can work on any item of any gateway. I guess it is implied by the section “Methods for using in external gateways” i now know what that heading means. And i think that I understand what you mean with internal and external gateways. Is external also on a different hub, or is it only the gateways(plugins) on one hub?

Cheers Rene

Only on the same controller now.

@andryist thank you for the information!
I don’t really need to see any states as the fans automatically acts on input from humidity, house modes and scene controllers for timed manual extraction.
So some Lua in a scene would do, but I will wait for a proper GUI before moving this logic from my Vera to my Ezlo controller, since coding this in an app on my phone is a bit troublesome.

1 Like

is there someone who could write a script to turn off a device/light after a set duration? I would be happy to pay for someones time. I know NOTHING about this stuff.

in our webui you can do that

In the “Action”
you can select the device you want “off” and add a “Delay” to the action.

or in your SmartPhone you can do the same:

I have tried the delay. Here is what I have setup.

Action Event: Whenever switch state is changed :on (device 123)
Action: Off( device 123) Delay 1 Min

It dose not seem to do anything, I never got it to work for my vera Edge also. I ended up with a plugin, which worked perfect.

Thank you for your feedback. We found an issue on our Web UI, and now we are fixing it. The issue will be fixed in 1 hr.

Thanks again for your feedback.
We updated the WebUI with new functionality and also fixed the problem with the offset for the Action section.

1 Like

So it still does not work

Could you try to create a new scene and let us know if it works? The “old” scene that you’d created before we applied the fix, won’t work.

Hi Everybody

Does the following sample, that I used with VERA, run on Ezlo ? Change device paremeters from a scene with LUA


No it will not work. None of your existing Vera Lua code will work on an Ezlo hub.

Seems they have changed lots of things, even the coding format is totally different in Ezlo hubs it seems.

I don’t know how to convert my existing Vera lua code to a working Ezlo equivalent.

That isn´t what MCakan says

Feb '21

Hello everyone,

As you know you can add lua codes in scenes as actions. [Here you can see how if you have not tried that yet ] (Ezlo controllers - Use LUA Script as an action in a scene - YouTube)

“That isn´t what MCakan says”

Your question was “Does the following sample, that I used with VERA, run on Ezlo?”

My anwser to that question is no it won’t work.

What MCakan says is not related to your question.

However, you can use the Vera mobile app connected to an Ezlo controller, to create and add a lua script to a scene, as shown in the YouTube video you linked to.

Currently on the EZLOgic Web GUI there is no support for lua codes however and you won’t be able to even edit or delete any scenes that reference a lua script, via the Web GUI.

And you need to use Ezlo LUA code which is different to Vera Lua code.

You can’t just copy and paste your existing Lua codes from your Vera scenes as they won’t work.

although @cw-kid is right, but something he doesn’t know is that we are launching this coming week an “Expression” feature where you can create any Lua code in MeshBots

1 Like

My question was if there is a LUA command to change a device paremeter. If it´s different that the one wich goes with Vera is not the problem. Because of it a wrote this command example:


. If it´s possible, could you tell me how do I have to write it for EZLO ?

I don’t know if there is an equivalent LUA command within Ezlo LUA code for directly setting a variable setting on a Z-Wave device.

@oleh @MCakan is there?

Also a similar unanswered question here about send data.

1 Like