Stap 5: Toekomstplannen
Ik vind niet dat de hartslag voor het controleren van de status van de deur is in de code van de Arduino, ik wil echt dat te worden gecontroleerd door OpenHab. Ik moet alleen om erachter te komen hoe te vertellen om iets te doen elke X seconden.
Ik heb scène ding die i 'm running en ik wil de garagedeur erin werken. Momenteel luidt het als volgt:
regel "Scène Change"
Wanneer Item scène ontvangen opdracht dan switch(receivedCommand) {1 kast: {//Normal sendCommand (Light_GF_Family, 99) sendCommand (Light_GF_Office, 99) sendCommand (Light_GF_Foyer, "OFF")} geval 2: {//Movie sendCommand (Light_GF_Family, 20) sendCommand (Light_GF_Office, 20) sendCommand (Light_GF_Foyer, "OFF")} case 3: {//BedTime sendCommand (Light_GF_Family, 20) sendCommand (Light_GF_Office, 20) sendCommand (Light_GF_Foyer "ON")} geval 0: {//GoodNight sendCommand (Light_GF_Family, 0) sendCommand (Light_GF_Office, 0) sendCommand (Light_GF_Foyer, "OFF") sendCommand (Light_GF_Porch, "OFF") sendCommand (Light_GF_Driveway, "OFF") sendNotification ("eric.cantrell"Good Night!")}} einde
Toen ik GoodNight raakte, wil ik om te controleren of de garagedeur openen. Als het is, wil ik het vertellen me dat en dan proberen om het te sluiten.