Add HMI middleware and dev doc