Please login or register.

Login with username, password and session length
Advanced search  

News:

The X10Hub (PiX10Hub) is here! Created by the Community, for the Community.:)% #:)

Author Topic: SwitchLinc Dim Level  (Read 16370 times)

AllanMar

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
SwitchLinc Dim Level
« on: November 04, 2006, 12:48:42 AM »

I'm using the SDK to control my switchlinc dimmers. I'm aware of the presetdim difference. I'm able to send statusrequest and get an on/off answer but what do i send to get the dim level?

Thanks,
Logged

roger1818

  • Hero Member
  • *****
  • Helpful Post Rating: 28
  • Posts: 1072
  • Roger H.
Re: SwitchLinc Dim Level
« Reply #1 on: November 04, 2006, 09:58:07 AM »

When you send a status request to a 2-way switchlink, it will send the status followed by a pre-set dim command indicating its dim level (see Using Pre-Set Dim).  The problem is the SDK may not see that Pre-set dim command if the house code indicating the dim level has never been addressed (see Reading TempLinc temperature codes?). 

A suggestion that I came up with that apparently works is to send an unused address from each house code at the beginning of your program (ex. A16, B16, C16, D16, E16, F16, G16, H16, I16, J16, K16, L16, M16, N16, O16, P16) to ensure that every house code has been addressed.

I hope this helps.


[TTA Edit: Moved misplaced {/COLOR}. Added missing {/URL}.]
« Last Edit: November 04, 2006, 12:57:49 PM by TakeTheActive »
Logged

David Mark

  • Full Member
  • ***
  • Helpful Post Rating: -3
  • Posts: 58
    • Ohio Media Group
Re: SwitchLinc Dim Level
« Reply #2 on: December 24, 2006, 08:19:58 PM »

I sure wouldn't send all of those addressing commands at startup.  What a recipe for disaster!

The main problem here is that Smarthome modules have no business sending preset dim's after their status response.  It is completely ridiculous.  Clearly AHP is not going to understand that behavior.

The solution described here doesn't make any sense no matter how many times I read it.  It isn't me as I have used Templincs and X10 thermostats with Misterhouse, not to mention all of the Smarthome modules and addressing doesn't enter into it at all.  You get two commands in sequence, a manual and one of the two preset dims.  If the software can make sense of it (based on what is installed), it will set the temperature or dim level.  It will NOT go back and see what was addressed an hour ago on the same house code (doesn't care and imagine the potential disasters if it did!)
Logged

AllanMar

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: SwitchLinc Dim Level
« Reply #3 on: December 24, 2006, 11:57:15 PM »

I believe the reasoning behind this is AHP (The sdk in this case) will ignore Commands on housecodes that have not been addressed by it. So it won't recieve the presetdim part of the status response.

Clearly this isnt the best behavior or method of dealing with it. But i'm not sure why your so bothered by the previous post.

Logged

roger1818

  • Hero Member
  • *****
  • Helpful Post Rating: 28
  • Posts: 1072
  • Roger H.
Re: SwitchLinc Dim Level
« Reply #4 on: January 02, 2007, 12:31:50 PM »

I sure wouldn't send all of those addressing commands at startup.  What a recipe for disaster!

It is only a recipe for disaster if you are using any of those addresses for something else.  If you aren't using them, it won't do any harm.

Quote
The main problem here is that Smarthome modules have no business sending preset dim's after their status response.  It is completely ridiculous.  Clearly AHP is not going to understand that behavior.

You are right.  They should be using the proper Extended Status Request along with the Extended PresetDim.  But since they aren't I was describing how to get around the problem.

Quote
The solution described here doesn't make any sense no matter how many times I read it.  It isn't me as I have used Templincs and X10 thermostats with Misterhouse, not to mention all of the Smarthome modules and addressing doesn't enter into it at all.  You get two commands in sequence, a manual and one of the two preset dims.  If the software can make sense of it (based on what is installed), it will set the temperature or dim level.  It will NOT go back and see what was addressed an hour ago on the same house code (doesn't care and imagine the potential disasters if it did!)

My intent was to explain how to read the status if you wanted to.  If you don't want to, then don't worry about it.  Just because you can't see a need for it, doesn't mean that no one has a need for it.  Obviously if you can remember the last status you sent then that is good, but if the status is changed locally (or by another controller) then you will need to be able to read PresetDim Commands.

As AllanMar said, "Clearly this isn’t the best behaviour or method of dealing with it."  The best way would be to convince SmartHome to use extended commands in their modules (or hack the firmware yourself).  The second best way would be to convince X10 to fix the SDK to allow you to read any PresetDim command (or re-write it yourself).  My solution isn't as good as those options, but it will work for most people.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.