Set defaults in the Config on first launch, then update it as it transitions to IDLE (only if its changed). This should make the module more resistant to power loss and resets so it doesn't lose position.
MQTT-powered blinds controller using a ESP8266 and a stepper motor to turn the blinds shaft to open and close them.
ESP8266, using the NodeMCU 1.0 board