How do I use TMEX to enable Aux channels on hub?

SethP

Member
Hi! I've been writing some software using TMEX to talk to your boards, and it's working great. It's a plug-in for Homeseer, and so far it supports your relay boards, motion sensor, DS2406 I/O, and temp sensors. It also has no problem enabling the Main channels on your hub, but I can't figure out how to enable the aux channels.

To enable the Main channel, I'm using TMTouchByte to send &h66 to turn off both channels, then &hA5 to enable the main. Works perfectly.

Any ideas how to enable the aux channel?

Thanks!

Seth
 
Seth,

You can send a &h33 to turn on the aux channel.

Eric

You'll need to follow &H33, Smart On Aux, with 16 more time slots (bits).

"Compared to the Direct-On Main command, the Smart-On Main requires the bus master to follow the
function command with 16 more time slots. The first 8 time slots (reset stimulus) are translated by the
DS2409 as a reset low time on the Main 1-Wire output. Now, the bus master reads the reset response
byte."
See the DS2409 spec sheet for full details.

I just send a couple of TMTouchByte SessionHandle &HFF.

Also consider using &H66, Smart On Main, instead of &HA5.
 
That did it, thank you. The reason I was using Direct-On Main was because I could never get Smart On to work. I didn't understand what the data sheet meant by "follow...with 16 more time slots". This exact sequence works:
TMROM
TMAccess
TMTouchByte &hCC (smart-on, either main or aux)
TMTouchByte &hFF
TMTouchByte &hFF

Now back to controlling my house...

Thanks!

Seth

Seth,

You can send a &h33 to turn on the aux channel.

Eric

You'll need to follow &H33, Smart On Aux, with 16 more time slots (bits).

"Compared to the Direct-On Main command, the Smart-On Main requires the bus master to follow the
function command with 16 more time slots. The first 8 time slots (reset stimulus) are translated by the
DS2409 as a reset low time on the Main 1-Wire output. Now, the bus master reads the reset response
byte."
See the DS2409 spec sheet for full details.

I just send a couple of TMTouchByte SessionHandle &HFF.

Also consider using &H66, Smart On Main, instead of &HA5.
 
Hmmm...sending two TMTouchByte &HFF was inconsistent. When I added a third, it appears to work every time.

Seth
 
Hmmm...sending two TMTouchByte &HFF was inconsistent. When I added a third, it appears to work every time.

Seth

Doh. Read my code wrong. SendCommand(&HCC, 2). But in SendCommand() it was "For x = 0 To dummybytes" (i.e. 3 bytes). 3 bytes matches with the usage example in the spec sheet.

16 TX CCh Issue Smart-On Main command
TMTouchByte &HCC

17 TX FFh Send reset stimulus
TMTouchByte &HFF

18 RX <data byte>* Get reset response byte with presence info
TMTouchByte &HFF

19 RX CCh Get confirmation byte
TMTouchByte &HFF

Now that I look at the DS2409 code again there's a few things that need cleaning up and the response and confirmation byte should be checked.
 
Another question: Are you specifically checking CRCs when you get responses from devices?

Thanks!

Seth
 
Another question: Are you specifically checking CRCs when you get responses from devices?

Thanks!

Seth
I check the CRC when reading the DS18S20. I do get an occassional CRC error. I haven't gotten around to checking it for other devices, like the DS2450.
 
Back
Top