>D 40 SB=8192 res=0 cnt=0 tmp=0 pr=0 w=0 h=0 mot=0 bri=0 tstr="" fnam="" df=0 p:limit=0 limit1=0 t:timer=10 mailout=0 p:tt=10 p:ab=60 t:timerAB=60 bs=0 ;p:aa=1 ------------------ aa=1 a2=0 ab1=0 p:rl=0 init=1 led=1 wcr=0 st1="" >B st1="640*480" res=wc(0 8) ->wcstream 1 ->webserver 2 ->Webbutton1 Flashtest ; Ausschalten der Originalanzeige ;->wcstream 0 ->WcResolution 3 aa=0 ; Skript autostart init=1 ; Initialstart ;Bild kippen 0,1 ->WCFlip 1 ;Bild spiegeln 0,1 ->WCMirror 0 ;Kontrast 2 bis -2 ->WcContrast 2 ;Helligkeit 2 bis -2 ->WcBrightness -2 ;Sättigung 2 bis -2 ->WcSaturation 2 ;Bildgrösse 0 -13 einstellbar ;->WcResolution 8 ;geht bei 6FPS ;->WcResolution 9 ;geht bei 1FPS (mit a2 - Motionabschaltung) ;->WcResolution 10 ;geht bei 1FPS (mit a2 - Motionabschaltung + kein Stream) ;->WcResolution 13 ;geht bei 1FPS FRAMESIZE 1600x1200 (nur stream) ->LedPower1 0 ->power1 0 ; erzeuge Bildordner falls nicht vorhanden res=fo("/PICS" r) if res<0 then fmd("/PICS") endif >S ;============ Steuerungen ================== ; Nutzungseinstellung if chg[wcr]>0 then switch wcr case 1 ->WcResolution 3 ->sleep 250 aa=1 st1="240*176 Bild + Strom sparen" ->wcstream 0 case 2 ->WcResolution 3 ->sleep 0 aa=1 st1="240*176 Bild und Überwachung" ->wcstream 1 case 3 ->WcResolution 4 ->sleep 0 ->wcstream 0 a1=1 st1="240*240 Bild und Überwachung" ->wcstream 1 case 4 ->WcResolution 8 ->sleep 0 aa=1 st1="640*480 Bild und Überwachung" ->wcstream 1 case 5 ->WcResolution 9 ->sleep 0 aa=0 st1="800*600 Überwachung" ->wcstream 1 case 6 ->WcResolution 10 ->sleep 0 aa=0 ->wcstream 1 st1="1024*768 nur Stream" case 7 ->WcResolution 11 ->sleep 0 aa=0 ->wcstream 1 st1="1280*720 nur Stream" case 8 ->WcResolution 12 ->sleep 0 aa=0 ->wcstream 0 st1="1280*1024 nur Foto" case 9 ->WcResolution 13 ->sleep 0 aa=0 ->wcstream 0 st1="1600*1200 nur Foto" ends ; hole Bildgröße horizontal und vertikal in Pixeln w=wc(3) h=wc(4) endif if chg[aa]>0 or init>0 then if aa>0 then init=0 mot=wc(6 1000) else mot=wc(6 0) timerAB=0 timer=0 mot=0 bri=0 endif endif if aa>0 then ; hole Bewegungsdelta mot=wc(6 -1) ;hole Helligkeit bri=wc(6 -2) endif ;Bildänderungen als Auslöser if mot>limit1 and timer==0 and aa>0 then // Alarm, hole Bild ; flash LED an if led>0 then ->Power1 1 endif if rl>0 then ->LedPower1 1 endif delay(200) ; Bild speichern in RAM Buffer 1 res=wc(1 1) ; Datei öffnen, Name ist gleich Zeitstempel ; Dateiname darf aber keinen Doppelpunkt enhalten ; deshalb diese umständliche Zusammensetzung dp2.0 res=fo("/PICS/"+st(tstamp : 1)+"_"+s(mins)+"_"+s(secs)+".jpg" w) if res>=0 then // RAM Buffer speichern pr=fwp(1 res) fc(res) endif ; flash LED aus ->power1 0 ->LedPower1 0 timer=tt endif ; mache Einzelbild nach fester Timer-Einstellung if timerAB<1 and aa>0 then ; flash LED an if led>0 then ->Power1 1 endif if rl>0 then ->LedPower1 1 endif delay(200) ; Bild speichern in RAM Buffer 1 res=wc(1 1) ; Datei öffnen, Name ist gleich Zeitstempel ; Dateiname darf aber keinen Doppelpunkt enhalten ; deshalb diese umständliche Zusammensetzung dp2.0 res=fo("/PICS/"+st(tstamp : 1)+"_"+s(mins)+"_"+s(secs)+".jpg" w) if res>=0 then // RAM Buffer speichern pr=fwp(1 res) fc(res) endif ; flash LED aus ->power1 0 ->LedPower1 0 timerAB=ab1 endif >F ; lösche alle Bilder einzeln da.. ; frm() inaktiv im Release 12.0.2 if df>0 then aa=0 =#delfolder("PICS") df=0 endif ;Änderungen Bewegungsdifferenz bearbeiten ; svars ;quadratischer Slider if chg[limit]>0 then limit1=limit*limit+50 svar endif ;Änderungen Zyklusbilder bearbeiten if chg[ab]>0 then ab1=ab*ab+10 timerAB=ab1 svar endif >W ; zeige einige Werte im WEBUI Bewegungs-Differenz aktuell{m}%0mot% Differenzauslösung ab {m}%0timer% Sek Zyklusbild erfolgt in {m}%0timerAB% Sek

Helligkeit{m}%0bri% Bildweite in {m}%0w% Bildhöhe in {m}%0h% Status =>>%st1% download Bild-Daten bu(df "ok" "Bildordner leeren") bu(aa "Bildanalyse stoppen" "Bildanalyse starten") @Bewegungs-Differenz Limit ==>%0limit1% sl(0 100 limit "" "" "") @Wartezeit nach Auslösung ==>%0tt% Sek sl(10 60 tt "" "" "") @Zyklusbild Intervall ==>%0ab1% Sek sl(0 60 ab "" "" "") ck(rl "Rotlicht mit dem Foto") ck(led "Flash mit dem Foto") @pd(wcr "Auflösung [b*h]" 150 "240*176 0,5W" "240*176" "240*240" "640*480" "800*600" "1024*768" "1280*720" "1280*1024" "1600*1200") ;test==>%wcr% ;=================================== UP ======================= ; lösche den Ordner Inhalt und Automatikstopp #delfolder(tstr) mpa=0 pr=fo("/"+tstr r) for cnt 1 300 1 tmp=fr(fnam pr) if tmp>0 then fd("/"+tstr+"/"+fnam) else break endif next fc(pr)