Skip to content

Enhacements and improvements - #3732

Merged
manup merged 14 commits into
dresden-elektronik:masterfrom
SwoopX:enhancements
Nov 30, 2020
Merged

manup merged 14 commits into
dresden-elektronik:masterfrom
SwoopX:enhancements

Conversation

@SwoopX

@SwoopX SwoopX commented Nov 22, 2020 •

Copy link
Copy Markdown
Collaborator

@SwoopX SwoopX linked an issue Nov 22, 2020 that may be closed by this pull request
Comment thread de_web_plugin.cpp
- Corrected exposure of current values
- Ensure the device choses reasonable reporting thresholds
Comment thread rest_rules.cpp Outdated
{
if (name.size() > MAX_RULE_NAME_LENGTH)
{
rsp.list.append(errorToMap(ERR_MISSING_PARAMETER, QString("/rules/name"), QString("invalid/missing parameters in body")));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Doesn't ERR_INVALID_VALUE fit in better here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Well, yes. Smanar also mentioned something similar. We should generally rework the API parts and make it more consistent and robust.

Was just going with the (erroneous) flow here, but happy to amend 😁

- Revert previous change in this regard
- Enable sending default responses for cluster 0x0500 if requested
@damajor

damajor commented Nov 29, 2020

Copy link
Copy Markdown

I hope to see that merged for the next stable release :)

Comment thread bindings.cpp Outdated
rq3.maxInterval = 300;
if (sensor && (sensor->modelId() == QLatin1String("SP 120") || // innr
sensor->modelId() == QLatin1String("DoubleSocket50AU") || // Aurora
sensor->modelId().startsWith(QLatin1String("SPLZB-1")) // Develco smart plug

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing || ?

Comment thread bindings.cpp Outdated
sensor->modelId() == QLatin1String("SKHMP30-I1") || // GS smart plug
sensor->modelId().startsWith(QLatin1String("SPW35Z")))) // RT-RK OBLO SPW35ZD0 smart plug
else if (sensor && (sensor->modelId() == QLatin1String("SmartPlug") || // Heiman
sensor->modelId().startsWith(QLatin1String("EMIZB-1")) // Develco EMI

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing || ?

Comment thread ias_zone.cpp Outdated
Comment on lines +86 to +91

// Allow clearing the alarm bit for Develco devices
if (!(zclFrame.frameControl() & deCONZ::ZclFCDisableDefaultResponse))
{
sendZclDefaultResponse(ind, zclFrame, deCONZ::ZclSuccessStatus);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tricky, the default response should only be send when no other response is sent.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hello. Not sure if this is the correct place to comment. Just saw this update and tried it out and it works great. I can stop the siren with the button on the smoke detector and the alarm bit gets cleared. I can also stop the siren from the API and the alarm bit also gets cleared there. Thank you @SwoopX for finding the solution.

Comment thread rest_sensors.cpp
Comment on lines 1170 to 1172
{
if (map[pi.key()].type() == QVariant::Double)
{
//if (map[pi.key()].type() == QVariant::Double)
//{
qint16 coolsetpoint = map[pi.key()].toInt(&ok);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wouldn't remove that check. If the client sends the value as string it should be fixed in the client by using a number.

The docs also describe that parameter as Number (700–3500):

https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/sensors/

@manup
manup merged commit 95fcd9d into dresden-elektronik:master Nov 30, 2020
@SwoopX
SwoopX deleted the enhancements branch December 10, 2020 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants