diff --git a/homeconnect/integrationpluginhomeconnect.cpp b/homeconnect/integrationpluginhomeconnect.cpp index b089ed5e..ce378f7f 100644 --- a/homeconnect/integrationpluginhomeconnect.cpp +++ b/homeconnect/integrationpluginhomeconnect.cpp @@ -106,13 +106,11 @@ IntegrationPluginHomeConnect::IntegrationPluginHomeConnect() m_endTimerStateTypeIds.insert(dryerThingClassId, dryerEndTimeStateTypeId); m_endTimerStateTypeIds.insert(dishwasherThingClassId, dishwasherEndTimeStateTypeId); - m_startActionTypeIds.insert(ovenThingClassId, ovenStartActionTypeId); m_startActionTypeIds.insert(washerThingClassId, washerStartActionTypeId); m_startActionTypeIds.insert(dryerThingClassId, dryerStartActionTypeId); m_startActionTypeIds.insert(dishwasherThingClassId, dishwasherStartActionTypeId); m_startActionTypeIds.insert(coffeeMakerThingClassId, coffeeMakerStartActionTypeId); - m_stopActionTypeIds.insert(ovenThingClassId, ovenStopActionTypeId); m_stopActionTypeIds.insert(washerThingClassId, washerStopActionTypeId); m_stopActionTypeIds.insert(dryerThingClassId, dryerStopActionTypeId); m_stopActionTypeIds.insert(dishwasherThingClassId, dishwasherStopActionTypeId); @@ -336,21 +334,7 @@ void IntegrationPluginHomeConnect::executeAction(ThingActionInfo *info) m_pendingActions.remove(requestId); }); } else if (thing->thingClassId() == ovenThingClassId) { - if (action.actionTypeId() == ovenStartActionTypeId) { - if (!m_selectedProgram.contains(thing)) { - homeConnect->getProgramsSelected(haid); - return info->finish(Thing::ThingErrorMissingParameter, tr("Please select a program first")); - } - QUuid requestId; - HomeConnect::Option startTime; - startTime.key = "BSH.Common.Option.StartInRelative"; - startTime.unit = "seconds"; - startTime.value = action.param(dishwasherStartActionStartTimeParamTypeId).value().toInt() * 60; - requestId = homeConnect->startProgram(haid, m_selectedProgram.value(thing), QList() << startTime); - connect(info, &ThingActionInfo::aborted, [requestId, this] { - m_pendingActions.remove(requestId); - }); - } + //Oven control is only allowed with an additional agreement with home connect } else if (thing->thingClassId() == coffeeMakerThingClassId) { if (action.actionTypeId() == coffeeMakerTemperatureActionTypeId) { QUuid requestId; @@ -415,11 +399,7 @@ void IntegrationPluginHomeConnect::executeAction(ThingActionInfo *info) }); } } else if (thing->thingClassId() == fridgeThingClassId) { - if (action.actionTypeId() == fridgeFridgeTemperatureSettingActionTypeId) { - //TODO - } else if (action.actionTypeId() == fridgeFreezerTemperatureSettingActionTypeId) { - //TODO - } + //Fridge control is only allowed with an additional agreement with home connect } else if (thing->thingClassId() == dishwasherThingClassId) { if (action.actionTypeId() == dishwasherStartActionTypeId) { if (!m_selectedProgram.contains(thing)) { @@ -432,7 +412,7 @@ void IntegrationPluginHomeConnect::executeAction(ThingActionInfo *info) startTime.unit = "seconds"; startTime.value = action.param(dishwasherStartActionStartTimeParamTypeId).value().toInt() * 60; requestId = homeConnect->startProgram(haid, m_selectedProgram.value(thing), QList() << startTime); - m_pendingActions.insert(requestId, info); + m_pendingActions.insert(requestId, info); connect(info, &ThingActionInfo::aborted, [requestId, this] { m_pendingActions.remove(requestId); }); @@ -484,6 +464,12 @@ void IntegrationPluginHomeConnect::executeAction(ThingActionInfo *info) m_pendingActions.remove(requestId); }); } + } else if (thing->thingClassId() == cleaningRobotThingClassId) { + //Home Connect: Program support is planned to be released in 2020. + } else if (thing->thingClassId() == cookTopThingClassId) { + //Home Connect: Program support is planned to be released in 2020. + } else if (thing->thingClassId() == hoodThingClassId) { + //Home Connect: Program support is planned to be released in 2020. } else { Q_ASSERT_X(false, "executeAction", QString("Unhandled thingClassId: %1").arg(thing->thingClassId().toString()).toUtf8()); } diff --git a/homeconnect/integrationpluginhomeconnect.json b/homeconnect/integrationpluginhomeconnect.json index a386fe18..e5db79b4 100644 --- a/homeconnect/integrationpluginhomeconnect.json +++ b/homeconnect/integrationpluginhomeconnect.json @@ -151,7 +151,6 @@ "defaultValue": 180, "minValue": 30, "maxValue": 250, - "writable": true, "unit": "DegreeCelsius", "type": "int" }, @@ -172,8 +171,7 @@ "displayNameAction": "Set duration", "defaultValue": 0, "unit": "Minutes", - "type": "int", - "writable": true + "type": "int" }, { "id": "85a333dc-0e0b-454c-9c9a-d14dd6484275", @@ -201,29 +199,6 @@ "type": "QString" } ], - "actionTypes": [ - { - "id": "c7b9b467-6ac5-4870-8874-da977fa30987", - "name": "start", - "displayName": "Start", - "paramTypes": [ - { - "id": "27de74b5-265a-4c9f-bd3e-f58ab5c81a1f", - "name": "startTime", - "displayName": "Start time", - "defaultValue": 0, - "minValue": 0, - "type": "int", - "unit": "Minutes" - } - ] - }, - { - "id": "0467aeed-b275-4e5f-a288-1a600465b582", - "name": "stop", - "displayName": "Stop" - } - ], "eventTypes": [ { "id": "aa3372df-5be7-499a-8246-9c4319a2c080", @@ -737,7 +712,6 @@ "type": "int", "minValue": 2, "maxValue": 8, - "writable": true, "unit": "DegreeCelsius" }, { @@ -761,7 +735,6 @@ "type": "int", "minValue": -24, "maxValue": -16, - "writable": true, "unit": "DegreeCelsius" } ],