A VelBus server-mode tool

So where’s that list stored then? I figured that the memory map of the push button module, for example , had only room for the push button name and the response time? And the memory maps of the relay module, for instance, has room for a couple of button addresses and channel numbers per action (on/off/…). So I believe the pushbutton broadcasts a signal that it’s just been pressed/released and the other modules receive it and know what to do with it. I might still be wrong though…

So where’s that list stored then? I figured that the memory map of the push button module, for example , had only room for the push button name and the response time? And the memory maps of the relay module, for instance, has room for a couple of button addresses and channel numbers per action (on/off/…). So I believe the pushbutton broadcasts a signal that it’s just been pressed/released and the other modules receive it and know what to do with it. I might still be wrong though…
I think you are right, commande is sent telling a button is pressed and modules know how to interprete it…

Tryed to get into your flex project, it is painstaking, dont know where to look (since no comments in your code) :wink:

And never worked with flex, the learning curve is going to be a steep one! if you dont take my hand!!

:wink:

Probably, but really the Flex Velbus Socket is a piece of software written by GertST, not me. So I can’t really help you with the source code.
I guess it’s sufficient to send the command that the push button sends when it’s pressed, but the ‘All on’/‘All off’ command isn’t even working at all for me, so I can’t really try it.

[quote=“danssaertd”]Probably, but really the Flex Velbus Socket is a piece of software written by GertST, not me. So I can’t really help you with the source code.
I guess it’s sufficient to send the command that the push button sends when it’s pressed, but the ‘All on’/‘All off’ command isn’t even working at all for me, so I can’t really try it.[/quote]

actually the message above was for gerst (very nice)

for me it works when I toggle 6 or seven times and then it freezes.

Configure your vmpb4 to switch all, then assign it in the xml file…

Oops, sorry for that… I didn’t really get it as GertST hasn’t posted here yet.
I forgot to synchronize with all modules. Now it’s working and in the flex tool it’s working perfect as well. I’ve put the lights on and off like 20 times.

wonderfull! at least my probleme would have helped you!

cool

did u work on skining gerst project?

But yours is still unsolved…
Actually, I’m putting all my time and energy in writing a home center-like program, so I don’t think I will try the skinning.

[quote=“danssaertd”]But yours is still unsolved…
Actually, I’m putting all my time and energy in writing a home center-like program, so I don’t think I will try the skinning.[/quote]

how do you write it?
can you send a screen shot?
I do understand you, since every personel project is SO different, a home center cannot respond to all your needs and dreams!

EDIT/ 4 exemple I would love to connect my WS 1080 weather station to the modules.

In C# with .NET 2.0 . Right now I’m mainly concentrating on the underlying framework of my program, so the Velbus part, the customizable interface, macro’s, etc… So my layout isn’t really much yet. So when I start with the graphics and designing I will update with some screenshots.

I agree with the personal needs, so that’s why I’m putting my efforts in designing my program in such way that anyone could use it, like home center does.

do you use a wsiwyg interface?

I just edited my previous post so the answer might be in there already. But what do you mean with a ‘what you see is what you get’-interface?

when you developpe you have a code panel and a graphical panel to see the result…

Indeed, that’s what I’m doing. Only, lots of my graphic code is dynamic so I see the placeholders for it, but the actual controls are only shown at runtime.

hi to danssaertd,

i’m also writting my own soft in C#. do you use numeric up down controlboxes for dimmers and setting the temperature in the rooms? i 'm asking this because i’ve a problem with it. when i use the numeric up down box to change dimmer setting i can’t switch off or on a light. I have to set the dimmersetting back to zero and then i can switch the lights back on and off. any idea why?

thx,

stis

Not really, I don’t seem to have that issue. I might be able to help if you show me a piece of the relevant code? I can’t promise anything though. And I understand you totally if you don’t feel like sharing yet. : ) anyhow, I’ll think about the circumstances that could cause such a behavior…

to danssaetd,

