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

Only show available hardware-based options in the ui #109

Closed
1 task done
TheRealKasumi opened this issue Jan 20, 2023 · 2 comments · Fixed by #119
Closed
1 task done

Only show available hardware-based options in the ui #109

TheRealKasumi opened this issue Jan 20, 2023 · 2 comments · Fixed by #119
Assignees
Labels
enhancement New feature or request frontend Issues related to the web-app good first issue Good for newcomers
Milestone

Comments

@TheRealKasumi
Copy link
Owner

TheRealKasumi commented Jan 20, 2023

With #107 we add a new endpoint that allowed to query advanced information about teslights software and hardware. This especially includes optional hardware, that can be connected to the controller. The UI should only show hardware-based options when the required hardware is available. So for example when the MPU6050 is missing, there should be no motion based effects selectable.

  • Implement in frontend
@TheRealKasumi TheRealKasumi added enhancement New feature or request good first issue Good for newcomers frontend Issues related to the web-app labels Jan 20, 2023
@TheRealKasumi TheRealKasumi added this to the 1.1.0 Release milestone Jan 20, 2023
@danielbayerlein
Copy link
Collaborator

@TheRealKasumi Can you please describe each option?

@TheRealKasumi
Copy link
Owner Author

Its relatively simple. When you query the new /api/info/system endpoint, you will receive a response like this:

{
    "socInfo": {...},
    "hardwareInfo": {
        "hwVersion": "2.1",
        "regulatorCount": 2,
        "regulatorVoltage": 5,
        "regulatorCurrentLimit": 6,
        "regulatorCurrentDraw": 0.056253076,
        "regulatorPowerLimit": 24,
        "regulatorPowerDraw": 0.281265378,
        "regulatorTemperature": 70,
        "fanSpeed": 255,
        "mpu6050": 1,
        "ds18b20": 0,
        "bh1750": 0,
        "audioUnit": 0
    },
    "tlSystemInfo": {...}
}

Most of this is just nice to have information that we can display in the expert mode later. However the last 4 properties are interesting for you. They tell you how many sensors of a specific type are connected. So if the mpu6050 is >0, this means you can display all settings that use the motion sensor. These are the motion based animations and the "power mode" with the mpu6050.

Same applies for the bh1750 which is the light sensor. The one that can actually measure the enviornment brightness. If this one is not connected, we should not have it available in the ui as "power mode".

The audio unit is not relevant yet but is coming very soon.

ds18b20 tells you how many temperature sensors are connected. This might be interesting to maybe show a warning when the automatic fan mode is selected (#114). When its not available the fan speed will be always at 100% when automatic is selected.

Does that help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Issues related to the web-app good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants