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
Momentary mode #46
Comments
Can you give some more information about how it behaves is some situations.
In all this is a completely different use case for the shutter and I have to think about if there is a smart way to integrate this. |
This is the console log with some commands sent
If you mean what it should do in that situations for my case then, since I have 2 momentary buttons:
|
Ahh understand. You still have two relay one for open one for closing. But instead of keeping the relay on you need a pulse at start and one at stop. Ok that makes it a bit easier. Let me check. |
Yes exactly |
Hi Bigi, please check if the newest firmware fulfills your needs. At the end, it was really easy to implement. Just one IF. To change the behavior from the normal shutter to the momentary shutter you must define a pulsetimer on BOTH relays that you want to use. Now the relay switches shortly on (PULSETIME) and then waits for the position, after the position is reached the same relay get an additional ON to stop everything. If pulsetime is 0 it behaves normally with on off Give it a try. Nice weekend. Please let me know if we need someidle time calculation. Currently the Firmware assume the motor will stop at the start of the pulse. Maybe we have to change this to get the correct position |
Hi @stefanbode thank you very much for the great work. I don't need idle time calculation, and since the motor automatically stops when the shutter is fully open or closed, for shutteropen and shutterclose commands only the first pulse it would be enough. |
I think that the first time I need to send command shutter open first, the shutterposition command works correctly. to see the current position I have to use shutterposition command with no arguments right? have you ever consider to add a shutterstop command? |
Regarding your first error: This might be an initialization issue. Could happen if the digital position does not match physical position. If you manually move the shutter everything is out of sync because there is no way currently to recognize this movement. SHUTTERSTOP should already be working. Please give it a try. Command without additional parameter |
ok, i already tried the two option to get the shutter position, but i found that SHUTTER from teleperiod is not always in sync with the response of shutterposition command. Is it possible? About moving the shutter manually, i've connected my wall buttons to GPIO0 and GPIO9 as indicated in the Tasmota wiki https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-Dual-and-Dual-R2 I'll try shutterstop asap thanks ;) |
Ok, this makes sense with the buttons and should be possible to update. SHUTTERPOSITION and SHUTTER should report nearly the same value. At least if it is not moving anymore. I was expecting that you want to update the position with external switches. This is nearly impossible. but with switches connected to the ESP... |
SHUTTERSTOP command already takes in consideration that in momentary mode there is a second pulse? Because otherwise after sending that command the second pulse moves again the shutter |
Upps. That the reason, why testing is so important. Let me take a look and fix it... |
I tested it and for me the SHUTTERSTOP during movement only creates ONE pulse
|
For the NON-momentary switches, my build is working with the up and down switches. With the momentary switches, I have the problem, that I could not differentiate if the relays are still ON because of the defined pulsetime, or if the relay is again ON because you hit the switch. It does not make sense to go to the switch as an input. This needs additional research. Currently you can start the shutter in the desired direction if it is in STOP mode, but you cannot stop it until it reaches the final position (fully open/close) |
Ok, shutterstop works correctly. Now since I use home assistant I'm trying to integrate the shutter on it.
all commands works but using the position slider the shutter stops not in the correct position. |
Hi Bigi, new update to support switches 1 & 2 to control the relays manually. Without the momentary switches, this was easy, but the momentary switches are really a pain. A lot of new code required and quite much debug code currently. Please give it a try and give feedback. If something doeas not work please provide log files in debug mode. Regarding your 50% 70% problem. I assume like you this is because of the holes that needs to be closed, too. This is operating time for the motors. There is no easy fix, because all homeautomation systems only support 0-100 for shutters. I have no idea, how to overcome the issue currently. -10 or anything else will probably not work because most variables are unsinged. |
From the home assistant definition I would make it simpler to avoid the Backlog translation in the firmware. This is not required.
|
thank you very much Stefan, i'll try all as soon as i go back home. |
I flashed the latest version and using wall switches the position is updated, but not correctly. |
Your switches must be pulse switches. you work with momentary motors. therefore two switches ON is not a good starting point. This might cause the issue. I uses the TOGGLE button for the relay on the web interface for testing and this works reliably. Also check, that the paired interlock is ON and PULETIME on both relays is e.g. 5. It does not work with 1 for sure. I tested it with 5 and it might work with 3 |
Please see the updated WIKI section for shutters |
uhm if I set 18 Button 2 on GPIO0 and 19 Button3 on GPIO9 my wall switches don't work, but yes using the web interface works |
ok then we have to define the switchmode. this is TASMOTA standard functionality and described there in the wiki. It depends if your shutter switches are push buttons, are ON/OFF switches then, if the Relay should toogle or follow or inverse follow. You have to define this. The ONLY limitation for my shutters is NEVER both switches ON. On my shutter in the kitchen this position is physically blocked. both OFF work but not both on. You have to switch one off before. |
If your switched where PUSHBUTTONS like the TOGGLE in the webinterface this would be the easiest |
well... my switches are pushbuttons like this https://www.gewiss.com/content/dam/gwdam/product/GW/40/00/15/25/GW40001525/_jcr_content/renditions/original.svg |
I found that 18 button2 on GPIO9 works for down, but nothing works on GPIO0 for up.... I don't know why |
I found one "bug". If you have switch1 ON and then just switch over without any delay to switch2 on it does also not work on my side. it works, if you switch OFF first and then the other ON. Can you test, if you have the same problem |
I can't do it on wall switch, if I release up button then it's off |
Ok, i wonder why you have GPIO9 but anyway. OK this is not the error. Do you get any log in the console if you hit the GPIO0 button. Please put logfile here or call me on skype stefan.bode |
sorry, I had to leave. I just configured my sonoff dual r2 like this https://github.com/arendst/arendst.github.io/raw/master/media/dualr2d.jpg but now I have 18 button2 on GPIO9 and 19 button 3 in GPIO0 log using the the webgui
from the wall buttons no logs if I push up, while this if I push down
|
Shuttersetclose is not shutterclose. It was only introduced to calibrate the close position. Therefore it is not a big deal if it behaves wrong only once. Normally you do not send this command after installing. |
yes I know, but in some situations I lose position synchronization, so I reset the shutter... |
Can you post me from the shutter above the configuration settings reported in the log on the beginning. It moves correctly to position 16050. but maybe this position is wrong. There is a clear stop at this position and also the reported position after this in 10%. So from the log file no errors. Does the shutter still moves after the second power off. |
this? now it's half opened. Yes after the second power off the shutter still moves to 100% |
Hmm, this is Strange. The software try to switch off, but the motor does not follow. Maybe you can increase the pulsetime a bit. In the software I cannot change anything because this is doing the right thing. |
Ok, I just tried with pulsetime 3 instead of 2 and it worked well. I will test it more these days |
That’s great. Maybe the Relais needs some more time under special conditions. Good to know it worked now. Will change the suggested pulsetime in the wiki. |
Hi! i'm using setoption80 1, setoption81 1, setoption14 1. 01:21:09 MQT: stat/dual_cucina/RESULT = {"POWER1":"ON"} |
There was an issue with the stop in an older version. It should not happen in the current one. Can you please confirm using the latest version.
This should not happen. The position must be the actual one automatically filled in by the programm. Instead of 0 I expect something like 21 in your case. |
Version 6.1.1.13 |
ok, and I assume you send the shutterstop without additional parameter like: shutterstop1 0. can you increase the loglevel. maybe we get some more insight. |
no additional parameter. I copied the contents to C:\idearduino242\portable\sketchbook and renamed the lib folder to libraries. I edited and sent it to dual r2. 8266 version 2.4.2 |
2018-09-07 15:30:58 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True, False, or integer (0-100): {"POWER2":"ON"} |
This is a homeassistant problem, because ON OFF ist standard Tasmota |
this is what happens when in home assistant send the command: if I send cmnd /dual_cucina/shutterstop command from mqtt.fx when the shutter is stopped. however the shutter closes up to position 0. it is therefore not only a problem of home assistant |
Do you have momentary shutters that only need a pulse to start and stop or does your shutter need full time the power during operation. I assume second. Please set loglevel to 6 and send me again a logfile |
I'm sorry, but I do not know what you're talking about. I do not know how to manage the logs |
syslog 4 from console: when press stop 15:36:58 MQT: stat/dual_cucina/RESULT = {"POWER2":"ON"} |
this is to late. If there is a shutterstop 0 then it will for sure go to the end. Question is: why is there a shutterstop 0. please also do a SHUTTERRELAY1 to get info about the configuration of the shutter. thx |
ok i got it . i was able to reproduce |
16:38:53 CMD: SHUTTERRELAY1 |
Ok, hopefully, this is the only bug here. I uploaded a new version and are not able to reproduce it anymore. sorry for the inconvenience. |
Thanks!!!!!!!! |
This issue is known an really hard to solve because the basic firmware switches on the relay before I get notice. The only thing I can do is to switch it off again. |
Can I propose an alternative? I do not know if it's possible. You could not stop it. In this way, if you want to stop the shutter, press the button of the same direction of travel, but if you press the opposite button, the shutter simply reverses the direction. |
With the latest change I checked in yesterday my assumption is, if you toggle on the web interface the close button the shutter should stop from opening and start closing. I made some changes to the interlock mode to ensure some false positives that switches off relays. Please send a log file to help me understand what happens why. |
commands from the web interface. same result with the commands from physical buttons ========= open button + open button============= 16:31:58 RSL: RESULT = {"POWER1":"ON"} //pressed opening button ========= open button + stop button============= 16:30:20 RSL: RESULT = {"POWER1":"ON"} //pressed opening button |
hi @madmicio the bug should now be finally fixed and the shutter will work as you requested. there is no millisecond ON again. I followed and the intended behavior, that the shutter in this case just moves in the opposite direction. quite a lot of testing because supporting 3 different configurations. As you can see in the middle the switch is now correct and the shutter changes direction. Looks easier than it was.
|
HI! thank you very mach. sorry, it works perfectly. it was my mistake! |
Hi Stefan,
In my case I have momentary buttons, one opens and one closes the shutter. If I press the open button the shutter opens totally, If I want to open 50% I push open button and then push again when the shutter is 50% open to stop it. So I set pulsetime1 and pulsetime2 to 5, shutteropenduration 24 and shuttercloseduration 21, when I send shutterposition 50 command, relay 1 goes on and off correctly, but nothing else happens and the shutter opens totally.
Is it possible to make it work as needed for me?
The text was updated successfully, but these errors were encountered: