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

Add support for getControllerConfig() requests #9

Open
tsathishkumar opened this issue Oct 22, 2018 · 2 comments
Open

Add support for getControllerConfig() requests #9

tsathishkumar opened this issue Oct 22, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@tsathishkumar
Copy link
Owner

No description provided.

@tsathishkumar
Copy link
Owner Author

@flatsiedatsie I need some help here to understand on how to handle this request.

Some sample requests and responses of other controllers will help.

@flatsiedatsie
Copy link
Contributor

flatsiedatsie commented Nov 29, 2018

On it.

The only one I really care about it this Arduino command:

getControllerConfig().isMetric

The message is:

*; (node)
*; (child)
3; (internal command)
0; (ACK, can also be 1)
6; (I_CONFIG command)

Form the api documentation:
Reply with (M)etric or (I)mperal back to sensor.

The question then becomes: how do we know what the user prefers?

  • Ask the Mozilla Gateway? I couldn't find anything about this. In Domoticz this is a preference in the settings.
  • Ask the Raspberry Pi? But this would only work if the user has set locale (Mozilla Gateway users do not) data and/or if the device has an internet connection (my Raspberry Pi will not have an internet connection).
  • Forget about this, and just let the user set the preference in the code of the sensors? But then how will the interface know whether to show the Celcius or Fahrenheit icon?

From what I found in the Mozilla Gateway code here, it seems they expect the device to decide and name what to send, and notify the gateway of that.

      case 'degree fahrenheit':
      case 'degrees fahrenheit':
      case 'fahrenheit':
        return '°F';

      case 'degree celsius':
      case 'degrees celsius':
      case 'celsius':
        return '°C';

      case 'kelvin':
        return 'K';

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

No branches or pull requests

2 participants