Weis nicht ob ich hier richtig bin.
Möchte bei einem ReadingsProxi das Reading zusätzlich als Alt_Reading anzeigen lassen (immer das vorherige Reading)
Zitatdefine JA_2_1 readingsProxy JA2:position01
attr JA_2_1 userattr ASC_Adv:on,off ASC_Antifreeze:off,soft,hard,am,pm ASC_Antifreeze_Pos:5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100 ASC_AutoAstroModeEvening:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeEveningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_AutoAstroModeMorning:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeMorningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_BlockingTime_afterManual ASC_BlockingTime_beforeDayOpen ASC_BlockingTime_beforeNightClose ASC_BrightnessSensor ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_ComfortOpen_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_CommandTemplate ASC_Down:time,astro,brightness,roommate ASC_DriveUpMaxDuration ASC_Drive_Delay ASC_Drive_DelayStart ASC_ExternalTrigger ASC_GuestRoom:on,off ASC_LockOut:soft,hard,off ASC_LockOut_Cmd:inhibit,blocked,protection ASC_Mode_Down:absent,always,off,home ASC_Mode_Up:absent,always,off,home ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Partymode:on,off ASC_Pos_Reading ASC_PrivacyDownValue_beforeNightClose ASC_PrivacyDown_Pos ASC_PrivacyUpValue_beforeDayOpen ASC_PrivacyUp_Pos ASC_RainProtection:on,off ASC_Roommate_Device ASC_Roommate_Reading ASC_Self_Defense_AbsentDelay ASC_Self_Defense_Mode:absent,gone,off ASC_Shading_BetweenTheTime ASC_Shading_InOutAzimuth ASC_Shading_MinMax_Elevation ASC_Shading_Min_OutsideTemperature ASC_Shading_Mode:absent,always,off,home ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Shading_StateChange_SunnyCloudy ASC_Shading_WaitingPeriod ASC_Shutter_IdleDetection ASC_ShuttersPlace:window,terrace,awning,EG_window ASC_SlatPosCmd_SlatDevice ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_TempSensor ASC_Time_Down_Early ASC_Time_Down_Late ASC_Time_Up_Early ASC_Time_Up_Late ASC_Time_Up_WE_Holiday ASC_Up:time,astro,brightness,roommate ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Ventilate_Window_Open:on,off ASC_WiggleValue ASC_WindParameters ASC_WindProtection:on,off ASC_WindowRec ASC_WindowRec_PosAfterDayClosed:open,lastManual ASC_WindowRec_subType:twostate,threestate
attr JA_2_1 ASC 1
attr JA_2_1 ASC_Antifreeze off
attr JA_2_1 ASC_AutoAstroModeEvening HORIZON
attr JA_2_1 ASC_AutoAstroModeEveningHorizon -2
attr JA_2_1 ASC_AutoAstroModeMorning HORIZON
attr JA_2_1 ASC_AutoAstroModeMorningHorizon -4
attr JA_2_1 ASC_Closed_Pos 100
attr JA_2_1 ASC_Down astro
attr JA_2_1 ASC_Drive_Delay 10
attr JA_2_1 ASC_Drive_DelayStart 15
attr JA_2_1 ASC_Mode_Down off
attr JA_2_1 ASC_Mode_Up off
attr JA_2_1 ASC_Partymode off
attr JA_2_1 ASC_Pos_Reading position
attr JA_2_1 ASC_RainProtection off
attr JA_2_1 ASC_Shading_Mode off
attr JA_2_1 ASC_Time_Down_Early 17:00
attr JA_2_1 ASC_Time_Down_Late 22:00
attr JA_2_1 ASC_Time_Up_Early 05:00
attr JA_2_1 ASC_Time_Up_Late 08:00
attr JA_2_1 ASC_Time_Up_WE_Holiday 05:45
attr JA_2_1 ASC_Up astro
attr JA_2_1 ASC_WindProtection off
attr JA_2_1 alias Store_KücheL
attr JA_2_1 cmdIcon opens:fts_shutter_up stop:fts_shutter_shadding_stop closes:fts_shutter_down
attr JA_2_1 devStateIcon 0:fts_shutter_10 100:fts_shutter_100
attr JA_2_1 event-on-change-reading position, state
attr JA_2_1 icon fts_shutter
attr JA_2_1 room ASC,Storen
attr JA_2_1 setFn {$CMD eq "position" ? "$CMD $ARGS -1 1" : "$CMD 1"}
attr JA_2_1 setList opens:noArg stop:noArg closes:noArg position:slider,0,1,100
attr JA_2_1 userReadings position { ReadingsVal("JA2","position01",0);;;;;;;; }, lastposition { ReadingsVal("JA2","position01",0);;;;;;;; }
attr JA_2_1 valueFn ""
attr JA_2_1 webCmd opens:stop:closes:position
# DEF JA2:position01
# DEVICE JA2
# FUUID 6816fff9-f33f-d169-a137-dc31ca6d5ff9c209
# NAME JA_2_1
# NOTIFYDEV JA2,global
# NR 472
# NTFY_ORDER 50-JA_2_1
# READING position01
# STATE 0
# TYPE readingsProxy
# eventCount 5380
# CONTENT:
# JA2 1
# READINGS:
# 2025-05-04 11:29:48 ASC_Enable on
# 2025-08-19 09:53:49 ASC_ShadingMessage <html> INFO: shading was deactivated in the device </html>
# 2025-11-09 09:03:42 ASC_ShuttersLastDrive manual
# 2025-11-09 07:02:35 ASC_Time_DriveDown 09.11.2025 - 17:09
# 2025-11-09 07:02:35 ASC_Time_DriveUp 10.11.2025 - 07:04
# 2025-10-31 19:32:20 associatedWith ASC
# 2025-11-08 13:49:07 lastCmd position
# 2025-11-09 09:03:42 lastposition 0
# 2025-05-04 08:35:19 pct 1
# 2025-11-09 09:03:42 position 0
# 2025-11-09 09:03:41 state 0
#
setstate JA_2_1 0
setstate JA_2_1 2025-05-22 22:18:53 .ASC_AttrUpdateChanges_v1.0.1 1
setstate JA_2_1 2025-05-04 11:29:48 ASC_Enable on
setstate JA_2_1 2025-08-19 09:53:49 ASC_ShadingMessage <html> INFO: shading was deactivated in the device </html>
setstate JA_2_1 2025-11-09 09:03:42 ASC_ShuttersLastDrive manual
setstate JA_2_1 2025-11-09 07:02:35 ASC_Time_DriveDown 09.11.2025 - 17:09
setstate JA_2_1 2025-11-09 07:02:35 ASC_Time_DriveUp 10.11.2025 - 07:04
setstate JA_2_1 2025-10-31 19:32:20 associatedWith ASC
setstate JA_2_1 2025-11-08 13:49:07 lastCmd position
setstate JA_2_1 2025-11-09 09:03:42 lastposition 0
setstate JA_2_1 2025-05-04 08:35:19 pct 1
setstate JA_2_1 2025-11-09 09:03:42 position 0
setstate JA_2_1 2025-11-09 09:03:41 state 0
Besser nur das wesentliche:
Zitatdefine JA_2_1 readingsProxy JA2:position01
attr JA_2_1 event-on-change-reading position, state
attr JA_2_1 setFn {$CMD eq "position" ? "$CMD $ARGS -1 1" : "$CMD 1"}
attr JA_2_1 setList opens:noArg stop:noArg closes:noArg position:slider,0,1,100
attr JA_2_1 userReadings position { ReadingsVal("JA2","position01",0);;;;;;;; }, lastposition { ReadingsVal("JA2","position01",0);;;;;;;; }
attr JA_2_1 valueFn ""
attr JA_2_1 webCmd opens:stop:closes:position
# DEF JA2:position01
# DEVICE JA2
# FUUID 6816fff9-f33f-d169-a137-dc31ca6d5ff9c209
# NAME JA_2_1
# NOTIFYDEV JA2,global
# NR 472
# NTFY_ORDER 50-JA_2_1
# READING position01
# STATE 0
# TYPE readingsProxy
# eventCount 5380
# CONTENT:
# JA2 1
# READINGS:
# 2025-05-04 11:29:48 ASC_Enable on
# 2025-08-19 09:53:49 ASC_ShadingMessage <html> INFO: shading was deactivated in the device </html>
# 2025-11-09 09:03:42 ASC_ShuttersLastDrive manual
# 2025-11-09 07:02:35 ASC_Time_DriveDown 09.11.2025 - 17:09
# 2025-11-09 07:02:35 ASC_Time_DriveUp 10.11.2025 - 07:04
# 2025-10-31 19:32:20 associatedWith ASC
# 2025-11-08 13:49:07 lastCmd position
# 2025-11-09 09:03:42 lastposition 0
# 2025-05-04 08:35:19 pct 1
# 2025-11-09 09:03:42 position 0
# 2025-11-09 09:03:41 state 0
#
setstate JA_2_1 0
setstate JA_2_1 2025-05-22 22:18:53 .ASC_AttrUpdateChanges_v1.0.1 1
setstate JA_2_1 2025-05-04 11:29:48 ASC_Enable on
setstate JA_2_1 2025-08-19 09:53:49 ASC_ShadingMessage <html> INFO: shading was deactivated in the device </html>
setstate JA_2_1 2025-11-09 09:03:42 ASC_ShuttersLastDrive manual
setstate JA_2_1 2025-11-09 07:02:35 ASC_Time_DriveDown 09.11.2025 - 17:09
setstate JA_2_1 2025-11-09 07:02:35 ASC_Time_DriveUp 10.11.2025 - 07:04
setstate JA_2_1 2025-10-31 19:32:20 associatedWith ASC
setstate JA_2_1 2025-11-08 13:49:07 lastCmd position
setstate JA_2_1 2025-11-09 09:03:42 lastposition 0
setstate JA_2_1 2025-05-04 08:35:19 pct 1
setstate JA_2_1 2025-11-09 09:03:42 position 0
setstate JA_2_1 2025-11-09 09:03:41 state 0
Das Reading wäre: position
Und das zusätzliche: lastposition
Brauche das für ein Doif (Wenn lastposition = 100 muss bei der nächsten Fahrt die anglePos im Device auf 0, sonst geht die Jalosie wieder 1.5Sec hoch)