Code Monkey home page Code Monkey logo

Comments (10)

localhost61 avatar localhost61 commented on August 14, 2024

Regarding the versioning, as Tasmota is already in 6.1.1b and your fork is based on 6.0.1a, you should begin with 6.0.1i and it won't be confusing as it will never exist on Tasmota.
(your BME libraries or now outdated, for instance)

from sonoff-shutter.

lobocobra avatar lobocobra commented on August 14, 2024

Thanks for the feedback.
The reason why it is less reactive, is because the interlock ensures, that never 2 relay are on on the same time. I did this because my shutter would go to programming mode, if up/down is on on the same time.
=> If you use the dual at the end, I would recommend you then to disable the CH4 interlock mode. In the next version this is done with setoption81.

Regarding versioning you are right and I will do it as proposed by you. I will move to the latest arendst build once I have eliminated all bugs.

from sonoff-shutter.

localhost61 avatar localhost61 commented on August 14, 2024

Could you point me on your releasenote? I can't find it, the release.md is the tasmota's one.

[Edit]:
OK, I found the commands in the driver code, especially:
ShutterMaxDSec
ShutterPosDSec
ShutterGoPercent

from sonoff-shutter.

localhost61 avatar localhost61 commented on August 14, 2024

If you don't commit #2 , I won't be able to test. ^^
That said it was already working, but I still need to calibrate. I used to have Pulsetime1 & 2 set to 120. Then I have setup ShutterMaxDSec1 200 and other values to default. But ShutterPosDSec1 and ShutterGoPercent1 don't really behave as attended. I need to make more tests to figure why.

from sonoff-shutter.

localhost61 avatar localhost61 commented on August 14, 2024

I've compiled and uploaded 6.1.1j.
Config was retained, so I just had to set Setoption80 1 & Setoption81 1.
Now I need to setup a working MQTT to go ahead.

from sonoff-shutter.

localhost61 avatar localhost61 commented on August 14, 2024

It seems your fork changes the Pulsetime values !!? Because they are now equal to 110 (11s) when I set them to 120 (20s).
Can you confirm that when I use ON/OFF button 1/2 on the webserver main page, the corresponding relay should be ON during Pulsetime1/2. And if the roller already was half way, and Pulsetime equals to max duration, then ShutterPosDSec should overflow to ShutterMaxDSec or reset to 0.

01:26:42 CMD: Shutterposdsec
01:26:42 RSL: RESULT = {"ShutterPosDSec":50}
// here I tap on button Down
01:33:54 RSL: RESULT = {"POWER1":"ON"}
01:33:54 RSL: POWER1 = ON
// Roller is down, I tap again
01:33:59 RSL: RESULT = {"POWER1":"OFF"}
01:33:59 RSL: POWER1 = OFF
// I check that position is reset
01:34:28 CMD: shutterposdsec
01:34:28 RSL: RESULT = {"ShutterPosDSec":0}
// here I tap on button Up and let it stop alone
01:36:03 RSL: RESULT = {"POWER2":"ON"}
01:36:03 RSL: POWER2 = ON
01:36:14 RSL: RESULT = {"POWER2":"OFF"}
01:36:14 RSL: POWER2 = OFF
// I wonder why the roller stopped half way
01:36:38 CMD: shutterposdsec
01:36:38 RSL: RESULT = {"ShutterPosDSec":109}         // <- correct
01:37:27 CMD: pulsetime1
01:37:27 RSL: RESULT = {"PulseTime1":"110 (Active 0)"}     // <- why isn't it 120 anymore?
01:37:45 CMD: pulsetime2
01:37:45 RSL: RESULT = {"PulseTime2":"110 (Active 0)"}     // <- why isn't it 120 anymore?
01:39:06 CMD: shuttermaxdsec
01:39:06 RSL: RESULT = {"ShutterMaxDSec":200}    //  <- correct
// Then I set pulsetime again 
01:39:25 CMD: pulsetime1 120
01:39:25 RSL: RESULT = {"PulseTime1":"120 (Active 0)"}
01:39:39 CMD: pulsetime2 120
01:39:39 RSL: RESULT = {"PulseTime2":"120 (Active 0)"}
// here I tap on button Up again and let it stop alone  in order to reach the Top
01:39:56 RSL: RESULT = {"POWER2":"ON"}
01:39:56 RSL: POWER2 = ON
01:40:05 RSL: RESULT = {"POWER2":"OFF"}
01:40:05 RSL: POWER2 = OFF
// Then I tap on button Down and let it stop alone  in order to reach the Bottom
01:40:08 RSL: RESULT = {"POWER1":"ON"}
01:40:08 RSL: POWER1 = ON
01:40:28 RSL: RESULT = {"POWER1":"OFF"}
01:40:28 RSL: POWER1 = OFF
01:40:50 CMD: pulsetime
01:40:50 RSL: RESULT = {"PulseTime1":"110 (Active 0)"}
01:42:27 CMD: pulsetime2
01:42:27 RSL: RESULT = {"PulseTime2":"120 (Active 0)"}
01:42:47 CMD: pulsetime1
01:42:47 RSL: RESULT = {"PulseTime1":"110 (Active 0)"}
// The roller is Down but Pulsetime1 has changed to about half (110=11s)
  • Then if I tap on button UP again, the roller will reach the Top but Pulsetime2 will have changed to 110 too.
  • Following actions on buttons won't change Pulsetime values, once they equals 110 and relays will stick according to these new values.

