I recently embarked on a project to automate my home’s ventilation system using the Sonoff Dual and a SolerPalau TD-350/125 SILENT fan. The goal was to create a smart system that adjusts fan speeds based on room humidity levels. Initially, I faced a challenge: ensuring that the second motor (motor2) wouldn’t start before motor1 was completely off. This required precise timing and control to prevent any overlap or unintended operation.After some research and experimentation, I developed a rule that not only addresses the motor sequence issue but also ensures smooth transitions between fan speeds. The system now operates seamlessly, switching between motor1 and motor2 based on predefined humidity thresholds. Here’s the rule I created:plaintextrule "Ventilation Automation"when Item humidity received updatethen var double humRoom = new Double(humidity.state.toString()) if (humRoom <= 40) { sendCommand(Vent1, OFF); postUpdate(Vent1, OFF); sendCommand(Vent2, OFF); postUpdate(Vent2, OFF); } else if (humRoom >= 70) { sendCommand(Vent1, OFF); postUpdate(Vent1, OFF); sendCommand(Vent2, ON); postUpdate(Vent2, ON); } else { sendCommand(Vent2, OFF); postUpdate(Vent2, OFF); sendCommand(Vent1, ON); postUpdate(Vent1, ON); }endThis setup has been a game-changer for my home’s air quality. It not only maintains optimal humidity levels but also ensures energy efficiency by only running the necessary fan speed. I’m excited to share this solution and hope it inspires others to explore similar automation projects.If anyone has questions or suggestions for improving this setup, feel free to reach out! ![]()