Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Board need resetting every two days #3

Open
AR-Tawil opened this issue Aug 20, 2020 · 10 comments
Open

Board need resetting every two days #3

AR-Tawil opened this issue Aug 20, 2020 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@AR-Tawil
Copy link

Hi Achim, I'm using your motion sensor code and it works perfectly. However, I noticed that the board needs resetting every two days or it will go into a No Responsive state?!!!

Thank you for your help
AR Tawil

IMG_8899

@AchimPieters
Copy link
Owner

@AR-Tawil

This can be, due to some optimisations bij Maxim. Try to download the latest esp-homekit repro here and compile it again. let me know if it worked out.

@AchimPieters AchimPieters self-assigned this Aug 20, 2020
@AchimPieters AchimPieters added the bug Something isn't working label Aug 20, 2020
@AchimPieters
Copy link
Owner

@AR-Tawil

btw. I saw that you have 7 different blinds repro's. I curious how you solved some coding issues and hardware issues.
I really would like to have a peek at you code en know how you connected eg stepper etc.
If you want we can do a private chat?

best regards, Achim

@AR-Tawil
Copy link
Author

Hi Achim, I have updated the code to the latest esp-homekit repro, recompiled and updated my boards. I'm still having the same issue where the boarded requires resetting after ~2 days. As I mentioned in my previous message the code works perfectly until the reset is required. It seems to me that it depends on the number of sensor activations until a reset becomes needed?!! Thank you for your help.

@AR-Tawil
Copy link
Author

AR-Tawil commented Aug 26, 2020

@AR-Tawil

btw. I saw that you have 7 different blinds repro's. I curious how you solved some coding issues and hardware issues.
I really would like to have a peek at you code en know how you connected eg stepper etc.
If you want we can do a private chat?

best regards, Achim

Hi Achim, I'm learning and it's still a hit or miss exercise for me. Please find below the adapted stepper code I use for my blinds:

#include <stdbool.h>
//#include <Arduino.h>
//#include <micros.h>

// ESP-12F(WeMos D1 mini)
#define IN1 5 //(GPIO5)
#define IN2 4 //(GPIO4)
#define IN3 0 //(GPIO0)
#define IN4 14 //(GPIO2)

const int NBSTEPS = 4095;
const int STEPTIME = 900;
int Step = 0;
bool Clockwise = true;

int arrayDefault[4] = {0, 0, 0, 0};
void stepper();
void setDirection();
void test(int outArray[4]);

int stepsMatrix[8][4] = {
{0, 0, 0, 1},
{0, 0, 1, 1},
{0, 0, 1, 0},
{0, 1, 1, 0},
{0, 1, 0, 0},
{1, 1, 0, 0},
{1, 0, 0, 0},
{1, 0, 0, 1}
};

bool set_gpio() {
gpio_enable(IN1, GPIO_OUTPUT);
gpio_enable(IN2, GPIO_OUTPUT);
gpio_enable(IN3, GPIO_OUTPUT);
gpio_enable(IN4, GPIO_OUTPUT);

return true;
}

void writeStep(int outArray[4]) {
test(outArray);
gpio_write(IN1, outArray[0]);
gpio_write(IN2, outArray[1]);
gpio_write(IN3, outArray[2]);
gpio_write(IN4, outArray[3]);
}

void setDirection() {
(Clockwise == true) ? (Step++) : (Step--);

if (Step > 7) {
Step = 0;
} else if (Step < 0) {
Step = 7;
}
}

void step() {

if ((Step >= 0) && (Step < 8)) {
writeStep(stepsMatrix[Step]);
} else {
writeStep(arrayDefault);
}
setDirection();
}

void sleep(){
writeStep(arrayDefault);
}

void reverse(){
Clockwise = !Clockwise;
}

bool clockwise(){
return Clockwise;
}

@AchimPieters
Copy link
Owner

@AR-Tawil I saw that you already contacted Maxim maximkulkin/esp-homekit-demo#376 and he noticed that you having trouble with your DHCP, is this issue solved? maybe you can have a look here: https://github.com/maximkulkin/esp-homekit/issues if they having the same problems as you?

@AR-Tawil
Copy link
Author

Hi Achim, I have updated the code to the latest esp-homekit repro, recompiled and updated my boards. I'm still having the same issue where the boarded requires resetting after ~2 days. As I mentioned in my previous message the code works perfectly until the reset is required. It seems to me that it depends on the number of sensor activations until a reset becomes needed?!! Thank you for your help.

Hi Achim, I think DHCP is working better now.
Do have any ideas or suggestions to fix the motion sensor board resetting issue?
Thank you for your continuous support :)

@AchimPieters
Copy link
Owner

@AR-Tawil do you have a log report to see what's happing when it resets?

@AR-Tawil
Copy link
Author

AR-Tawil commented Aug 27, 2020

@AchimPieters Is there a way to get log reports without using a direct USB connection to the device?

@AchimPieters
Copy link
Owner

yes off course! open your terminal and type:

nc -kulnw0 45678

@AchimPieters
Copy link
Owner

@AR-Tawil did you managed to fix your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants