From 54192afe56964f41403e1db6a98444db5eadb94c Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Mon, 8 Jul 2024 09:40:09 +0300 Subject: [PATCH] hormann_ecostar add manually support and custom button --- .../main/subghz/helpers/subghz_custom_event.h | 1 + .../main/subghz/scenes/subghz_scene_set_type.c | 11 +++++++++++ lib/subghz/protocols/keeloq.c | 2 ++ 3 files changed, 14 insertions(+) diff --git a/applications/main/subghz/helpers/subghz_custom_event.h b/applications/main/subghz/helpers/subghz_custom_event.h index ec68bcf80..c84bed3fc 100644 --- a/applications/main/subghz/helpers/subghz_custom_event.h +++ b/applications/main/subghz/helpers/subghz_custom_event.h @@ -96,6 +96,7 @@ typedef enum { SetTypeNormstahl_433_92, SetTypeJCM_433_92, SetTypeNovoferm_433_92, + SetTypeHormannEcoStar_433_92, SetTypeFAACRCXT_433_92, SetTypeFAACRCXT_868, SetTypeGeniusBravo433, diff --git a/applications/main/subghz/scenes/subghz_scene_set_type.c b/applications/main/subghz/scenes/subghz_scene_set_type.c index 5bf2d1976..324cc48f0 100644 --- a/applications/main/subghz/scenes/subghz_scene_set_type.c +++ b/applications/main/subghz/scenes/subghz_scene_set_type.c @@ -43,6 +43,7 @@ static const char* submenu_names[SetTypeMAX] = { [SetTypeNormstahl_433_92] = "KL: Normstahl 433MHz", [SetTypeJCM_433_92] = "KL: JCM Tech 433MHz", [SetTypeNovoferm_433_92] = "KL: Novoferm 433MHz", + [SetTypeHormannEcoStar_433_92] = "KL: Hor. EcoStar 433MHz", [SetTypeFAACRCXT_433_92] = "KL: FAAC RC,XT 433MHz", [SetTypeFAACRCXT_868] = "KL: FAAC RC,XT 868MHz", [SetTypeGeniusBravo433] = "KL: Genius Bravo 433MHz", @@ -648,6 +649,16 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) { .keeloq.cnt = 0x03, .keeloq.manuf = "Novoferm"}; break; + case SetTypeHormannEcoStar_433_92: + gen_info = (GenInfo){ + .type = GenKeeloq, + .mod = "AM650", + .freq = 433920000, + .keeloq.serial = (key & 0x000FFFFF) | 0x02200000, + .keeloq.btn = 0x04, + .keeloq.cnt = 0x03, + .keeloq.manuf = "EcoStar"}; + break; case SetTypeFAACRCXT_433_92: gen_info = (GenInfo){ .type = GenKeeloq, diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index 7a497cc09..ca9f7a64f 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -434,6 +434,8 @@ static bool klq_last_custom_btn = 0x9; } else if((strcmp(instance->manufacture_name, "NICE_Smilo") == 0)) { klq_last_custom_btn = 0xB; + } else if((strcmp(instance->manufacture_name, "EcoStar") == 0)) { + klq_last_custom_btn = 0x6; } btn = subghz_protocol_keeloq_get_btn_code(klq_last_custom_btn);