示例#1
0
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())
    ))
示例#2
0
def sensors():
    '''
        Returns all weather nodes
    '''
    return jsonify(list_to_dict(Sensor.get()))