Alright, now we are able to store the state changes of devices when sending when we send order to them, based on the idea that they do not change state whithout telling us (which is not exactly true). Added a couple of callbacks, fixed global variables in logger.js, added some logs as well and also not interpreting "0" as not false when converting booleans to string