Use the new nymea-plugininfocompiler for building the matadata.
parent
b5a1a84ab5
commit
27f862cf8e
|
|
@ -499,9 +499,9 @@ void DevicePluginDateTime::updateTimes()
|
|||
return;
|
||||
|
||||
if (m_dusk.isValid()) {
|
||||
m_todayDevice->setStateValue(todayDuskStateTypeId, m_dusk.toTime_t());
|
||||
m_todayDevice->setStateValue(todayDuskTimeStateTypeId, m_dusk.toTime_t());
|
||||
} else {
|
||||
m_todayDevice->setStateValue(todayDuskStateTypeId, 0);
|
||||
m_todayDevice->setStateValue(todayDuskTimeStateTypeId, 0);
|
||||
}
|
||||
if (m_sunrise.isValid() && m_sunset.isValid()) {
|
||||
m_todayDevice->setStateValue(todaySunriseTimeStateTypeId, m_sunrise.toTime_t());
|
||||
|
|
@ -513,14 +513,14 @@ void DevicePluginDateTime::updateTimes()
|
|||
m_todayDevice->setStateValue(todayDaylightStateTypeId, false);
|
||||
}
|
||||
if (m_dusk.isValid()) {
|
||||
m_todayDevice->setStateValue(todayNoonStateTypeId, m_noon.toTime_t());
|
||||
m_todayDevice->setStateValue(todayNoonTimeStateTypeId, m_noon.toTime_t());
|
||||
} else {
|
||||
m_todayDevice->setStateValue(todayNoonStateTypeId, 0);
|
||||
m_todayDevice->setStateValue(todayNoonTimeStateTypeId, 0);
|
||||
}
|
||||
if (m_dusk.isValid()) {
|
||||
m_todayDevice->setStateValue(todayDawnStateTypeId, m_dawn.toTime_t());
|
||||
m_todayDevice->setStateValue(todayDawnTimeStateTypeId, m_dawn.toTime_t());
|
||||
} else {
|
||||
m_todayDevice->setStateValue(todayDawnStateTypeId, 0);
|
||||
m_todayDevice->setStateValue(todayDawnTimeStateTypeId, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,9 +104,9 @@
|
|||
},
|
||||
{
|
||||
"id": "44a99419-fbcd-4d8e-9441-897848b8f77c",
|
||||
"name": "dusk",
|
||||
"displayName": "dusk",
|
||||
"displayNameEvent": "dusk changed",
|
||||
"name": "duskTime",
|
||||
"displayName": "Dusk time",
|
||||
"displayNameEvent": "Dusk time changed",
|
||||
"unit": "UnixTime",
|
||||
"type": "int",
|
||||
"defaultValue": 0
|
||||
|
|
@ -114,26 +114,26 @@
|
|||
{
|
||||
"id": "3a08824d-285b-412e-a515-9664b491a85c",
|
||||
"name": "sunriseTime",
|
||||
"displayName": "sunrise",
|
||||
"displayNameEvent": "sunrise changed",
|
||||
"displayName": "Sunrise time",
|
||||
"displayNameEvent": "Sunrise time changed",
|
||||
"unit": "UnixTime",
|
||||
"type": "int",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "d92be29a-929c-4240-91a0-30153850f838",
|
||||
"name": "noon",
|
||||
"displayName": "noon",
|
||||
"displayNameEvent": "noon changed",
|
||||
"name": "noonTime",
|
||||
"displayName": "Noon time",
|
||||
"displayNameEvent": "Noon time changed",
|
||||
"unit": "UnixTime",
|
||||
"type": "int",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "a5779b11-0499-4a6d-a7bd-8143dcc546b4",
|
||||
"name": "dawn",
|
||||
"displayName": "dawn",
|
||||
"displayNameEvent": "dawn changed",
|
||||
"name": "dawnTime",
|
||||
"displayName": "Dawn time",
|
||||
"displayNameEvent": "Dawn time changed",
|
||||
"unit": "UnixTime",
|
||||
"type": "int",
|
||||
"defaultValue": 0
|
||||
|
|
@ -141,8 +141,8 @@
|
|||
{
|
||||
"id": "377f04a7-df58-42ad-a234-e9e23bdc2f85",
|
||||
"name": "sunsetTime",
|
||||
"displayName": "sunset",
|
||||
"displayNameEvent": "sunset changed",
|
||||
"displayName": "Sunset time",
|
||||
"displayNameEvent": "Sunset time changed",
|
||||
"unit": "UnixTime",
|
||||
"type": "int",
|
||||
"defaultValue": 0
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
nymea-plugins (0.14.0) UNRELEASED; urgency=medium
|
||||
|
||||
|
||||
-- Michael Zanetti <michael.zanetti@guh.io> Wed, 26 Jun 2019 21:44:29 +0200
|
||||
|
||||
nymea-plugins (0.12.3) xenial; urgency=medium
|
||||
|
||||
[ Michael Zanetti ]
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ Build-depends: libboblight-dev,
|
|||
libnymea1-dev,
|
||||
libnymea-mqtt-dev,
|
||||
libqt5serialport5-dev,
|
||||
libqt5websockets5-dev,
|
||||
nymea-dev-tools:native,
|
||||
pkg-config,
|
||||
python:any,
|
||||
qtbase5-dev,
|
||||
|
|
|
|||
|
|
@ -523,6 +523,7 @@ void DevicePluginEQ3::radiatorThermostatDataUpdated()
|
|||
foreach (Device *device, myDevices().filterByDeviceClassId(radiatorThermostateDeviceClassId)){
|
||||
if(device->paramValue(radiatorThermostateDeviceSerialParamTypeId).toString() == radiatorThermostat->serialNumber()){
|
||||
device->setStateValue(radiatorThermostateComfortTempStateTypeId, radiatorThermostat->comfortTemp());
|
||||
device->setStateValue(radiatorThermostateEcoTempStateTypeId, radiatorThermostat->ecoTemp());
|
||||
device->setStateValue(radiatorThermostateMaxSetpointTempStateTypeId, radiatorThermostat->maxSetPointTemp());
|
||||
device->setStateValue(radiatorThermostateMinSetpointTempStateTypeId, radiatorThermostat->minSetPointTemp());
|
||||
device->setStateValue(radiatorThermostateErrorOccurredStateTypeId, radiatorThermostat->errorOccurred());
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@
|
|||
},
|
||||
{
|
||||
"id": "24dfd20d-bc8d-48e4-8162-b20ae0465c41",
|
||||
"name": "comfortTemp",
|
||||
"name": "ecoTemp",
|
||||
"displayName": "eco temperature",
|
||||
"displayNameEvent": "eco temperature changed",
|
||||
"unit": "DegreeCelsius",
|
||||
|
|
|
|||
23
plugins.pri
23
plugins.pri
|
|
@ -10,11 +10,6 @@ PKGCONFIG += nymea
|
|||
HEADERS += $${OUT_PWD}/plugininfo.h \
|
||||
$${OUT_PWD}/extern-plugininfo.h
|
||||
|
||||
# Check if this is a snap build
|
||||
snappy{
|
||||
INCLUDEPATH+=$$(SNAPCRAFT_STAGE)/usr/include/nymea
|
||||
}
|
||||
|
||||
# Make the device plugin json file visible in the Qt Creator
|
||||
OTHER_FILES += $$PWD/$${TARGET}/deviceplugin"$$TARGET".json
|
||||
|
||||
|
|
@ -23,19 +18,17 @@ OTHER_FILES += $$PWD/$${TARGET}/deviceplugin"$$TARGET".json
|
|||
|
||||
# Create plugininfo file
|
||||
plugininfo.target = $$OUT_PWD/plugininfo.h
|
||||
extern-plugininfo.target = $$OUT_PWD/extern-plugininfo.h
|
||||
plugininfo_dummy.target = plugininfo.h
|
||||
extern-plugininfo_dummy.target = extern-plugininfo.h
|
||||
plugininfo.depends = FORCE
|
||||
plugininfo.commands = nymea-generateplugininfo --filetype i --jsonfile $$PWD/$${TARGET}/deviceplugin"$$TARGET".json --output plugininfo.h --builddir $$OUT_PWD
|
||||
plugininfo.commands = nymea-plugininfocompiler \
|
||||
$$PWD/$${TARGET}/deviceplugin"$$TARGET".json \
|
||||
--output $$OUT_PWD/plugininfo.h \
|
||||
--extern $$OUT_PWD/extern-plugininfo.h
|
||||
plugininfo_dummy.commands = $$plugininfo.commands
|
||||
QMAKE_EXTRA_TARGETS += plugininfo plugininfo_dummy
|
||||
|
||||
# Create extern-plugininfo file
|
||||
extern_plugininfo.target = $$OUT_PWD/extern-plugininfo.h
|
||||
extern_plugininfo_dummy.target = extern-plugininfo.h
|
||||
extern_plugininfo.depends = FORCE
|
||||
extern_plugininfo.commands = nymea-generateplugininfo --filetype e --jsonfile $$PWD/$${TARGET}/deviceplugin"$$TARGET".json --output extern-plugininfo.h --builddir $$OUT_PWD
|
||||
extern_plugininfo_dummy.commands = $$extern_plugininfo.commands
|
||||
QMAKE_EXTRA_TARGETS += extern_plugininfo extern_plugininfo_dummy
|
||||
extern-plugininfo.depends = plugininfo
|
||||
QMAKE_EXTRA_TARGETS += plugininfo plugininfo_dummy extern-plugininfo extern-plugininfo_dummy
|
||||
|
||||
# Clean up autogenerated plugin info files
|
||||
plugininfo_clean.commands = rm -fv $$OUT_PWD/plugininfo.h $$OUT_PWD/extern-plugininfo.h
|
||||
|
|
|
|||
Loading…
Reference in New Issue