Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

level capability should map 1-100 #5

Open
jterrace opened this issue Feb 4, 2018 · 11 comments · May be fixed by #10
Open

level capability should map 1-100 #5

jterrace opened this issue Feb 4, 2018 · 11 comments · May be fixed by #10

Comments

@jterrace
Copy link
Contributor

jterrace commented Feb 4, 2018

The switchLevel capability has no way to set a min and max value, so the general convention is that it should go from 1 to 100. When I import this device into ActionTiles, for example, it shows a 1-100 slider, which makes it very hard to pick a value from 1-10.

It looks like they're proposing a new fanSpeed capability, but even that doesn't look like you can specify the min and max value.

I'd like to propose using 1-100 as the level capability and mapping them to 1-10, e.g.

  • 1-10: 1
  • 11-20: 2
  • 21-30: 3
  • 31-40: 4
  • 41-50: 5
  • 51-60: 6
  • 61-70: 7
  • 71-80: 8
  • 81-90: 9
  • 91-100: 10
@hollapm
Copy link

hollapm commented Jun 24, 2019

Did you find a way to do the above? I'm a newbie at this and agree that it should go to a max of 10.

One challenge with the dimmer in doing increments of 10, at speed 3, it shows the dimmer at 3, at speed 7 it shows the dimmer at 7. I don't thing a dimmer setting above 10 is going to work? Note that I have a 10 speed fan as well.

@jterrace
Copy link
Contributor Author

Yes, I have pending changes that I've been using on my smartthings hub for a long time. I didn't send a PR though because I wanted to fix #4 as well.

@jterrace jterrace linked a pull request Jun 24, 2019 that will close this issue
@hollapm
Copy link

hollapm commented Jun 24, 2019

Any way that you can share what you've done to your system/code?
Also are you still using the classic or the newer capabilities? In looking at the newer API it looks like multiple devices can be put into one. Basically the Whole House Fan as it is run today is ultimately using the switch call (which allows it to have the two buttons for increase/decrease plus power button on the bottom. In thinking about this more, I wonder if a button can be added at the bottom for time increase, and there the current secondary_control area is, it would update with time remaining there? The button would be at the bottom, similar to the power button?

Would love to see what you have done. I use to code a "long time" ago but that was with C++. Do you have any applications that you recommend which may color code variables, code etc? I'm on a Mac if that makes a difference.

Thanks jterrace and I hope that I can help with this project as well.

@jterrace
Copy link
Contributor Author

I sent out #10 with my changes.

I'm using the generation 2 controller. As far as I understand it, there is no API for the new controllers. See the last paragraph here: https://blog.airscapefans.com/archives/new-controls

Is that what you meant by the newer API?

As for IDE, I use Eclipse with a Groovy plugin. But it doesn't work that well honestly. Most people use the SmartThings IDE as far as I know, since otherwise you have to copy/paste from your own IDE into there anyway.

@hollapm
Copy link

hollapm commented Jun 24, 2019

Your assessment is correct, I ment the API from from smartthings - https://graph.api.smartthings.com
Also are you using the Classic Smartthings app or the newer app? With the updates I d/l which you submitted I'm not getting anything to work, but I don't know if its due to the fact I'm running Android Q on my phone which is causing issues with Smartthings either. Grr...

I'd love to help test out as well ;-)

@jterrace
Copy link
Contributor Author

It will definitely not work with the new app, only smartthings classic. Which do you have?

@hollapm
Copy link

hollapm commented Jun 25, 2019 via email

@jterrace
Copy link
Contributor Author

@hollapm - please try the pull request with the latest commit. I think I fixed the issue you were having.

@hollapm
Copy link

hollapm commented Jun 30, 2019 via email

@hollapm
Copy link

hollapm commented Jun 30, 2019 via email

@hollapm
Copy link

hollapm commented Jun 30, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants