add a `decode_datetime` function as a complement to `encode_datetime`
move inserts into wifi_measure table to an async task