fix state / command handling for incoming device parameters
update documentation
Merge pull request #13 from maggu2810/cmd-vs-state

fix state / command handling for incoming device parameters