vidgrind: device key not properly generated on creation of device

Issue #109 resolved
Saxon Milton created an issue

When a new device is added to a site through vidgrind, the device key does not seem to properly generate and remains as 0.