I’ve successfully got a ‘push’ style button in Blynk toggling a servo which then contacts with the Open button on my Garage Door remote. All through a NodeMCU. This works well, as i just hold the Blynk button, and when i release the button the servo returns to its neutral state.
I’m now trying to integrate with Google Assistant using IFTTT and a webhook to allow voice control. I’ve managed to get the Servo activating on Voice Command, but it stays active (i.e. constantly pushing the Door remote button).
Is there a way to ‘pulse’ for say 5 seconds using certain commands on the webhook body? Details below on webhook configuration
Content Type: Application/json
Body: [“140”] \this is the required rotation on the servo to activate the Door Remote
What you need to do is not send the value you want the servo to move to. Instead, send a “magic” value of whatever you want on a different virtual pin.
Then in your code you would monitor the new virtual pin to detect your “magic” number (could be a 1) then use that trigger to move your servo once to the position you desire and then use a timer to trigger the move back to the original position.