from sonoff-shutter.

localhost61 avatar localhost61 commented on August 14, 2024

Looking at sonoff.ino, I see in the code that it's not a bug but a feature. I don't understand why you did it... and every DeciSec!

//lobocobra start
if (Settings.flag3.split_interlock) {
Settings.pulse_timer[i] = round((float)Settings.shutterPosMaxDeciSec[i*2 >2]/2/10+100); //set usefull pulsetimer at 50% shutter down, in case someone push the button
pulse_timer[i] = 0; // set count-up counter to 0
}
//lobocobra end

from sonoff-shutter.

lobocobra avatar lobocobra commented on August 14, 2024

Ahh... I tell you why....
The code uses currently pulsetimer to go to a certain percentage e.g. 50%.
=> So imagine your wife stands up and lowers the shutter manually with the button to approx 46%.
=> Now your homematic rule starts at 12PM and brings it down to 50%, because the sun in shining

In this scenario the pulsetimer would be set by the code to 4% more down, which in reallity means 2 seconds of movement. After that the Pulsetime remains at 2 sec.
=> Now your wife comes and pushes the button up, and it will stop each 2 seconds and she will complain, that again the system ist not working.

So you see... if there is a bug then its one within women :), respectively until I move away from using pulsetime, I let the system reset the pulsetimer when it stopped. Like this you can push the button, switch or web button and the shutter will move as expected and not stop, just because the previous pulsetime was at x seconds.
=> Why I choosed pulsetime in a first place is because after an outage you will never have a permanent on (which would burn my motor).
=> The real solution is either to eliminate usage of pulsetimer OR to watch which source requested the button press and set the pulsetimer accordingly. I tend to eliminate pulsetimer. What is your view?

Quickfix for you is probably to reset pulsetime at 100% and not at 50%, by my shutter are old and I reset pulsetime at 50% of Max, to avoid they burn
Settings.pulse_timer[i] = round((float)Settings.shutterPosMaxDeciSec[i*2 >2]/10+100);

from sonoff-shutter.

lobocobra avatar lobocobra commented on August 14, 2024

To answer your first question. The logic works (currently) as follows.

  • all 1/10th sec the code controls if the shutter is about to run outside MIN/MAX, if yes it stops it. So from where ever the start impulse comes, the shutter does not run above or below MAX/MIN.
  • The request for ON/OFF can come from any source as the code checks when the relay is ON/OFF.
  • ShutterPercentGo works differently, looks at the current position and set the pulsetime accordingly and opens then the respectiv relay. The beauty of pulsetime is that it not only sets the time to run, but shows also the elapsed time, this I need for my calculation.

The reason why I used this construct is because my shutters have a start delay and do not stop at their limits. In consequence I only update the position after the motor is stopped. Because only when it is stopped I really know how long the relay was ON and thus how much time the motor was ON to move the shutter.
=> But the code is meanwhile so advanced, that I could eliminate pulsetime if there is any added value.

from sonoff-shutter.

lobocobra avatar lobocobra commented on August 14, 2024

I assume this issue as done and that the mod is working on a dual.
=> if not please send me some feedback. I will close this issue in a few days.

from sonoff-shutter.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.