Commit 5f41e8c1 authored by luz's avatar luz

EnOcean heating valve: removed "--valvesensors" command line option, and added...

EnOcean heating valve: removed "--valvesensors" command line option, and added a profile variant for the A5-20-01 profile instead to activate the valve's built-in sensor (default is still without sensor, for dS heating app compatibility). Improved sensor name string (decimal digits in range according to actual resolution, only name for binary inputs)
parent a35ef85d
......@@ -24,6 +24,8 @@
#include "device.hpp"
#include <math.h>
using namespace std;
namespace p44 {
......
This diff is collapsed.
......@@ -87,6 +87,10 @@ namespace p44 {
/// @note will be called from newDevice() when created device needs a teach-in response
virtual void sendTeachInResponse();
/// get table of profile variants
/// @return NULL or pointer to a list of profile variants
virtual const profileVariantEntry *profileVariantsTable();
};
......
......@@ -29,7 +29,6 @@ EnoceanDeviceContainer::EnoceanDeviceContainer(int aInstanceNumber, DeviceContai
learningMode(false),
selfTesting(false),
disableProximityCheck(false),
heatingValveSensorsEnabled(true),
enoceanComm(MainLoop::currentMainLoop())
{
}
......
......@@ -101,9 +101,6 @@ namespace p44 {
// the Enocean communication object
EnoceanComm enoceanComm;
// dS-specific flag that can be cleared to suppress including sensors on heating valves (A5-20-01)
bool heatingValveSensorsEnabled;
virtual const char *deviceClassIdentifier() const;
/// perform self test
......
......@@ -41,7 +41,6 @@
#define DEFAULT_USE_PROTOBUF_API 1 // 0: no, 1: yes
#define DEFAULT_USE_VALVE_SENSORS 0 // 0: no, 1: yes
#define DEFAULT_DALIPORT 2101
#define DEFAULT_ENOCEANPORT 2102
......@@ -249,7 +248,6 @@ public:
"Usage: %1$s [options]\n";
const CmdLineOptionDescriptor options[] = {
{ 0 , "protobufapi", true, "enabled;1=use Protobuf API, 0=use JSON RPC 2.0 API" },
{ 0 , "valvesensors", false, "enabled;1=heating valves may have sensors, 0: no sensors" },
{ 0 , "dsuid", true, "dsuid;set dsuid for this vDC host (usually UUIDv1 generated on the host)" },
{ 0 , "sgtin", true, "part,gcp,itemref,serial;set dSUID for this vDC as SGTIN" },
{ 0 , "productname", true, "name;set product name for this vdc host and its vdcs" },
......@@ -458,10 +456,6 @@ public:
if (enoceanname) {
EnoceanDeviceContainerPtr enoceanDeviceContainer = EnoceanDeviceContainerPtr(new EnoceanDeviceContainer(1, p44VdcHost.get(), 2)); // Tag 2 = EnOcean
enoceanDeviceContainer->enoceanComm.setConnectionSpecification(enoceanname, DEFAULT_ENOCEANPORT, enoceanresetpin);
// check visibility of heating valves' sensors
int valveSensors = DEFAULT_USE_VALVE_SENSORS;
getIntOption("valvesensors", protobufapi);
enoceanDeviceContainer->heatingValveSensorsEnabled = valveSensors;
// add
enoceanDeviceContainer->addClassToDeviceContainer();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment