Fix a problem when an USB serial port goes away.
Add API calls to get units and countby settings.
Merge branch 'master' of https://github.com/rinstrum/LUA-LIB

# By Pauli
# Via Pauli
* 'master' of https://github.com/rinstrum/LUA-LIB:
  Add API calls to get units and countby settings.
  Fix a problem when an USB serial port goes away.