Forgotten branch

This branch is here forgotten. It has some useful changes when you get deviceID. Can we merge it? @DDani @willeeh