fixed update to database, change header to curl,adapted to Zigbee