6 channel hub

esor

New Member
Hi,

Just got a load of material to build my own (order #2394) weather station, to replace my current LaCrosse 2610.

Right now I am testing the different modules with the 1-Wire-Viewer, and I get everyghing to recognize, via my USB1 adapter bought previously.

Now to my problem, when connecting the 6 channel hub, I see all three channel devices for the hub, when connecting eg. a temperature sensor to the passthrugh, I see the sensor, but when connecting to one of the channels - nothing happens, no led light up, and I do not see the sensor. I have connected the external powersupply enclosed in the order.

Am I doing something wrong??? ;) :unsure:

Secondly, how to address these via hub connected sensors vi JAVA programming, is there a different call than if it was connected in a daisy chain.

I have tried to look for eksplanations on your WEB-site, but found none.

Please help.

Kind regards,
Per
 
Amazing coincidence, I was doing this last week, I put together a little explanation of how it works because I was so frustrated with the lack of documentation on the hobby-boards stuff. I sent it to hobby-boards but they didn't reply.

The good thing is that the hardware works...

This will help you...

http://www.acrocad.net/pdf/1wire.pdf

Chuck
 
Chuck,

Sorry I never replied but I did look at your document. It gives a pretty good explaination of how to test out a Hub and see devices downstream of the Hub.

Per,

If you are going to write your own software the I would suggest reading over the DS2409 Datasheet. You will need to keep up with what branch each device is on and make sure to turn that branch on before trying to read the device.

It is true that our website doesn't have much in the way of programming help on our devices. We will work on fixing that with some new How-To's.

Eric
 
Hi Chuck,

Gee thanks, It is a real nice document, I do not understand why it has not been included on the hobby-boards, maybe they are skiing in som resort and not in ;)

Actually, I discovered that the HUB must be initiated by the software, I searched the Internet, and found that Wserver is capable of this.

So with Wserver and your document I now know that my hardware works :unsure:

BUT - I am going to build my own Weather Software station, using the brilliant book from Tim Bitson, "Weather Toys", but to use the HUB, I need to know how to address and initiate it in JAVA. Tim's book do not give that information (yet)

Does anyone have a sample code for doing this?

Regards,
Per
 
Hi Eric,

Your reply came as I was writing to Chuck, so you are not skiing after all ;)

The link you gave me, gives af PDF file with a lot of tecno bablbabl, and being a humble programmer, it might as well be written in russian, for my understanding.

So, my question is still open, does someone have a few (a lot of) JAVA statements that do the trick.

I can see that with the HUB, I will have to initiate it everytime the software starts, same applies to WServer, that is not a problem, as my Server runs 24/7/365.

As I will be building this package during the next months to come, I can test my software programming using the 6 channel hub as an power injector, but in the end, I need it to work.

I think I will ask Tim Bitson, about the possibility to get som coding as an addition to his book.

So please someone - come with JAVA statements to help me (us) out. :unsure:


Kind regards,
Per
 
Eric: No worries, I'm putting together an order for some more stuff, though I'll probably assemble them myself...

Per: It's good to know you got some use out of it. Let me know how your project proceeds. I'm using some of the hobby-boards stuff in a non-standard way with my HomeVision controller and the rest I'd like to connect up in a simple weather station that interfaces the HomeVision. Unfortunately I'm a C++/VB/Python/Scheme guy so I can't help you with the Java code.

I just need to figure out the RS232 protocol... and hopefully find code that someone else already wrote ;)

Chuck
 
Per,

Here is some code that will turn on the main channel of any DS2409 it finds on the 1-Wire network.

Code:
public void run()
    {
    byte[] state;
  
    List deviceList = OneWireHelper.getAllAttachedDevices(mAdapter);
    Iterator iter = deviceList.iterator();

    try
        {
        while (iter.hasNext())
            {
            String deviceID = (String)iter.next();
            if (deviceID.endsWith("1F"))
                {
                OneWireContainer1F oneWireDevice = new OneWireContainer1F(mAdapter, deviceID);
                state = oneWireDevice.readDevice();
                oneWireDevice.setLatchState(OneWireContainer1F.CHANNEL_MAIN, true, true, state);
                oneWireDevice.writeDevice(state);
                }
            }
        }
    catch (Exception pExp)
        {
        pExp.printStackTrace();
        }
    }

One thing is that if you just turn on the main branches of the Hub at the beginning of your program and not worry about it after that then you won't be able to connect any devices to the aux branch of the DS2409 because the DS2409 can only have one branch active at a time.

Eric
 
Eric,

Thanks for your code, using the 6 channel hub seems to be a challenge, but if I manage, I will return with my example.

Per
 
It is true that our website doesn't have much in the way of programming help on our devices. We will work on fixing that with some new How-To's.

Hehehe, where have I heard that before? :)
 
Hi Guys,

another pointer to some 'C' code. Brian Lane's DIGITEMP (www.digitemp.com) supports the hub and Brian provides access to the source code. I found it really useful for working with the hub, scanning the network, turning couplers on/off, reading devices etc. it's well worth a look

regards
Dave
 
Back
Top