Skip to content

MrCode4/stherm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STHERM

Introduction

Pre-requirements

Ensure you have the following software installed and configured before proceeding:

  • CMake v3.16 or later
  • Qt 6.4.3 with the following modules and libraries:
    • Qt 5 Compatiblity Module
    • Qt Shader Tools
    • Additional libraries
      • Qt Image Formats
      • Qt Multimedia
      • Qt Serial Port
      • Qt Virtual Keyboard
  • Openssl v1.x

if you are using Windows:

  • MSVC 2019 64-bit with the following workloads:
    • Desktop development with C++ workload
    • Change DISABLE_PROTOBUF option default to ON in the CMakeList.txt file

Note: If you're using Linux, make sure to run the app with root or sudo privileges.

How to build?

  1. Set CMake build type to Release
  • Qt Creator:
    Navigate to Projects > Edit build configuration > Release
  1. Generate makefiles:
  • Qt Creator:
    Navigate to Build > Run CMake
  • CMake:
    cmake -S . -B ./build/release
  1. Build project
  • Qt Creator:
    Navigate to Build > Build Project
  • CMake:
    cmake --build ./build/release --target ALL_BUILD --config Release

How to Fake a Serial Number?

To enable fake serial mode, set FAKE_UID_MODE option to ON in your CMakeLists file and create a new fake serial ID. Please follow the steps below:
Qt Creator:

  1. Go to Projects (Ctrl + 5).
  2. Under the currently selected kit, click on Build.
  3. In the CMake Section, select the Current Configuration tab.
  4. Search for FAKE_UID_MODE.
  5. Check the box to turn it ON.
  6. Search for FAKE_UID
  7. Set your fake Unique ID as the value

    Note: Remember, the value must be 16 characters long and can include both digits and letters.

  8. Search for FAKE_SERIALID
  9. Set your fake serial ID as the value

    Note: If you don't set the FAKE_SERIALID, the app will go through the first-run flow, and if the API responds, it will navigate to the home screen.

  10. Finally, click on Run CMake.

CMake:

cmake -DFAKE_UID_MODE:BOOL=ON -DFAKE_UID=$YOUR_FAKE_UID .

Note: An active Internet connection is required to retrieve the serial number associated with your unique ID.

WARNING: Ensure your fake serial number is not a valid serial number connected to a real device. Any changes you make in the app will appear on the device.

Developer Mode

If you want to test the UI without needing a valid serial number or connecting to a device, you can set userLevel to DEVELOPER in UiSession.qml:

    // property int userLevel: UiSession.UserLevel.USER
    property int userLevel: UiSession.UserLevel.DEVELOPER

Initial setup

NOTE: This section is only for developers.

What is initial setup exactly?

The initial setup flow involves configuring several settings for your device. These include:

  • Selecting the system type, such as:
    • Traditional
    • Heat Pump
    • Cool only
    • Heat Only
  • Configuring the specific settings based on the selected system type.
  • Specifying the accessories your device has. You can select either a humidifier, dehumidifier, or none. Each accessory may have additional options.
  • Setting the system run delay.
  • Enabling technician access, which displays a QR code. By scanning the QR code, you can view information about the device after logging into your nuvehvac.com account.

How to Run Initial Setup Automatically

If your app has a valid serial number and the variable hasClient is set to false, the app will automatically run in initial setup mode.

How to Run Initial Setup Manually

NOTE: Make sure your app has a serial number. If you are testing the app on Windows, refer to the How to Fake a Serial Number section.

To run the app in initial setup mode, you need to set INITIAL_SETUP_MODE option to ON in your CMakeLists file. Please follow the steps below:
Qt Creator:

  1. Go to Projects (Ctrl + 5).
  2. Under the currently selected kit, click on Build.
  3. In the CMake Section, select the Current Configuration tab.
  4. Search for INITIAL_SETUP_MODE.
  5. Check the box to turn it ON.
  6. Finally, click on Run CMake.

CMake:

cmake -DINITIAL_SETUP_MODE:BOOL=ON .

Test mode

What is Test mode exactly?

When you enable Test mode, you have the ability to physically test your device to ensure all components are functioning correctly. Additionally, Test mode allows you to manually update your device's software or firmware, providing greater control over maintenance and troubleshooting.

How to move the app to the test mode?

You can enter test mode in several ways:

  1. To run the app in test mode, set TROUBLESHOOTING_MODE option to ON in your CMakeLists file. Please follow the steps below:
    Qt Creator:

    1. Go to Projects (Ctrl + 5).
    2. Under the currently selected kit, click on Build.
    3. In the CMake Section, select the Current Configuration tab.
    4. Search for TROUBLESHOOTING_MODE.
    5. Check the box to turn it ON.
    6. Finally, click on Run CMake.

    CMake:

    cmake -DTROUBLESHOOTING_MODE:BOOL=ON .

Alternatively, if your device doesn't have GPIO or the START_MODE_GPIO is set to zero in the parameter definitions:

/** The GPIO used to determine start mode */
#define START_MODE_GPIO         0
  1. To run the app in test mode, set SERIAL_TEST_MODE option to ON in your CMakeLists file. Please follow the steps below:
    Qt Creator:

    1. Go to Projects (Ctrl + 5).
    2. Under the currently selected kit, click on Build.
    3. In the CMake Section, select the Current Configuration tab.
    4. Search for SERIAL_TEST_MODE.
    5. Check the box to turn it ON.
    6. Search for SERIAL_TEST_DELAY_COUNTER.
    7. Set your desired delay counter value.
    8. Finally, click on Run CMake.

    CMake:

    cmake -DSERIAL_TEST_MODE:BOOL=ON -DSERIAL_TEST_DELAY_COUNTER=3 .
  2. By pressing and holding the device information for 10 seconds in the device menu.


Description of image


After enabling Test mode, you will see new buttons on the device information page that allow you to update the NRF, restart the app, or forget the device.

  1. By pressing and holding the system update option for 10 seconds in the device menu.

Description of image


After this, a new option for manual updates will appear on the system update page.

  1. By tapping 10 times on the FCC ID in the device information page in the device menu.

Description of image


After enabling Test mode through these methods, the app will show tests for touch functionality, color display, brightness, backlight, internal sensors, and relays. At the end, a QR code containing the serial number will be displayed, and then the device will restart.







About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published