Local server on Rpi Zero W
Blynk Server - server-0.36.5-java8
Apps are all upto date ios and android
esp core 2.4.1
code sync physical button examples from blynk sketch builder (4 CHANNEL RELAY CONNECTED) all the below mentioned appliances are connected to the same relay unit and nodemcu
This setup is running from past many months
From past 3 days i am noticing a strange behavior that is the switched on appliance(FAN) will turn off automatically with out anyone touching the app or the physical button ! And this is not at regular intervals or at fixed period or time [it just turned off as i am writing this post ]. It just turns off its self and remains off until we manually turn it back on via Blynk app or Physical switch.
The best part is while turning off automatically it syncs with the app (shows that the switch as been turned off), so there is not question that the device as rebooted due to some issue because i can see that device online from 2.25AM OCT 15… So to make sure i turned on another appliance (Plugged in a mosquito repellent) but this never turned off like the FAN did… Even if the fan get turned off the repellent stays On.
As i have shared access with my parents i thought they might be messing up with me(FOR FUNN) !! So i turned off the shared access on the Blynk app. But still the strange behavior exists !!
If there was a defect in the relay unit that should update on the app
If there was a power issue then it should show (online since _just after reboot(time and date))
Even if someone was messing around with shared access i turned it off as well as
generated a new QR code.
I have not programmed any time based turn on\off for this particular nodemcu.
I am not able to think anything other possible issues other than this.
Changing the module is not a problem for me. But i want to know the real cause for this.
1)Should i change the auth token or something like that ?
2)Should i reset the blynk server(local) ?
3)I have port forwarded by local server is that causing any issues (may be some hacker just
hacked in ?? )
4) Is pi zero w not able to support the traffic from nodemcu ? (sounds silly i guess) previously i had pi3 with no problem but it got destroyed due to its hardware…
Can someone think of anything and tell me what is happening ??
I think I’d start by adding a Terminal or Table widget and writing an event to it whenever the physical or app button is pressed (different messages for the different triggers) . This might give you some idea what is triggering the fan to turn off.
I’d also check the wiring, and look for loose connections around the NodeMCU pins or the switch connections. If you’re using a breadboard then that’s most probably the culprit.
As its only the fan that is acting this way then it’s possible that noise from the fan is causing an issue. I had a similar issue when I built a door entry system where a relay was used to apply 12v to an AC gate release mechanism. The noise from the mechanism was messing-up the MCU and had to put a capacitor across the relay switched contacts to suppress the noise spikes that are generated by the gate release.
If you do this then ensure that the capacitor is suitably rated and is designed for use as a noise suppressor across mains voltages (they need to be X Rated, and no, that doesn’t have anything to do with adult movies ). Something like this is what I’d use:
If none of that helps then post your code (correctly formatted of course) as you may have made a silly error when changing from 1 switch/relay to 4.
Yes, I got this idea before itself !! But before doing any changes to the code i wanted a second opinion from you guys ! Because, what if the problem goes away after changing the code(modify)… Then i cannot make out what was causing the problem…
NO !!! Everything is soldered and relay and switches are connected with JST connectors !!
If this is the case then the whole nodemcu needs to get effected and the remaining relays also needs to act weird !
But i have a good power supply for the nodemcu and there are smoothing capacitors for the nodemcu…And also i have opto-couplers driving the relays and relay board itself has on-board opto-coupler(so there is double isolation). So the noise must not reach the nodemcu pins if i am not wrong…