Closed xoseperez closed 6 years ago
Yes, but right now the configuration is shared by all the relays, i.e. if your set it to normally off 1 second pulse, all of them would do 1 second pulses when turned on.
Original comment by Matheus Telles (Bitbucket: matheustelles, GitHub: matheustelles):
Suggestion: Set which relays on the same board are configured for pulse. So one 4ch board can be hybrid for pulse and switch.
Removing milestone: 1.5.0 (automated comment)
Do you have the chance to connect a serial monitor to the board to get some info from it? I hope I will receive the sample board soon to test it myself.
Original comment by Zerosub (Bitbucket: Zerosub, GitHub: Zerosub):
Thank you for the quick reply. I already had those settings exactly like you suggested.
Unfortunately, the board closes the relais upon powercycle. That means it does this before the software kicks in. That's really bad, as after a power loss, the garage door will open up without interaction.
I remember that it has been this way with the original firmware from ITEAD, too.
I'll have to find another way to manage this.
When the device boots up it will either leave the relay open, close it or read the previous status from EEPROM, depending on the relay boot mode setting. For your setup my configuration would be:
Original comment by Zerosub (Bitbucket: Zerosub, GitHub: Zerosub):
Hi Xose, your Version 1.5 compiled well and i could flash the device smoothly. My intention was, to use it as a garagedoor opener.
The bad thing about this: when the device boots up, it switches the relay, so the door opens and shuts randomly. Is this a hardware issue or something that could be fixed by firmware?
Thnx for yout excellent work on these Itead devices!
Please note that the ITEAD_1CH_INCHING hardware is flagged untested. Will soon receive a sample from Itead to confirm behaviour.
The 1ch-inching-debug environment has been fixed and the inching branch released with version 1.5.0.
Original comment by Zerosub (Bitbucket: Zerosub, GitHub: Zerosub):
i'm getting there:
git clone https://bitbucket.org/xoseperez/espurna
cd espurna/code
git fetch && git checkout inching
pio run -e node-debug
pio run -e 1ch-inching-debug
But while compiling, i get the following error:
#!Compiling .pioenvs/1ch-inching-debug/FrameworkArduino/FS.o
In file included from espurna/config/all.h:3:0,
from /home/arne/espurna/code/espurna/espurna.ino:22:
/home/arne/espurna/code/espurna/relay.ino: In function 'void relayPulseMode(unsigned int, bool)':
espurna/config/general.h:23:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator!='
#define RELAY_PULSE_NONE 0
^
/home/arne/espurna/code/espurna/relay.ino:122:51: note: in expansion of macro 'RELAY_PULSE_NONE'
digitalWrite(LED_PULSE, relayPulseMode != RELAY_PULSE_NONE);
^
/home/arne/espurna/code/espurna/relay.ino: In function 'void relaySetup()':
/home/arne/espurna/code/espurna/relay.ino:316:55: error: 'RELAY1_PIN_INVERSE' was not declared in this scope
_relays.push_back((relay_t) { RELAY1_PIN, RELAY1_PIN_INVERSE });
^
*** [.pioenvs/1ch-inching-debug/src/espurna.ino.o] Error 1
now i'm stuck. What am i missing?
Hi. The behaviour you describe is planned to add on the next release. Right now it's waiting for final tests in branch "inching". You can checkout that branch and test it yourself. The only difference from what you request is that the interval is configurable but in seconds, so the minimum value is 1 second.
Originally reported by: Nuno Sousa (Bitbucket: nunofgs, GitHub: nunofgs)
Hello, I am planning on using a relay to open/close a garage door.
I have a relay connected to an esp8266 but I need to toggle the relay for about 500ms (should be configurable ideally). I believe ESPEasy supports this and refers to it as a "pulse".
Any chance this could be added to espurna?