ON/OFF/ON State
General
No replies yet. Be the first to reply.
Join the discussion.
General
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: ON/OFF/ON State
by irina WIZnet ·
Hi Stratos.
The following informations will help you.
Please update firmware and demo web pages both.
github.com/Wiznet/WIZ550web/releases/tag/v1.1.1
Thanks.
RE: ON/OFF/ON State
by stragr ·
Eric,
Thank you for your reply, but the first link has nothing to do for what i asked for. I tried many times to change the web page , to add code, so when i use the “ON” button, the button doesn’t stay in ON state but after xx seconds to close again. This is what i can not get.
For example i am trying to make an automation to open the outdoor of the house. I need to modify the code so the button goes again in “off” state after “xx” seconds. I tried with “loop” … but with no result.
Any idea anyone??
Stratos
RE: ON/OFF/ON State
by irina WIZnet ·
Hi, Stratos.
I’m sorry for incorrect answer to you.
I guess, you can implement your function using ‘setTimeout’ method.
This code (pseudocode) seems to be operable. Adding and try it.
RE: ON/OFF/ON State
by stragr ·
Eric, something is wrong with all the function.
I tried as you said and sometimes it works and sometimes it stays to “ON” state and while you push the button again it returns to “on” state passing from “ON” to “OFF” AND AUTOMATICALLY AGAIN TO “ON”.
Anyway i will check again line by line, but the code is not correct or the module is not responds correct.
Thank you
Stratos
RE: ON/OFF/ON State
by irina WIZnet ·
Did you tried using the updated firmware?
To resolve your problem, I think you need debugging more. Please try to module debugging using ‘#define HTTPSERVER_DEBUG’ define in ‘httpServer.h’ file. Using web browser developer tool (press the [F12] button in your web browser) is a good way to debugging.
RE: ON/OFF/ON State
by bachus ·
Hello everybody,
Is this issue still open or has anybody found a solution?
I have just started to implement a similiar JS-function for automation to set all digital outputs at once.
The function is working correctly if I insert an output (alert()
between every step/setting (dout.doPost(‘pin=’+p+‘&val=’+v);).
If the alert(); is removed the digital output states are not changed. Even the setTimeout() does not help.
Does anybody has an idea to find a solution?
Help appreciated.
Bachus
RE: ON/OFF/ON State
by bachus ·
I guess I found a solution.
The assumption is the non-blocking asynchronuous behavoir of javascipt and its function setTimeout as root-cause.
I used an own function for a real delay/sleep, blocking/waiting for subsequent processing of a loop.
20 ms delay seems to be okay for reliable processing. Using 10 ms, not every setting was really done in a non-secure channel without acknowledgement.
I’ve used 40 ms and I’m now writing/setting more than 600000 access cycles during the last days.
I guess/hope the delay time may be shorten, if data writing into flash is avoided.
I noticed that using another scripting like Python I have to use at least 100 ms delay time.
This topic is closed for me now, because I found a solution, which is working for me.
Bachus