Skip to content

Commit

Permalink
20240612
Browse files Browse the repository at this point in the history
- Add 1wire support if 33 pin is free
- Fix SLS Zigbee pinout
- Fix T-Internet-POE detection (pin 14)
- Update cz.json #75 Thanks @leroyloren 🏆
  • Loading branch information
xyzroe committed Jun 11, 2024
1 parent 0be6dc4 commit 9c95ec2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/const/hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ MistConfig mistConfigs[] = {
{.btnPin = 35, .btnPlr = 1, .uartSelPin = 33, .uartSelPlr = 1, .ledModePin = 12, .ledModePlr = 1, .ledPwrPin = 14, .ledPwrPlr = 1}, // 1
{.btnPin = 35, .btnPlr = 1, .uartSelPin = 4, .uartSelPlr = 1, .ledModePin = 12, .ledModePlr = 1, .ledPwrPin = 14, .ledPwrPlr = 1}, // 2
{.btnPin = 33, .btnPlr = 1, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, // 3 SLS-classic
{.btnPin = 14, .btnPlr = 1, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, // 4 TTGO
{.btnPin = 14, .btnPlr = 1, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, // 4 T-Internet-POE
};

// Board configurations
Expand All @@ -38,7 +38,7 @@ BrdConfigStruct brdConfigs[] = {
{"UZG-01", .ethConfigIndex = 2, .zbConfigIndex = 0, .mistConfigIndex = 1}, // 1
{"SLZB-06", .ethConfigIndex = 1, .zbConfigIndex = 1, .mistConfigIndex = 2}, // 2
{"WT32-ETH01", .ethConfigIndex = 1, .zbConfigIndex = 1, .mistConfigIndex = 0}, // 3
{"T-Internet-POE", .ethConfigIndex = 2, .zbConfigIndex = 0, .mistConfigIndex = 4}, // 4 DON'T MOVE
{"T-Internet-POE", .ethConfigIndex = 2, .zbConfigIndex = 0, .mistConfigIndex = 4}, // 4
{"Olimex-ESP32-POE", .ethConfigIndex = 0, .zbConfigIndex = 0, .mistConfigIndex = 0}, // 5
{"China-GW", .ethConfigIndex = 0, .zbConfigIndex = 2, .mistConfigIndex = 0}, // 6
{"TubesZB-eth", .ethConfigIndex = 1, .zbConfigIndex = 1, .mistConfigIndex = 0}, // 7
Expand Down
16 changes: 0 additions & 16 deletions src/etc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,22 +706,6 @@ ThisConfigStruct *findBrdConfig(int searchId = 0)

LOGI("Try brd: %d - %s", brdIdx, brdConfigs[brdIdx].board);

/*if (brdIdx == 4) // T-Internet-POE
{
pinMode(ethConfigs[ethIdx].pwrPin, OUTPUT);
delay(50);
digitalWrite(ethConfigs[ethIdx].pwrPin, LOW);
delay(50);
pinMode(ethConfigs[ethIdx].pwrPin, INPUT);
delay(50);
bool pwrPinState = digitalRead(ethConfigs[ethIdx].pwrPin);
if (pwrPinState)
{
LOGW("%s", "Looks like not T-Internet-POE!");
continue;
}
}*/

if (ethIdx == -1)
{
ethOk = true;
Expand Down
5 changes: 1 addition & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ void setup()
}

String cfg = makeJsonConfig(&networkCfg, &vpnCfg, &mqttCfg, &systemCfg);
LOGD("Config:\n%s", cfg.c_str());
LOGI("Config:\n%s", cfg.c_str());

cfg = makeJsonConfig(NULL, NULL, NULL, NULL, &vars);
LOGI("VARS:\n%s", cfg.c_str());
Expand Down Expand Up @@ -624,11 +624,8 @@ void setup()

setup1wire(check1wire());

//LOGI("1w = %f", get1wire());
LOGI("done");



}

WiFiClient client[10];
Expand Down

0 comments on commit 9c95ec2

Please sign in to comment.