Skip to content
lobocobra edited this page Nov 23, 2019 · 16 revisions

Welcome to the sonoff-shutter wiki!

  • I first developed the idea in order to measure how much oil I have in the tank of my house. This MOD is up and running and now 2years running.*
  • This year I had then the idea to also controll shutter by SONOFF and created the SPLIT function and later below SHUTTER mod.
  • The newest project is now, to have a mod to measure how much water my sprinkler is using. What is new, is that I want to merge the 3 use cases into 1 code. The code is ready and already productive. See the respective RELAY branch.

!!! How to remove shutter function from arendst build Unfortunately there is now a not so performant version copy my code in the arendst firmware. => If you need full control over your shutter, just delete xdrv_27_shutter.ino. Respectively take it from here. I will keep the shutter function here up to date and it is compatible with Node-Red sun position (which is not the case for the code in the arendst firmware).

Shutter supported commands: 6.1.1k lobocobra added sutter & split functionalliy /driver Shutter adaptation of lobocobra you can use following commands // enter DeciSec = Sec10

  • shutterMinDSec1/2 (min position to move to)
  • shutterMaxDSec1/2 (max position to move to)
  • shutterPosDSec1/2 (current position in Dsec)
  • shutterGoPercent1/2 (1-100%, current or move to)
  • shutStartDelayDSec1/2 (time your motor needs to do a movement)
  • shutLagUpwardsDSec1/2 (additional time your motor needs to go upwards)
  • ShutStdPulseTDsec1/2 (standard pulsetime to be set afer any movements, but can not be higher than shutterMaxDsec)
  • Setoption 80 enable Shutter function
  • Setoption 81 enable Interlock Split (if set interlock will be activated on next push)

=> This code is fully working but is currently integrated into the RELAY branch.

RELAY supported commands: This is the overworked function, that can be used more generally. I use it for my sprinkler, to measure how much water I use. The SHUTTER and HEATING function will be integrated bit by bit into this new code.

  • Configuration
  • relayDelayDsec1-4 (integer: delay between relay activation and DSEC are counted, e.g. water sprinkler needs 95 DSEC before the water comes out)
  • relayDsecFactor1-4 (float: multiplicator of Dsec, e.g. how many liter water are used per Dsec)
  • relayUnit (string: max 8 long, e.g. m3 or Ltr/h
  • relayUnitDivisor1-4(integer: unit divisor, e.g. factor 1000 for 1 m3 of water)
  • relayCostFactor1-4 (float, price of 1 unit, e.g. for 1m3 water)
  • relaycurrency1 (string: max 6 long, name of the currency, eg Dollar or "$")
  • Show status / set value
  • relayOnDsec1-4 (status of how many seconds the relay 1-4 was on)
  • relayStarts1-4 (how many times the relay was turned on)
  • Commands
  • relayConsumption (calculate/show how many units were used so far and how much they cost, apply delay corrections)
  • relayReset (reset the operational variables but not the configuration, set DSEC,starts at 0)

Heating control supported commands

  • POWERhigh seconds are counted once powerhigh is passed
  • POWERlow seconds continue to be counted till we go below this limit
  • BRENNERttl without paramater it gives you how many SEC your devices worked without correction!, keep it in sync with when you last time manually updated oil tank !!! if not in sync your calculation how much is left, is wrong !!! if you look at MQTT value sent, then it is corrected with delaystart
  • BRENNERcycle without paramater it gives you how many cycles you had, keep it in sync with when you last time manually updated oil tank
  • BRENNERoelstand with paramaeter -1: report oil level, how it was at brennerttl 0 and cycle 0 !!! BUT THE VOLUME AT 15° corrected, as you pay at this temperature with a paramater >0 : corrects the starting oli level when BrennerSec was at 0 and cycles was at 0 // NEVER change this value to current oil level, whithout resetting cycles and ttlsec
  •                         without parameter: calculate oil level
    
  • BRENNERoeltemp inline the code calculates the vaolume at 15° if the reported temp is between >=10° -<=40°
  • BRENNERoelverb1H enter how much oil your device is using in 1h in continous burning mode, TEMP of oil is not respected as it burns always at same temp
  • BRENNERoelmaxcapacity not used, will in future give the info how many % is used
  • BRENNERoelmincapacity not used, will in future shut down the device, when the oiltank is empty to prevent issues with dirty oil
  • BrennerCorrCycleSec after each cycle is done, reduce from BRENNERttl, in my case the device starts up 11sec before burning starts (0 - 600)
  • BRENNERoelprice100l price of 100l oil to have price per cent
  • BRENNERPowerPrice1kwh price of 1KW power to have price per cent
  • BRENNERfalseAlertSec insruct code to ignore any cycle with less than this number of sec, can improve highly quality of poor POW measurement. If you know that a cycle is at least 30sec, put it to 30
    • BRENNERreset reset all variables to 0 ! yesterday and today are then gone
  •                         -999 to reset all
    
  •                         -1 to reset only history
    

=> This code is fully working but will be integrated into the RELAY branch.

BRANCH handling MASTER represents always the original ARENDST firmware the code is based from. If it is behind, then this version is the base for the mods. Each mod has its own branch. So depending what MOD you want you need to select the branch. => Default is currently SHUTTER as it is the most asked one. This will change in the future.

Clone this wiki locally