From 7c95ca87148f91d162c369b4b3cc9bd11dd95b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 23 Mar 2018 20:34:28 +0100 Subject: [PATCH 1/2] Update packages --- debian/control | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 3f2fe399..35d7b079 100644 --- a/debian/control +++ b/debian/control @@ -653,7 +653,8 @@ Depends: nymea-plugin-awattar, nymea-plugin-wakeonlan, nymea-plugin-wemo, nymea-plugin-elgato, - nymea-plugin-senic + nymea-plugin-senic, + nymea-plugin-keba, Replaces: guh-plugins Description: Plugins for nymea IoT server - the default plugin collection The nymea daemon is a plugin based IoT (Internet of Things) server. The @@ -728,6 +729,8 @@ Package: nymea-plugins-all Section: libs Architecture: all Depends: nymea-plugins, + nymea-plugin-simulation, + nymea-plugin-snapd, nymea-plugins-433mhz, nymea-plugins-maker, nymea-plugins-merkurboard, From 4e7eede8fc79e8a00da8b17ce23c8612b1c9600a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 23 Mar 2018 20:53:24 +0100 Subject: [PATCH 2/2] Update light value to illuminance --- simulation/devicepluginsimulation.cpp | 4 +--- simulation/devicepluginsimulation.json | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/simulation/devicepluginsimulation.cpp b/simulation/devicepluginsimulation.cpp index 51710ab3..dd2d6334 100644 --- a/simulation/devicepluginsimulation.cpp +++ b/simulation/devicepluginsimulation.cpp @@ -234,8 +234,6 @@ DeviceManager::DeviceError DevicePluginSimulation::executeAction(Device *device, int DevicePluginSimulation::generateRandomIntValue(int min, int max) { - // Seed the random generator with current time - qsrand(QDateTime::currentMSecsSinceEpoch() / 1000); int value = ((qrand() % ((max + 1) - min)) + min); // qCDebug(dcSimulation()) << "Generateed random int value: [" << min << ", " << max << "] -->" << value; return value; @@ -276,7 +274,7 @@ void DevicePluginSimulation::onPluginTimer20Seconds() // Garden sensor device->setStateValue(gardenSensorTemperatureStateTypeId, generateRandomDoubleValue(20, 23)); device->setStateValue(gardenSensorSoilMoistureStateTypeId, generateRandomIntValue(40, 60)); - device->setStateValue(gardenSensorLightIntensityStateTypeId, generateRandomIntValue(40, 60)); + device->setStateValue(gardenSensorIlluminanceStateTypeId, generateRandomIntValue(20, 80)); device->setStateValue(gardenSensorBatteryLevelStateTypeId, generateRandomIntValue(25, 90)); device->setStateValue(gardenSensorBatteryCriticalStateTypeId, device->stateValue(gardenSensorBatteryLevelStateTypeId).toDouble() <= 30); device->setStateValue(gardenSensorConnectedStateTypeId, true); diff --git a/simulation/devicepluginsimulation.json b/simulation/devicepluginsimulation.json index 691c36b3..d0cf974c 100644 --- a/simulation/devicepluginsimulation.json +++ b/simulation/devicepluginsimulation.json @@ -763,12 +763,12 @@ }, { "id": "9781f0a5-3478-4291-ab51-9daa1ba0e44e", - "name": "lightIntensity", - "displayName": "Light intensity", - "displayNameEvent": "Light intensity changed", + "name": "illuminance", + "displayName": "Illuminance", + "displayNameEvent": "Illuminance changed", "type": "double", - "unit": "Candela", - "defaultValue": 0 + "unit": "Lux", + "defaultValue": 20 }, { "id": "45c0de32-b519-47d7-9f82-e5f09d1542d4",