def handle_weatherstation_PUT(request): data = request.content.read() content_type = request.getHeader('Content-Type') dic = deserialize(data, content_type) status = weatherstation.update(dic, content_type) return make_response(weatherstation, request=request, status=status)
def handle_display_PUT(request): content_type = request.getHeader('Content-Type') data = request.content.read() dic = deserialize(data, content_type) display.update(dic, content_type) cors(request, methods=['GET', 'PUT']) return make_response(display, request)
def handle_sensor_PUT(request): data = request.content.read() content_type = request.getHeader('Content-Type') dic = deserialize(data, content_type) sensing_device.update(dic, content_type) cors(request, methods=['GET', 'PUT']) return make_response(sensing_device, request)
def handle_dht22_PUT(request): data = request.data content_type = request.headers.get("Content-Type") dic = deserialize(data, content_type) dht.update(dic, content_type) cors(request, methods=['GET']) return make_response(dht, request)
def handle_waterdispenser_valve_PUT(request): data = request.content.read() content_type = request.getHeader('Content-Type') dic = deserialize(data, content_type) status = valve.update(dic, content_type) cors(request, methods=['GET', 'PUT', 'OPTIONS']) return make_response(valve, request=request, status=status)
def handle_lightbulb_PUT(request): data = request.content.read() content_type = request.getHeader("Content-Type") dic = deserialize(data, content_type) status = lightbulb.update(dic, content_type) cors(request, methods=["GET", "PUT", "OPTIONS"]) return make_response(lightbulb, request=request, status=status)
def handle_window_lock_PUT(request): data = request.content.read() content_type = request.getHeader('Content-Type') dic = deserialize(data, content_type) lock.update(dic, content_type) cors(request, methods=['GET', 'PUT']) return make_response(lock, request)
def handle_weatherstation_sensors_temperature2_GET(request): return make_response(temperature_2, request)
def handle_weatherstation_gps_GET(request): return make_response(gps, request)
def handle_weatherstation_sensors_altitude_GET(request): cors(request, methods=['GET']) return make_response(altitude_sensor, request)
def handle_waterdispenser_sensor_GET(request): cors(request, methods=['GET', 'OPTIONS']) return make_response(sensor, request)
def handle_window_shutter_GET(request): cors(request, methods=['GET', 'PUT', 'OPTIONS']) return make_response(shutter, request)
def handle_window_lock_GET(request): cors(request, methods=['GET', 'PUT']) return make_response(lock, request)
def handle_weatherstation_sensors_GET(request): cors(request, methods=['GET']) return make_response(sensor_collection, request)
def handle_weatherstation_sensors_pressure_GET(request): cors(request, methods=["GET"]) return make_response(pressure_sensor, request)
def handle_waterdispenser_valve_GET(request): cors(request, methods=['GET', 'PUT', 'OPTIONS']) return make_response(valve, request)
def handle_weatherstation_sensors_humidity_GET(request): return make_response(humidity_sensor, request)
def handle_lightbulb_GET(request): cors(request, methods=["GET", "PUT", "OPTIONS"]) return make_response(lightbulb, request)
def handle_sensor_humidity_GET(request): cors(request, methods=['GET']) return make_response(humidity_sensor, request)
def handle_dht22_humidity_GET(request): cors(request, methods=['GET']) return make_response(dht_humidity, request)
def handle_sensor_temperature_GET(request): cors(request, methods=["GET"]) return make_response(temperature_sensor, request)
def handle_weatherstation_sensors_color_GET(request): return make_response(color_sensor, request)
def handle_weatherstation_sensors_illuminance_GET(request): return make_response(illuminance_sensor, request)
def handle_door_handle_GET(request): cors(request, methods=['GET', 'PUT', 'OPTIONS']) return make_response(handle, request)
def handle_display_GET(request): cors(request, methods=['GET', 'PUT']) return make_response(display, request)
def handle_room_GET(request): return make_response(room, request)
def handle_weatherstation_sensors_humidity_GET(request): cors(request, methods=['GET']) return make_response(humidity_sensor, request)
def handle_room_PUT(request): data = request.content.read() content_type = request.getHeader('Content-Type') dic = deserialize(data, content_type) room.update(dic, content_type) return make_response(room, request)
def handle_weatherstation_sensors_altitude_GET(request): return make_response(altitude_sensor, request)
def handle_weatherstation_sensors_illuminance_GET(request): cors(request, methods=["GET"]) return make_response(illuminance_sensor, request)