VMB4RY channel 1 keeps switching off after random time

Hello,
i have VMB4RY and i set channel 1 time1/mode to FF, address set to 11.
i used push buttons to toggle on and off.

recently i have connected 8push button module and launched velbus 5.9 software and now my vmb4ry keeps switching off randomly.

i have app that turns my garden lights on and off based on time (day/night)

i use these functions to operate garden lights:

SerialBus sBus = new SerialBus(“COM1”);

    public voidGardenLightsOn()
    {
        Packet packet = new Packet();
        packet.Address = 0x11;                  // change this address to reflect your setup
        packet.Priority = PacketPriority.High;  // high priority command
        packet.DataSize = 2;                    // 2 data bytes
        packet.Command = 0x02;                  // Command "Switch relay ON"
        packet[1] = 0x01;                       // We want to switch on all relays
        sBus.SendBlocking(packet);
    }

    public void GardenLightsOff()
    {
        Packet packet = new Packet();
        packet.Address = 0x11;                  // change this address to reflect your setup
        packet.Priority = PacketPriority.High;  // high priority command
        packet.DataSize = 2;                    // 2 data bytes
        packet.Command = 0x01;                  // Command "Switch relay Off"
        packet[1] = 0x01;                       // We want to switch on all relays
        sBus.SendBlocking(packet);
    }

also i have two event listeners:
sBus.PacketReceived += new BusPacketIoEventHandler(PacketReceived);
sBus.PacketSent += new BusPacketIoEventHandler(PacketSent);

and i see packets sent and received…

what could cause relay to randomly switch off? maybe i’m doing all this wrong?

and one more question - is it better to have velbus in server mode and use it for my app as “gateway” to velbus, or better direct COM connection and no need of velbus app?

Thanks

I don’t see any code that calls GardenLightsOff() or GardenLightsOn()…

If you have a direct connection via RS232 or USB available on your PC, then by all means use it. VelbusLink server mode only exists to be able to operate the Velbus in case you do not have a direct connection (sort of like an ethernet module…).

Hi, thanks for reply, i haven’t included code to call on or off methods, but i have timer that checks current time vs database time (day time, night time) and if current time > db time, i call GardenLightsON… After calling GardenLights ON sometimes in seconds, sometimes in minutes i see that garden lights are off… and this is not triggered by GardenLightsOFF method…

is there a way to “reset” VMB4RY module to “factory” defaults?

Thanks.