Skip to content

Improvements for Danfoss Ally / Hive TRV#3171

Merged
manup merged 36 commits intodresden-elektronik:masterfrom
SwoopX:Danfoss
Sep 10, 2020
Merged

Improvements for Danfoss Ally / Hive TRV#3171
manup merged 36 commits intodresden-elektronik:masterfrom
SwoopX:Danfoss

Conversation

@SwoopX
Copy link
Collaborator

@SwoopX SwoopX commented Aug 20, 2020

  • Enhanced the ability to steer/configure Danfoss Ally/Hive TRV thermostats via REST API
    • Expose Viewing Direction (0x4000) from Thermostat UI configuration cluster as config.displayflipped (bool) for those 2 devices to change display orientation.
    • Expose Keypad Lockout (0x0001) from Thermostat UI configuration cluster as config.locked (bool) for those 2 devices to set child lock.
    • Expose Mounting mode active (0x4012) from Thermostat cluster as state.mountingmodeactive (bool) for those 2 devices to see if mounting mode is active.
    • Expose Mounting mode control (0x4013) from Thermostat cluster as config.mountingmode (bool) for those 2 devices to set mounting mode.
    • Expose SW error code (0x4000) from Diagnostics cluster as config.errorcode (string) for those 2 devices to obtain current error codes. Assumption is that value 0A00 inplies no error.
    • Added binding and repporting configuration for the required clusters and attributes as mentioned above.
  • Added stricter data type check on bool for config.displayflipped, config.locked and config.mountingmode.
  • Added handleDiagnosticsClusterIndication to handle data indications from diagnostics cluster.
  • Added handleThermostatUiConfigurationClusterIndication to handle data indications from thermostat ui configuration cluster.

SwoopX added 30 commits July 16, 2020 22:56
- Sunricher button map is suited best for EcoDim switches
- Improved group handling for those switches
Copy link
Member

@manup manup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments for missing arguments and unhandled parameters.

@SwoopX SwoopX requested a review from manup August 27, 2020 22:10
Copy link
Member

@manup manup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small question about the QString::toHtmlEscaped() usage, otherwise it looks fine.

}
else
{
rsp.list.append(errorToMap(ERR_ACTION_ERROR, QString("/sensors/%1/config/%2").arg(id).arg(pi.key()).toHtmlEscaped(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity why the .toHtmlEscaped()?

From the documentation:

Converts a plain text string to an HTML string with HTML metacharacters <, >, &, and " replaced by HTML entities.

The strings are in a JSON object anyway, the only reason for escaping I can think of would be quotes or the other meta characters within the string, which we don't have.

@manup manup merged commit 11a0e50 into dresden-elektronik:master Sep 10, 2020
@SwoopX SwoopX deleted the Danfoss branch September 13, 2020 19:03
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 this pull request may close these issues.

2 participants