Random function

I’am using Openremote and Velbus now for some years and this works fine. I have now the id to switch on a light in the living on a random time between sunset and a random time up to 4-5 hours. Is this possible in Openremote?
Thanks
Herman

Hi,

Welcome to the forum.

Which version of OpenRemote are we talking about, 2.x is no longer supported. If you’re talking about the current platform (IoT broker) then you could write a groovy rule that updates a number attribute with some Math.random logic to randomise the on/off and then use a schedule on the rule to enable it at sunset (or whatever start time you need).

If you’re still using the old 2.x OpenRemote then I suggest switching to something like Home Assistant see this Velbus forum thread:

https://forum.velbus.eu/t/developing-the-velbus-binding-for-openhab-homeassistant-and-all-that-follow/17177/11