Announcement

Collapse
No announcement yet.

Velleman K8055 Plugin V1.0.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Velleman K8055 Plugin V1.0.0

    I have developed a plugin for the velleman k8055 usb io board - described in this thread http://board.homeseer.com/showthread.php?t=102005and also at this website http://www.velleman.be/common/produc...an=1&id=351346

    Basically usb connected 5 digital inputs, 8 digital outputs, 2 analog in 2 analog out all at about 20 pounds in kit form - winner!

    PRE-REQUISITES:

    Install the velleman demo program - this will put the dll in the right place, and you can also check your board works - NOTE: The velleman site has a newer DLL - apparently fixes a memory leak - I haven't downloaded and tested it yet - I will do once the digital ink has dried on this plugin, but you may want to try it - let me know if it works OK....

    Plugin description:

    Supports 1 velleman board currently
    Provides 19 devices,

    5 digital inputs - devices K8055-0-DI1..5
    2 analog input - devices K8055-0-AI1..2
    8 digital output - devices K8055-0-DO1..8
    2 analog output - devices K8055-0-AO1..2
    2 counters - devices K8055-0-DC1..2 (counts the number of times digital input 1 and 2 have been "triggered".

    Installation

    Copy hspi_malk8055.ocx to your homeseer directory (c:\program files\homeseer as a guess)

    Fire up homeseer, view.. options.. interfaces.. plugins drop down select malk8055
    restart homeseer with your velleman board attached

    If all goes well new devices appear - restart one more time to get the initial values.

    Using it - press the buttons on the velleman board - homeseer devices should change from off to on - (this version has a 250ms fixed poll interval - will fix that in next release - so you have to hold it for .25 secs to get it to register)

    skin resistance should be enough to get the analog inputs working - I tested mine with a wet finger.

    digital outputs - set them on from the device menu - light should come on.

    analog outputs - I drive them from a script -

    for i = 1 to 255
    hs.setdevicevalue "[16",i
    next

    Makes the output test light go from dim to bright.

    digital counters - press the input buttons for di 1 and 2 and watch the numbers go up - right click in device view - goto properties and then configure - you can set the switch debounce times in there and chose to preserve counter values over a homeseer restart.

    Think thats about it apart from the disclaimers

    VERY RAW CODE - BETA QUALITY - DO YOUR BACKUPS - DON'T BLAME ME IF IT BLOWS UP.

    The plugin is currently (and for the forseable future) free - I am not making the source code public at the moment (open to email conversations if you want it) - if/when I get bored of it I will publish source.

    Please let me know if it works or fails - I will be issuing some updates but I was keen to get it published.

    Malarcy
    Attached Files

  • #2
    It works

    Malarcy
    I'm not sure what time it is in the UK, sometime Tuesday am. Here in Springfield Illinois it's 9:34 PM and I would like to say "IT WORKS GREAT". Yes, I was shouting. Thought I might wake you up.
    I finished my 8055 board Saturday morning. The demo program that comes with it helped prove that all functions work. I followed your install instructiins and just as you said all of the devices appeared. I'm off tomorrow, can't wait to see what I can interface it to. I'llbe checking back with feedback soon.
    Thanks again for the plug-in.
    Joe

    Comment


    • #3
      Cool - it's great when something works for someone else - let me know how it goes.


      Malarcy

      Comment


      • #4
        I will test it this evening


        Walter

        Comment


        • #5
          Hi MaLarcy,

          Just built the K8055 board, tested with the demo program and everything works OK.

          I have just tried your plugin and all inputs/outputs work except the 5 digital inputs. The 5 devices corresponding to these inputs keep a value of unknown. The buttons have been held down for more than 1 second BTW. I have tried both versions of the DLL with the same result. If I shut down HS and load the demo program again, these 5 buttons register correctly on the software so the hardware must be working.

          FYI, I run a 3 gig P4 with Homeseer. Thought you would like the feedback.

          Thanks very much for the work you have done on this plugin so far!
          Jon

          Comment


          • #6
            Digital Inputs

            Hi Jon
            I just tested my Digital inputs. I ceated a script that speaks Button X was just pressed. Set trigger to set any status and it works fine.

            Comment


            • #7
              Jon, Try this

              Buttons 1,2,3,4 and 5 didn't work initially. Go to device status and send an ON to each and then try the Digital Inputs.

              Comment


              • #8
                Thanks Joe for that! - Everything seems to be working fine.

                Malarcy, Great plugin - Thanks! This is a very useful I/O board for ALL Homeseer users.
                Jon

                Comment


                • #9
                  Malarcy

                  I have tried to set the Anolog outputs with no luck. Can you supply the script you are using to do this? I am able from the board demo program to set the outputs. Jon00, did you get the analog outputs to work?
                  Joe

                  Comment


                  • #10
                    Joe,

                    Yes, it works fine.

                    I just used a small script:

                    sub main()
                    for i=1 to 255
                    hs.setdevicevalue "$16",i
                    next

                    for i=1 to 255
                    hs.setdevicevalue "$17",i
                    next

                    end sub

                    Remember to change the $ to the House code symbol allocated to this plugin by your HS set-up.
                    Jon

                    Comment


                    • #11
                      Found the problem

                      Thanks Jon
                      HS set house code to ] and I had [ instead. Works fine now. Are these assigned at random when a house code is not specified?

                      Been working on a OOpicII also. Not sure where I am going with that. It has 31 I/O lines!

                      Comment


                      • #12
                        Well not quite random. I believe that HS issues a House code (symbol) to each plugin. If it does not require it, the plugin should give it back to the pool again. Once issued, it will keep the same code so ] will be your's for this plugin.
                        Jon

                        Comment


                        • #13
                          Glad to see that this is working - the initial value for the devices has caused me some grief in both this and the gamepad plugin - so I assume I am missing something with the way I create the devices - I have found in my testing that restarting HS once the devices are created sets the initial value - but it seems that the initial device on is required to "wake" the devices from what others have found - I didn't see that in my testing my machine isn't a clean install.

                          I'll try this on a fresh install and see if I can figure what I am doing wrong, hopefully get another version out this week.

                          Can those who have had to do the device on... trick to wake the digital inputs tell me if the devices are "digital input" in the properties?

                          I am interested in how people are interfacing to this board - if anyone does some hookups with opto isolators or relays than I would appreciate the details - I am interested in using this board to control some valves and pumps for some garden irrigation stuff.

                          Thanks for the feedback guys.

                          Malarcy

                          Comment


                          • #14
                            Hi Malarcy,

                            Yes, they are marked as digital inputs.

                            If possible, I think it would be a good idea if you could set the input/output status of the board by reading the values stored in Homeseer. If you do a Homeseer restart, the analog outputs always reset to zero and a total reboot will reset everything.

                            I have not done any interfacing yet as I wanted to see it's stability and get any bug's ironed out. I also do not want to commit this to anything until it works correctly with HS2.

                            As for interfacing, I will use opto-isolators for the input's and probably opto's with a small relay for switched outputs.
                            Jon

                            Comment


                            • #15
                              I forgot to mention, the 250mS polling is causing all the virtual devices to flash....not sure that is correct.
                              Jon

                              Comment

                              Working...
                              X