Skip to content

Commit

Permalink
Version 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arjenhiemstra committed Feb 17, 2023
1 parent 271617b commit 54dc9a9
Show file tree
Hide file tree
Showing 141 changed files with 3,982 additions and 829 deletions.
16 changes: 8 additions & 8 deletions compiled_firmware_files/firmware.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_1/nrgitho-hw1-v2.2.4.bin"
},
"2": {
"latest_fw": "2.4.3",
"link": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_2/nrgitho-hw2-v2.4.3.bin",
"latest_beta_fw": "2.4.4-beta7",
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_2/nrgitho-hw2-v2.4.4-beta7.bin"
"latest_fw": "2.5.0",
"link": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_2/nrgitho-hw2-v2.5.0.bin",
"latest_beta_fw": "2.5.0",
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_2/nrgitho-hw2-v2.5.0.bin"
},
"NON-CVE 1": {
"latest_fw": "2.4.3",
"link": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/non-cve_rev_1/nrgitho-noncve-v2.4.3.bin",
"latest_beta_fw": "2.4.4-beta7",
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/non-cve_rev_1/nrgitho-noncve-v2.4.4-beta7.bin"
"latest_fw": "2.5.0",
"link": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/non-cve_rev_1/nrgitho-noncve-v2.5.0.bin",
"latest_beta_fw": "2.5.0",
"link_beta": "https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/non-cve_rev_1/nrgitho-noncve-v2.5.0.bin"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
else :
hwrev = '-dev'
HW_BIN_DIR = 'dev' + DIR_SEPERATOR

def export_version():
outfile = open(PROJECT_SRC_DIR + DIR_SEPERATOR + "version.h","w", encoding='utf-8')
outfile.write("#pragma once\n\n#define FWVERSION \"" + fwversion + "\"\n")
Expand Down Expand Up @@ -190,19 +190,16 @@ def update_releaseinfo():
with open(PROJECT_COMPILED_DIR + "firmware.json", "w", encoding='utf-8') as outfile:
outfile.write(json_object)

def build_before(*args, **kwargs):
print('\n### running pre build commands...\n')
def build_prep(*args, **kwargs):
print('\n### running build preparation commands...\n')
export_version()
build_webUI(*args, **kwargs)

build_webUI(*args, **kwargs)

def build_after(*args, **kwargs):
print('\n### running post build commands...\n')
copy_firmware()
update_releaseinfo()


env.Execute(build_before)
env.Execute(build_prep)

env.AddPostAction("buildprog", build_after)

2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/components/esp_littlefs
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
source:
type: idf
version: 4.4.3
manifest_hash: d85ced33bd8a257cf70ad259b8749c19288aa1dc23b01bf6e99a8e6b13026066
manifest_hash: 4d22b6a22071ea4deeb09cbbacccb81f0d8618d89f416ad83af1d11440c7b0dc
target: esp32
version: 1.0.0
12 changes: 6 additions & 6 deletions software/NRG_itho_wifi/main/IthoSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>

#include "IthoPacket.h"
#include "IthoRemote.h"
#include "SystemConfig.h"
#include "cc1101/IthoPacket.h"
#include "config/IthoRemote.h"
#include "config/SystemConfig.h"
#include "sys_log.h"
#include "notifyClients.h"
#include "i2c_esp32.h"
#include "task_mqtt.h"
#include "tasks/task_mqtt.h"
#include "IthoQueue.h"
#include "enum.h"
#include "task_syscontrol.h"
#include "tasks/task_syscontrol.h"

// globals
extern volatile uint16_t ithoCurrentVal;
Expand Down Expand Up @@ -143,7 +143,7 @@ int quick_pow10(int n);
std::string i2cbuf2string(const uint8_t *data, size_t len);
bool check_i2c_reply(const uint8_t *buf, size_t buflen, const uint16_t opcode);
int cast_to_signed_int(int val, int length);
int64_t cast_raw_bytes_to_int(int32_t* valptr, int length, bool is_signed);
int64_t cast_raw_bytes_to_int(int32_t *valptr, int length, bool is_signed);
uint32_t get_divider_from_datatype(int8_t datatype);
uint8_t get_length_from_datatype(int8_t datatype);
bool get_signed_from_datatype(int8_t datatype);
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
Author: Klusjesman, supersjimmie, modified and reworked by arjenhiemstra
*/

#include "IthoCC1101.h"
#include "IthoPacket.h"
#include "cc1101/IthoCC1101.h"
#include "cc1101/IthoPacket.h"
#include <string>
#include <Arduino.h>
#include <SPI.h>

//#define CRC_FILTER
// #define CRC_FILTER

////original sync byte pattern
//#define STARTBYTE 6 //relevant data starts 6 bytes after the sync pattern bytes 170/171
//#define SYNC1 170
//#define SYNC0 171
//#define MDMCFG2 0x02 //16bit sync word / 16bit specific
// #define STARTBYTE 6 //relevant data starts 6 bytes after the sync pattern bytes 170/171
// #define SYNC1 170
// #define SYNC0 171
// #define MDMCFG2 0x02 //16bit sync word / 16bit specific

// alternative sync byte pattern (filter much more non-itho messages out. Maybe too strict? Testing needed.
#define STARTBYTE 0 // relevant data starts 0 bytes after the sync pattern bytes 179/42/171/42
Expand All @@ -23,16 +23,16 @@
#define MDMCFG2 0x03 // 32bit sync word / 30bit specific

// alternative sync byte pattern
//#define STARTBYTE 2 //relevant data starts 2 bytes after the sync pattern bytes 179/42
//#define SYNC1 179
//#define SYNC0 42
//#define MDMCFG2 0x02 //16bit sync word / 16bit specific
// #define STARTBYTE 2 //relevant data starts 2 bytes after the sync pattern bytes 179/42
// #define SYNC1 179
// #define SYNC0 42
// #define MDMCFG2 0x02 //16bit sync word / 16bit specific

// alternative sync byte pattern
//#define STARTBYTE 1 //relevant data starts 1 byte after the sync pattern bytes 89/149/85/149
//#define SYNC1 93 //byte11 = 89, byte13 = 85 with SYNC1 = 94, 89 and 85 differ only by 1 bit and line up with the start bit
//#define SYNC0 149
//#define MDMCFG2 0x03 //32bit sync word / 30bit specific
// #define STARTBYTE 1 //relevant data starts 1 byte after the sync pattern bytes 89/149/85/149
// #define SYNC1 93 //byte11 = 89, byte13 = 85 with SYNC1 = 94, 89 and 85 differ only by 1 bit and line up with the start bit
// #define SYNC0 149
// #define MDMCFG2 0x03 //32bit sync word / 30bit specific

// default constructor
IthoCC1101::IthoCC1101(uint8_t counter, uint8_t sendTries) : CC1101()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>

#include "CC1101.h"
#include "IthoPacket.h"
#include "cc1101/IthoPacket.h"

#define MAX_NUM_OF_REMOTES 10

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Config.h"
#include "config/Config.h"

template <typename TRef>
bool saveConfigFile(const char *location, const char *filename, size_t size, const char *config_type, TRef &ref)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@
#include "freertos/task.h"
#include "esp_task_wdt.h"

#include "IthoRemote.h"
#include "config/IthoRemote.h"
#include "globals.h"
#include "sys_log.h"

#ifdef ESPRESSIF32_3_5_0
#include <LITTLEFS.h>
#else
#include "LittleFS.h"
#endif


bool loadWifiConfig(const char *location);
bool saveWifiConfig(const char *location);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "IthoRemote.h"
#include "config/IthoRemote.h"

// #include <string>
// #include <Arduino.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <ArduinoJson.h>
#include <Ticker.h>

#include "IthoPacket.h"
#include "cc1101/IthoPacket.h"
#include "sys_log.h"
#include "System.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <Arduino.h>
#include "globals.h"

#include "LogConfig.h"
#include "config/LogConfig.h"

LogConfig logConfig;

Expand All @@ -14,6 +14,7 @@ LogConfig::LogConfig()

loglevel = 5; // 5=NOTICE
syslog_active = 0;
esplog_active = 0;
strlcpy(logserver, "192.168.0.2", sizeof(logserver));
logport = 514;
strlcpy(logref, "nrgitho", sizeof(logref));
Expand All @@ -37,6 +38,11 @@ bool LogConfig::set(JsonObjectConst obj)
updated = true;
loglevel = obj["loglevel"];
}
if (!obj["esplog_active"].isNull())
{
updated = true;
esplog_active = obj["esplog_active"];
}
if (!obj["syslog_active"].isNull())
{
updated = true;
Expand Down Expand Up @@ -64,6 +70,7 @@ void LogConfig::get(JsonObject obj) const
{
obj["loglevel"] = loglevel;
obj["syslog_active"] = syslog_active;
obj["esplog_active"] = esplog_active;
obj["logserver"] = logserver;
obj["logport"] = logport;
obj["logref"] = logref;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class LogConfig
public:
uint8_t loglevel;
uint8_t syslog_active;
uint8_t esplog_active;
char logserver[64];
uint16_t logport;
char logref[64];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "SystemConfig.h"
#include "config/SystemConfig.h"

SystemConfig systemConfig;

Expand Down Expand Up @@ -43,17 +43,17 @@ SystemConfig::SystemConfig()
itho_timer2 = 20;
itho_timer3 = 30;
itho_numvrem = 1;
itho_updatefreq = 10;
itho_updatefreq = 60;
itho_sendjoin = 0;
itho_pwm2i2c = 1;
itho_31da = 1;
itho_31d9 = 1;
itho_31da = 0;
itho_31d9 = 0;
itho_2401 = 1;
itho_forcemedium = 0;
itho_vremoteapi = 0;
itho_rf_support = 0;
i2cmenu = 0;
i2c_safe_guard = 0;
i2c_safe_guard = 2;
i2c_sniffer = 0;
rfInitOK = false;
nonQ_cmd_clearsQ = 1;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <Arduino.h>
#include "globals.h"

#include "WifiConfig.h"
#include "config/WifiConfig.h"

WifiConfig wifiConfig;

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion software/NRG_itho_wifi/main/esp32_repartition.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <string>

#include "sys_log.h"
#include "Config.h"
#include "config/Config.h"

#include "freertos/FreeRTOS.h"
#include "esp_ota_ops.h"
Expand Down
8 changes: 2 additions & 6 deletions software/NRG_itho_wifi/main/generic_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,15 @@
#include <string>

#include "IthoQueue.h"
#include "SystemConfig.h"
#include "WifiConfig.h"
#include "config/SystemConfig.h"
#include "config/WifiConfig.h"
#include "globals.h"
#include "sys_log.h"
#include "notifyClients.h"
#include "IthoSystem.h"
#include "enum.h"

#ifdef ESPRESSIF32_3_5_0
#include <LITTLEFS.h>
#else
#include "LittleFS.h"
#endif

// globals

Expand Down
21 changes: 8 additions & 13 deletions software/NRG_itho_wifi/main/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
#include "version.h"
#include "sdkconfig.h"

#ifdef ESPRESSIF32_3_5_0
#define ACTIVE_FS LITTLEFS
#else
#define ACTIVE_FS LittleFS
#endif

#define STACK_SIZE_SMALL 2048
#define STACK_SIZE 4096
Expand All @@ -21,19 +17,19 @@

#define LOGGING_INTERVAL 21600000 // Log system status at regular intervals
#define ENABLE_FAILSAVE_BOOT
//#define ENABLE_SERIAL
// #define ENABLE_SERIAL

#include "task_mqtt.h"
#include "task_web.h"
#include "task_init.h"
#include "task_cc1101.h"
#include "tasks/task_mqtt.h"
#include "tasks/task_web.h"
#include "tasks/task_init.h"
#include "tasks/task_cc1101.h"

#include "esp_wifi.h"
#include "WiFiClient.h"

#include "IthoCC1101.h" // Largly based on and thanks to https://github.com/supersjimmie/IthoEcoFanRFT
#include "IthoPacket.h" // Largly based on and thanks to https://github.com/supersjimmie/IthoEcoFanRFT
#include "IthoRemote.h"
#include "cc1101/IthoCC1101.h" // Largly based on and thanks to https://github.com/supersjimmie/IthoEcoFanRFT
#include "cc1101/IthoPacket.h" // Largly based on and thanks to https://github.com/supersjimmie/IthoEcoFanRFT
#include "config/IthoRemote.h"

extern const char *WiFiAPPSK;

Expand All @@ -55,4 +51,3 @@ extern WiFiClient client;

extern IthoCC1101 rf;
extern IthoPacket packet;

Loading

0 comments on commit 54dc9a9

Please sign in to comment.