code: func NewJSONDevice(device Device) *JSONDevice {
  	jsonDevice := &JSONDevice{
  		Name:       device.Name(),
  		Driver:     reflect.TypeOf(device).String(),
  		Commands:   []string{},
  		Connection: "",
  	}
  	if device.Connection() != nil {
  		jsonDevice.Connection = device.Connection().Name()
  	}
  	if commander, ok := device.(Commander); ok {
  		for command := range commander.Commands() {
  			jsonDevice.Commands = append(jsonDevice.Commands, command)
  		}
  	}
  	return jsonDevice
  }
docs: // NewJSONDevice returns a JSONDevice given a Device.