Closed peissl-at closed 4 years ago
Hallo,
Fragen zu node-red-contrib-sun-position sind eigentlich hier besser aufgehoben.
Aber sei es drum.
Du hast die topic (ist die Eigenschaft msg.topic
des Nachrichtenobjektes) auf "window gesetzt und den Payload (ist die Eigenschaft msg.payload
) auf true
oder false
:
In der Rolladen Node nutzt du aber zur Abfrage den Wert der Nachrichteneigenschaft msg.window
:
Das passt so leider nicht zusammen.
Entweder du setzt die msg.window
Eigenschaft (z.B. mit einer change Node) auf den gewünschten Wert:
Oder (was ich empfehlen würde) du nutzt in der Rollladensteuerungs-node die topic:
Das muss man wie folgt einstellen:
Hier dein Beispiel entsprechend korrigiert:
[{"id":"7e1a3138.c6e4c","type":"blind-control","z":"30ae06ce.b9380a","name":"","topic":"","positionConfig":"f4e23321.47893","outputs":"1","autoTrigger":false,"autoTriggerTime":3600000,"storeName":"","blindIncrement":0.01,"blindOpenPos":1,"blindClosedPos":0,"blindPosReverse":false,"blindPosDefault":"open (max)","blindPosDefaultType":"levelFixed","overwriteExpire":"","rules":[{"index":0,"name":"","isValid":true,"valid":{"validTimeReg":true,"validLevel":true,"validOperand1A":true,"validOperand1B":true},"timeValue":"","timeType":"none","timeOp":0,"timeOpText":"↥ until","offsetValue":"","offsetType":"none","multiplier":60000,"timeDays":"*","timeMonths":"*","timeOnlyEvenDays":false,"timeOnlyOddDays":false,"timeMinValue":"","timeMinType":"none","offsetMinValue":"","offsetMinType":"none","multiplierMin":60000,"timeMaxValue":"","timeMaxType":"none","offsetMaxValue":"","offsetMaxType":"none","multiplierMax":60000,"levelValue":"66%","levelType":"levelFixed","levelOp":1,"levelOpText":"⭳❗ minimum (oversteer)","validOperandAValue":"window","validOperandAType":"PlT","validOperator":"true","validOperatorText":"is true","validOperandBValue":"","validOperandBType":"num","valid2LogOperator":0,"valid2LogOperatorText":"N/A","valid2OperandAValue":"","valid2OperandAType":"msg","valid2Operator":"true","valid2OperatorText":"is true","valid2OperandBValue":"","valid2OperandBType":"num","description":"<div><i class=\"fa fa-code-fork\" aria-hidden=\"true\"></i> <var>msg.payload if topic contains \"window\"</var> is true</div><div>⭳❗ minimum (oversteer) <var>66%</var></div>"}],"sunControlMode":"0","sunFloorLength":"","sunMinAltitude":"","sunMinDelta":"","blindPosMin":"closed (min)","blindPosMinType":"levelFixed","blindPosMax":"open (max)","blindPosMaxType":"levelFixed","smoothTime":"","windowTop":"","windowBottom":"","windowAzimuthStart":"","windowAzimuthEnd":"","oversteerValue":"","oversteerValueType":"none","oversteerCompare":"gte","oversteerThreshold":"","oversteerThresholdType":"num","oversteerBlindPos":"open (max)","oversteerBlindPosType":"levelFixed","oversteer2Value":"","oversteer2ValueType":"none","oversteer2Compare":"gte","oversteer2Threshold":"","oversteer2ThresholdType":"num","oversteer2BlindPos":"open (max)","oversteer2BlindPosType":"levelFixed","oversteer3Value":"","oversteer3ValueType":"none","oversteer3Compare":"gte","oversteer3Threshold":"","oversteer3ThresholdType":"num","oversteer3BlindPos":"open (max)","oversteer3BlindPosType":"levelFixed","x":480,"y":2480,"wires":[["1f434edf.69a3e1"]]},{"id":"400ec4e9.e6232c","type":"inject","z":"30ae06ce.b9380a","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":265,"y":2480,"wires":[["7e1a3138.c6e4c"]]},{"id":"b57da717.1d1e08","type":"inject","z":"30ae06ce.b9380a","name":"","topic":"window","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":275,"y":2555,"wires":[["7e1a3138.c6e4c"]]},{"id":"c57aa260.4dfb7","type":"inject","z":"30ae06ce.b9380a","name":"","topic":"window","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":275,"y":2605,"wires":[["7e1a3138.c6e4c"]]},{"id":"1f434edf.69a3e1","type":"debug","z":"30ae06ce.b9380a","name":"Test","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":680,"y":2480,"wires":[]},{"id":"f4e23321.47893","type":"position-config","z":"","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"2"}]
Gruß
Hallo Hypnos3,
vielen lieben Dank für deine Mühe und die rasche und kompetente Antwort!
Sonnige Grüße aus der Steiermark! Robert
Da das Problem behoben ist, schließe ich das issue hier mal.
Hallöchen,
ich möchte meine Rollladensteuerung überarbeiten. Die Rollladensteuerung aus der node-red-contrib-sun-position scheint dafür ideal zu sein. Doch irgendwie scheitere ich schon an einer Banalität.
Da es sich um ein Schwingfenster (Velux) handelt, möchte ich bei geöffnetem Fenster den zulässigen Fahrweg einschränken. Mir gelingt es aber nicht den Öffnungsstatus an die Regel weiterzugeben. Ich erhalte immer:
"Warnung: kann den Wert von msg.window nicht ermitteln, verwende "undefined"!"
Vielleicht hat einer einen Tipp für mich?
Vielen lieben Dank und sonnige Grüße! Robert
[{"id":"a4969444.e41de8","type":"blind-control","z":"3104539f.4cf13c","name":"","topic":"","positionConfig":"5673cb4a.1e3364","outputs":"1","autoTrigger":false,"autoTriggerTime":3600000,"storeName":"","blindIncrement":0.01,"blindOpenPos":1,"blindClosedPos":0,"blindPosReverse":false,"blindPosDefault":"open (max)","blindPosDefaultType":"levelFixed","overwriteExpire":"","rules":[{"index":0,"name":"","isValid":true,"valid":{"validTimeReg":true,"validLevel":true,"validOperand1A":true,"validOperand1B":true},"timeValue":"","timeType":"none","timeOp":0,"timeOpText":"↥ bis","offsetValue":"","offsetType":"none","multiplier":60000,"timeDays":"*","timeMonths":"*","timeOnlyEvenDays":false,"timeOnlyOddDays":false,"timeMinValue":"","timeMinType":"none","offsetMinValue":"","offsetMinType":"none","multiplierMin":60000,"timeMaxValue":"","timeMaxType":"none","offsetMaxValue":"","offsetMaxType":"none","multiplierMax":60000,"levelValue":"66%","levelType":"levelFixed","levelOp":1,"levelOpText":"⭳❗ Minimum (übersteuernd)","validOperandAValue":"window","validOperandAType":"msg","validOperator":"true","validOperatorText":"ist true","validOperandBValue":"","validOperandBType":"num","valid2LogOperator":0,"valid2LogOperatorText":"N/A","valid2OperandAValue":"","valid2OperandAType":"msg","valid2Operator":"true","valid2OperatorText":"ist true","valid2OperandBValue":"","valid2OperandBType":"num","description":"<div><i class=\"fa fa-code-fork\" aria-hidden=\"true\"></i> <var>msg.window</var> ist true</div><div>⭳❗ Minimum (übersteuernd) <var>66%</var></div>"}],"sunControlMode":"0","sunFloorLength":"","sunMinAltitude":"","sunMinDelta":"","blindPosMin":"closed (min)","blindPosMinType":"levelFixed","blindPosMax":"open (max)","blindPosMaxType":"levelFixed","smoothTime":"","windowTop":"","windowBottom":"","windowAzimuthStart":"","windowAzimuthEnd":"","oversteerValue":"","oversteerValueType":"none","oversteerCompare":"gte","oversteerThreshold":"","oversteerThresholdType":"num","oversteerBlindPos":"open (max)","oversteerBlindPosType":"levelFixed","oversteer2Value":"","oversteer2ValueType":"none","oversteer2Compare":"gte","oversteer2Threshold":"","oversteer2ThresholdType":"num","oversteer2BlindPos":"open (max)","oversteer2BlindPosType":"levelFixed","oversteer3Value":"","oversteer3ValueType":"none","oversteer3Compare":"gte","oversteer3Threshold":"","oversteer3ThresholdType":"num","oversteer3BlindPos":"open (max)","oversteer3BlindPosType":"levelFixed","x":350,"y":1000,"wires":[["f9b85f4.1a3682"]]},{"id":"3a0030b9.ca561","type":"inject","z":"3104539f.4cf13c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":135,"y":1000,"wires":[["a4969444.e41de8"]]},{"id":"7333c49f.7d769c","type":"inject","z":"3104539f.4cf13c","name":"","topic":"window","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":145,"y":1075,"wires":[["a4969444.e41de8"]]},{"id":"3c56bbb2.341edc","type":"inject","z":"3104539f.4cf13c","name":"","topic":"window","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":145,"y":1125,"wires":[["a4969444.e41de8"]]},{"id":"f9b85f4.1a3682","type":"debug","z":"3104539f.4cf13c","name":"Test","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":550,"y":1000,"wires":[]},{"id":"5673cb4a.1e3364","type":"position-config","z":"","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"}]