Fixed typo in table name
Updated javascript to include reload function in javascript for door and motion sensor