Implement state.js for digital outputs.