Device.statesSince() documentation incomplete?

@slagle can make sure you’re set up and on the beta list. No, this was a beta with community/non-ST-employee developers.

Thanks for fast responses Jim I appreciate it.

1 Like

I signed up a while ago too…

I would appreciate getting on that list as well.

The signup sheet and more information can be found here: Want to be a SmartThings beta tester?

Thanks for the link - I did sign up for that twice (once before and once after that list lost its state a while ago and you guys asked people to sign up again).

Just so i’m clear… I’ve signed up twice. Do I need to fill it out again?

Nope, you should not need to fill it out again. It’s a list of potential candidates, so signing up does not guarantee participation in beta programs. For more information about it, best to discuss on that thread. Thanks!

1 Like

@Jim could you shed light on what video codecs are supported by htmlTile currently or is that a function of the device it runs on?

I really have no idea to be honest. And with the changes coming that will prevent any non-ST domain from being included in the tile it all may change.

1 Like

When you say non ST-domain, i.e. one can’t load content from outside of ST, just execute local html code from within the DH, is that right?

Correct. 10chars

I can see why you’re making this change, but it would have been nice to be able to display icons from a GitHub repository instead of having to use the default ST icons.

1 Like

Really? That sucks - I guess using Google Charts as shown earlier in the thread is out of the question then? Any chance that the default whitelist can allow for a few additional domains such as gstatic.com, github.com, …? I guess this means that the Wattvision device type (which is an official ST DTH) will stop working?

Hey guys, I have one question too. Does the stateSince() function only return the changed states? That is not very clear from the documentation.
Here is my issue: the device is a power plug, it sends periodic “power” events with the value of the power used. I was expecting that if I read the the last 2 states with stateSince() I will be able to read the time passed between the last “power” event and the current one and that way would be able to calculate the energy usage. Yeah, but I found out that if the power output hasn’t changed for a while, i.e. lets say the plug is off for 30 min and it sends power = 0 every 10 min, the stateSince() result gives me the last state when power was different than 0. I was expecting to get 2 states with 0 value for the power and 10 min interval between their timestamp.
Can you confirm that stateSince() works that way and only return states that have change?
And also I would appreciate ideas how to achieve this thing. The moment a “power” event comes I want to find the value of the previous “power” event and the time since. I was hoping that would be possible without storing these in local variables.

Tagging @unixbeast so he can clarify.

Have you looked into retrieving the events instead of states?

Yes, but the difference is that the stateSince() method accepts parameter attributeName with the name of the event that I want. The eventsSince() method does not have that and when I tried I wasn’t able to figure out how to filter the output or even how to see any of the output at all. I put some debug messages to show me the name and date of the first event returned and nothing showed in the logs.

I think I solved my issue. I changed the sendEvent parameter isStateChange to True and now stateSince() returns the states I need.
As for the eventSince() - I tried it again but every time I try accessing any property of the returned event objects I get security exception that I have no permissions.