Added machine_id validation in model + json fix in machinelog controller