mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 17:29:50 +03:00
map RFM200/T1RF to connect/extension
This commit is contained in:
@@ -24,6 +24,28 @@ REGISTER_FACTORY(Connect, EMSdevice::DeviceType::CONNECT);
|
||||
|
||||
Connect::Connect(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand)
|
||||
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
||||
if (device_id == 0x50) { // RF Base
|
||||
register_telegram_type(0xD1, "RFOutdoorTemp", false, MAKE_PF_CB(process_OutdoorTemp));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||
&outdoorTemp_,
|
||||
DeviceValueType::SHORT,
|
||||
DeviceValueNumOp::DV_NUMOP_DIV10,
|
||||
FL_(outdoorTemp),
|
||||
DeviceValueUOM::DEGREES);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* OutdoorTemp - type 0xD1 - external temperature
|
||||
*/
|
||||
void Connect::process_OutdoorTemp(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, outdoorTemp_, 0);
|
||||
}
|
||||
|
||||
} // namespace emsesp
|
||||
/* other values from 0x50 RF base
|
||||
(0x087F), data: 00 00
|
||||
(0x0880), data: 01 04
|
||||
(0x0889), data: 00 80 80 01
|
||||
*/
|
||||
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
@@ -26,6 +26,10 @@ namespace emsesp {
|
||||
class Connect : public EMSdevice {
|
||||
public:
|
||||
Connect(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand);
|
||||
|
||||
private:
|
||||
void process_OutdoorTemp(std::shared_ptr<const Telegram> telegram);
|
||||
int16_t outdoorTemp_;
|
||||
};
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
@@ -24,6 +24,11 @@ REGISTER_FACTORY(Extension, EMSdevice::DeviceType::EXTENSION);
|
||||
|
||||
Extension::Extension(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand)
|
||||
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
||||
if (device_id == 0x16) {
|
||||
// no entities for T1RF outdoor sensor, values are comming from RFbase 0x50 (connect)
|
||||
return;
|
||||
}
|
||||
// Extension module EM100 device_id 0x12
|
||||
register_telegram_type(0x935, "EM100SetMessage", true, MAKE_PF_CB(process_EM100SetMessage));
|
||||
register_telegram_type(0x936, "EM100OutMessage", false, MAKE_PF_CB(process_EM100OutMessage));
|
||||
register_telegram_type(0x937, "EM100TempMessage", false, MAKE_PF_CB(process_EM100TempMessage));
|
||||
|
||||
Reference in New Issue
Block a user