gtfierro / mdal

metadata-driven data access layer
BSD 2-Clause "Simplified" License
4 stars 1 forks source link

tstat hsp and csp UUID error #10

Open jleyden opened 5 years ago

jleyden commented 5 years ago

I am trying to run an MDAL query for thermostat heat setpoint and cooling setpoint with the python dataclient.

screen shot 2018-10-02 at 10 08 50 pm

This is how I call the query:

screen shot 2018-10-02 at 10 08 10 pm

I am getting this error -- No UUIDS

screen shot 2018-10-02 at 10 24 48 pm

This error is odd because my queries for weather is working just fine:

screen shot 2018-10-02 at 10 34 24 pm

What is going wrong here?

jleyden commented 5 years ago

Screenshot 1:

request = { "tstat_hsp": {
                "Definition": """SELECT ?t ?t_uuid ?tstat FROM %s WHERE {
                    ?t rdf:type/rdfs:subClassOf* brick:Heating_Temperature_Setpoint .
                    ?t bf:uuid ?t_uuid .
                    ?t bf:isPointOf ?tstat .
                    ?tstat rdf:type brick:Thermostat
                };""" % site,
            }
}

Screenshot 2:

  request['Time'] = {
        'Start': start,
        'End': end,
        'Window': '15m',
        'Aligned': True
    }
    request['Composition'] = ['tstat_temp', 'tstat_hsp']
    request['Aggregation'] = {'tstat_temp': ['MEAN'],
                        'tstat_hsp': ['MEAN']}
    resp = m.query(request)

Screenshot 3:


request = {
"weather": {
                "Definition": """SELECT ?t ?t_uuid FROM %s WHERE {
                    ?t rdf:type/rdfs:subClassOf* brick:Weather_Temperature_Sensor .
                    ?t bf:uuid ?t_uuid
                };""" % site,
            }
}

    request['Composition'] = ['weather']
    request['Aggregation'] = {'weather': ['MEAN']}
    request['Time'] = {
        'Start': start,
        'End': end,
        'Window': '15m',
        'Aligned': True
    }
    resp = m.query(request)
gtfierro commented 5 years ago

Its returning "No UUIDs" because the Brick query returns an empty response. The weather query works fine because its query doesn't return an empty response.

I sent you the wrong class for the Brick query before. Try using Supply_Air_Temperature_Heating_Setpoint (and the obvious corollary for cooling) and see if that fixes it