def measurements(deveui): ''' Returns all measurements of a sensor node ''' return jsonify(list_to_dict((Sensor.select(Sensor, Measurement) .join(Measurement) .where(Sensor.deveuid == deveui) .get()) ))
def sensors(): ''' Returns all weather nodes ''' return jsonify(list_to_dict(Sensor.get()))