Hey guys, Happy new year & all that... :-)
I have an issue to bring to your attention that you may not be aware of... - it\'s primarily come about because I\'ve started playing with ActionTiles.
In essence, any of my Comfort devices that are mapped to counters don\'t appear to have a status registered in smartthings... (see image)
I hadn\'t previously noticed this, but in ActionTiles it results in the tiles initially all having a big question mark in them instead of a status. Note that Pressing the tile causes actiontiles to send an off command to the device, and thereafter it does seem to correctly track the status, and updates the tile even when the device is controlled from elsewhere...
Interestingly, when the device is operated, regardless of the source of the command, the switch status in smartthings never shows anything other than \"unknown\" for the switch status, although I do see the level changing correctly...
Is it possible that you can update the switch status as well as the level in smartthings?
Cheers!
Paul G.
Here\'s the effect in ActionTiles...
It seems that on startup, Actiontiles has to get the device status from ST... - that much is pretty obvious. Because the switch status for a counter device is seemingly never set, then AT displays the status as unknown - I guess it *could* also reference the level value & deduce on/off status from that (0=off, >0=on, pretty simple). but unfortunately it doesn\'t... (I\'m going to reach out to the AT dev\'s separately to bring this to their attention).
It rather looks like that the device level is correctly retrieved from ST and displayed on the tile. Also, contrary to what I said above, if the device is operated from elsewhere, the level does correctly alter on the tile, but the status does not (it stays on \"unknown\"). However, if the device is operated from Actiontiles, it does update the tile, although it always sends an OFF to the device regardless of what state it\'s currently in.. at that point the tile is correctly displaying both state and level...
So it seems that AT is very dependent on the state variable in ST being specifically \"on\" or \"off\" in order to track the state...
The one other thing I\'ve noticed, which may be better dealt with within Actiontiles, but I\'ll mention it here too, as it *could* be catered for via UHAI...
Actiontiles appears to append a percent symbol to every level displayed on a tile... - I\'ve not found any indication that this is user configurable there...
This means I get get tiles that show a level value of 255% - obviously not ideal... the \'best\' way to deal with this would be IMO, to have the AT devs modify the UI code to allow the user to specify how to display the level... (i.e. as a percentage, or a raw level value, and to handle the conversion if I choose to have a raw value displayed as a %). Again, I\'m going to reach out to them to make that suggestion...
It could also be done from the UHAI end though I think? - when you write the level value up to ST, can you make it user-configurable whether you send a raw level in the 0-255 range, or a % level in the 0-100 range, - and handle the conversion within UHAI so that a value which is the correct % is always calculated & sent to ST?...
That way, I can have the correct level values shown in AT as a true % value (i.e. 255=100%) -> (<current level> / 255) * 100 = the % value to send to ST...
Doable??
:-)
Paul G.
Quick FYI... the AT Dev\'s responded to my suggestion with the statement that the ST API stipulates that levels sent to ST are expected to be the 0-100 range and thus already representing a % value.
Here\'s the actual response:
[color=\"#0055aa\"]\"Hi Paul,[/color][color=\"#0055aa\"][/color]
[color=\"#0055aa\"]As a Works With SmartThings application, ActionTiles conforms to device capabilities per official API.[/color]
[color=\"#0055aa\"][/color]
[color=\"#0055aa\"]Per
ST Documentation, Switch Level attribute is a value between 0 and 100, therefore the value is representing a percentage.[/color]
[color=\"#0055aa\"][/color]
[color=\"#0055aa\"]If you are using a custom DTH, please contact the developer to add conversion in the DTH. We don\'t support non-conforming DTHs.[/color]
[color=\"#0055aa\"][/color]
[color=\"#0055aa\"]Thanks[/color]
[color=\"#0055aa\"][/color]
[color=\"#0055aa\"]Alex\"
[/color][color=\"#0055aa\"]
[/color] Given that, would it be possible to amend the UHAI to make sure all level values sent to ST are compliant with that?
Cheers
Paul G.
Hi Paul
Have tidied up the repeated posts - the forum does occasionally throw a wobbl.
In terms of the counters object in ST, it\'s a tricky one. I have set up some configuration values which allow you to set upper and lower limits but the values are still mapped one to one.
In order to fix this without impacting those users who wish to use the real values (rather than converted to %), i\'ll add a configuration flag for the counters object to enable a conversion to % based on the upper and lower bounds (defaulting to 0 - 255).
I\'ll also update the switch state so that it is set to off when the counter value is at the lower bound and on for any value higher than the lower bound.
I\'ll try and work on it next Wednesday and post some code to try following.
Thanks,
Matt
Cool. Thanks Matt. Looking forward to it.

Paul G.
Hi matt,[size=
][/size]So, does this allow status update of lights in st ? If you remember there was a bit if a discussion on responses being tied in to light status, where currently ST does not update status when a light is activated locally in comfort ?
Hi matt,[size=
][/size]So, does this allow status update of lights in st ? If you remember there was a bit if a discussion on responses being tied in to light status, where currently ST does not update status when a light is activated locally in comfort ?
Possibly, is the counter is the device being used to establish status in ST, this should solve that issue.
I\'ll work on the code on Wednesday and send out an update with instructions to test.
Thanks,
Matt
I have counters and lights working now - I too am keen to get in on any test for action tiles :-) that will fix above issues.
Cheers
Stuart