no problem at all.
here follows a piece of code.

   private void AllesUit_Click(object sender, EventArgs e)
    {
        //Switch all relaymodules off
        for (int i = 0x30; i <= 0x3f; i++)
        {
            packet.Address = i;
            packet.Priority = PacketPriority.High;
            packet.Rtr = false;
            packet.DataSize = 2;
            packet.Command = 0x01;
            packet[1] = 0x0F;
            bus.Send(packet);
        }

        // Switch all dimmers off
        for (int i = 0x40; i <= 0x5F; i++)
        {
            packet.Address = i;
            packet.Priority = PacketPriority.High;
            packet.Rtr = false;
            packet.DataSize = 5;
            packet.Command = 0x07;
            packet[1] = 0x01;
            packet[2] = 0x00;
            packet[3] = 0xFF;
            packet[4] = 0xFF;
            bus.Send(packet);
        }
    }

    private void numericUpDown1_ValueChanged(object sender, EventArgs e)
    {
        // set dimmer value living room
        packet[2] = Convert.ToByte(numericUpDown1.Value);
        dim_living_changed = true;
    }

    private void numericUpDown2_ValueChanged(object sender, EventArgs e)
    {
        // set dimmer value dinning room
        packet[2] = Convert.ToByte(numericUpDown2.Value);
        dim_eetplaats_changed = true;
    }

    private void numericUpDown3_ValueChanged(object sender, EventArgs e)
    {
        // set dimmer value behind tv
        packet[2] = Convert.ToByte(numericUpDown3.Value);
        dim_tv_changed = true;
    }

    private void numericUpDownTemp_leefruimte_ValueChanged(object sender, EventArgs e)
    {
            // set current setpoint temperature in living 
            packet.Address = 0x61;
            packet.Priority = PacketPriority.Low;
            packet.Rtr = false;
            packet.DataSize = 3;
            packet.Command = 0xE4;
            packet[1] = 0;
            packet[2] = Convert.ToByte(numericUpDownTemp_leefruimte.Value * 2);
            bus.Send(packet);
    }
   
    private void numericUpDown_bureel_ValueChanged(object sender, EventArgs e)
    {
            // set current setpoint temperature in office
            packet.Address = 0x62;
            packet.Priority = PacketPriority.Low;
            packet.Rtr = false;
            packet.DataSize = 3;
            packet.Command = 0xE4;
            packet[1] = 0;
            packet[2] = Convert.ToByte(numericUpDown_bureel.Value * 2);
            bus.Send(packet);
    }

    private void numericUpDown_temp_badkamer_ValueChanged(object sender, EventArgs e)
    {
            // set current setpoint temperature in bathroom
            packet.Address = 0x63;
            packet.Priority = PacketPriority.Low;
            packet.Rtr = false;
            packet.DataSize = 3;
            packet.Command = 0xE4;
            packet[1] = 0;
            packet[2] = Convert.ToByte(numericUpDown_temp_badkamer.Value * 2);
            bus.Send(packet);
    }

    private void Verzend_Click(object sender, EventArgs e)
    {
        // send packet to velbus

        // Look if it is a dimmodule
        if (dim_eetplaats_changed == true)
        {
            packet.Priority = PacketPriority.High;
            packet.Rtr = false;
            packet.Address = 0x41;
            packet.DataSize = 5;
            packet.Command = 0x07;
            packet[1] = 0x01;
            packet[3] = 0x00;
            packet[4] = 0x00;
            bus.Send(packet);
            dim_eetplaats_changed = false;
        }
        if (dim_living_changed == true)
        {
            packet.Priority = PacketPriority.High;
            packet.Rtr = false;
            packet.Address = 0x40;
            packet.DataSize = 5;
            packet.Command = 0x07;
            packet[1] = 0x01;
            packet[3] = 0x00;
            packet[4] = 0x00;
            bus.Send(packet);
            dim_living_changed = false;
        }
        if (dim_tv_changed == true)
        {
            packet.Priority = PacketPriority.High;
            packet.Rtr = false;
            packet.Address = 0x50;
            packet.DataSize = 5;
            packet.Command = 0x07;
            packet[1] = 0x01;
            packet[3] = 0x00;
            packet[4] = 0x00;
            bus.Send(packet);
            dim_tv_changed = false;
        }
    }

hope this will help you to see what i mean.

A couple of questions, do the dimmers work 100%?
When the problem occurs, is it with all the numericUpDown’s? Or is there a difference between the ones that are evaluated in the handler for the clickButton and the ones in the numericUpDown handlers?
And a minor suggestion. If you set the address of the dimmer along with the dimvalue (packet[2]), then you don’t have to handle which dimmer you’re actually changing in the Verzend_Click void. Just send the packet : ) but I can’t see the bigger picture nor your future additions to the code, so maybe it’s not what you need.

yes, i can control them with the pushbuttons in my house(dimmers and temperature controller). they react on the setting via my soft (the dimmers and temperature controller).i have the problem with all the numericupdowncontrolboxes. the only thing that don’t react is switching on or off the rest of the lighting aslong as the numericupdownboxes are not reset to zero.

I really don’t see any error in the source code that could cause this… Have you tried singlestepping your code? Then you’re sure of which exact steps your code takes.
Could you tell me if the AllesUit_Click handler even gets triggered when clicking on it when the dimmers aren’t zero? You could add messageboxes or breakpoints to check this.

yes the dimmers goes to zero but if there were relays on they didn’t go off. so i think there must be somewhere a loop in my sourcecode. Will try to use a label and 2 buttons ( 1 up and 1 down) and make a countup and countdown routine.