diff --git a/primestg/report/base.py b/primestg/report/base.py
index 87de08d..8fbf498 100644
--- a/primestg/report/base.py
+++ b/primestg/report/base.py
@@ -139,6 +139,28 @@ def __init__(self, objectified_parameter, report_version):
self.report_version = report_version
self._warnings = []
+ def meter_availability(self, meter):
+ """
+ Get meter availability.
+
+ :param meter: an lxml.objectify.StringElement representing a the
+ availability of the meter at a certain hour
+ :return: a dict with the availability of the meter and hour
+ """
+ values = {}
+ try:
+ timestamp = self._get_timestamp('Date', element=meter)
+ values = {
+ 'name': meter.get('MeterId'),
+ 'status': int(meter.get('ComStatus')),
+ 'timestamp': timestamp,
+ 'season': meter.get('Date')[-1:],
+ 'active': self.get_boolean('Active', element=meter),
+ }
+ except Exception as e:
+ self._warnings.append('ERROR: Thrown exception: {}'.format(e))
+ return values
+
@property
def objectified(self):
"""
diff --git a/primestg/report/reports.py b/primestg/report/reports.py
index 530d699..d415686 100644
--- a/primestg/report/reports.py
+++ b/primestg/report/reports.py
@@ -6,7 +6,7 @@
from primestg.message import MessageS
SUPPORTED_REPORTS = ['S02', 'S04', 'S05', 'S06', 'S09', 'S12', 'S13', 'S15',
- 'S17']
+ 'S17', 'S24']
def get_integer_value(param):
@@ -421,6 +421,92 @@ def values(self):
return values
+class ParameterS24(Parameter):
+ """
+ Class for a set of parameters of report S24.
+ """
+
+ def __init__(
+ self,
+ objectified_parameter,
+ report_version,
+ concentrator_name,
+ request_id
+ ):
+ """
+ Create a ParameterS24 object.
+
+ :param objectified_parameter: an lxml.objectify.StringElement \
+ representing a set of parameters
+ :return: a Measure object
+ """
+ super(ParameterS24, self).__init__(
+ objectified_parameter,
+ report_version
+ )
+ self.concentrator_name = concentrator_name
+ self.request_id = request_id
+
+ @property
+ def concentrator_name(self):
+ """
+ A string with the concentrator name.
+
+ :return: a string with the concentrator name
+ """
+ return self._concentrator_name
+
+ @concentrator_name.setter
+ def concentrator_name(self, value):
+ """
+ Stores a string with the concentrator name.
+
+ :param value: a string with the concentrator name
+ """
+ self._concentrator_name = value
+
+ @property
+ def request_id(self):
+ """
+ The request identification.
+
+ :return: a string with the request identification
+ """
+ return self._request_id
+
+ @request_id.setter
+ def request_id(self, value):
+ """
+ Stores the request identification.
+
+ :param value: a string with the version of the report
+ """
+ self._request_id = value
+
+ @property
+ def values(self):
+ """
+ Set of parameters of report S24.
+
+ :return: a dict with a set of parameters of report S24
+ """
+ values = {}
+
+ try:
+ timestamp = self._get_timestamp('Fh')
+ values = {
+ 'timestamp': timestamp,
+ 'season': self.objectified.get('Fh')[-1:],
+ 'cnc_name': self.concentrator_name,
+ 'meters': []
+ }
+ for s24_meters in self.objectified.Meter:
+ values['meters'].append(self.meter_availability(s24_meters))
+ except Exception as e:
+ self._warnings.append('ERROR: Thrown exception: {}'.format(e))
+ return values
+
+
class ParameterConcentratorEvents(Parameter):
"""
Class for a set of parameters of report S17.
@@ -1110,6 +1196,52 @@ def parameters(self):
return parameters
+class ConcentratorS24(Concentrator):
+ """
+ Class for a concentrator of report S24.
+ """
+
+ def __init__(self, objectified_concentrator, report_version, request_id,
+ report_type):
+ """
+
+ """
+ super(ConcentratorS24, self).__init__(objectified_concentrator)
+ self.report_version = report_version
+ self.request_id = request_id
+ self.report_type = report_type
+
+ @property
+ def parameters(self):
+ """
+ Parameter set objects of this concentrator.
+
+ :return: a list of parameter set objects
+ """
+ parameters = []
+ if getattr(self.objectified, 'S24', None) is not None:
+ for parameter in self.objectified.S24:
+ parameters.append(ParameterS24(
+ parameter,
+ self.report_version,
+ self.name,
+ self.request_id))
+ return parameters
+
+ @property
+ def values(self):
+ """
+ Values of the set of parameters of this concentrator.
+
+ :return: a list with the values of the meters
+ """
+ values = []
+ for parameter in self.parameters:
+ values.append(parameter.values)
+ self._warnings.extend(parameter.warnings)
+ return values
+
+
class Report(object):
"""
Report class to process MessageS
@@ -1235,7 +1367,16 @@ def get_concentrator(self, objectified_concentrator):
self.request_id,
self.report_type
]
- }
+ },
+ 'S24': {
+ 'class': ConcentratorS24,
+ 'args': [
+ objectified_concentrator,
+ self.report_version,
+ self.request_id,
+ self.report_type
+ ]
+ },
}
if self.report_type not in report_type_class:
diff --git a/spec/Report_S24_spec.py b/spec/Report_S24_spec.py
new file mode 100644
index 0000000..b3b85da
--- /dev/null
+++ b/spec/Report_S24_spec.py
@@ -0,0 +1,49 @@
+from expects import expect, equal
+from primestg.report import Report
+from ast import literal_eval
+
+with description('Report S24 examples'):
+ with before.all:
+
+ self.data_filenames = [
+ 'spec/data/CIR4621511030_0_S24_0_20180529093051',
+ 'spec/data/CIR4621707229_0_S24_0_20180529200000',
+ 'spec/data/CIR4621707229_0_S24_0_20180529200000_warnings',
+ ]
+
+ self.report = []
+ for data_filename in self.data_filenames:
+ with open(data_filename) as data_file:
+ self.report.append(Report(data_file))
+
+ with it('generates result with the expected fields'):
+
+ expected_first_value_first_concentrator = ['cnc_name', 'meters',
+ 'season', 'timestamp']
+
+ concentrator = list(self.report[0].concentrators)[0]
+ parameter = concentrator.parameters[0]
+ first_task_first_concentrator = parameter.values
+ expect(sorted(first_task_first_concentrator))\
+ .to(equal(expected_first_value_first_concentrator))
+
+ with it('generates the expected results for all reports'):
+
+ result_filenames = []
+ warnings = []
+ for data_filename in self.data_filenames:
+ result_filenames.append('{}_result.txt'.format(data_filename))
+
+ for key, result_filename in enumerate(result_filenames):
+ result = []
+ with open(result_filename) as result_file:
+ result_string = result_file.read()
+ expected_result = literal_eval(result_string)
+ for cnc in self.report[key].concentrators:
+ for value in cnc.values:
+ result.append(value)
+ if cnc.warnings:
+ warnings.append(cnc.warnings)
+ expect(result).to(equal(expected_result))
+ expect(len(warnings)).to(equal(1))
+ expect(len(warnings[0])).to(equal(2))
diff --git a/spec/data/CIR4621511030_0_S24_0_20180529093051 b/spec/data/CIR4621511030_0_S24_0_20180529093051
new file mode 100644
index 0000000..457cfe6
--- /dev/null
+++ b/spec/data/CIR4621511030_0_S24_0_20180529093051
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spec/data/CIR4621511030_0_S24_0_20180529093051_result.txt b/spec/data/CIR4621511030_0_S24_0_20180529093051_result.txt
new file mode 100644
index 0000000..b312905
--- /dev/null
+++ b/spec/data/CIR4621511030_0_S24_0_20180529093051_result.txt
@@ -0,0 +1,448 @@
+[{'cnc_name': 'CIR4621511030',
+ 'meters': [{'active': True,
+ 'name': 'CIR0141406756',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:08'},
+ {'active': True,
+ 'name': 'CIR0141413501',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:32'},
+ {'active': True,
+ 'name': 'CIR0501221770',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:08'},
+ {'active': True,
+ 'name': 'CIR0501222666',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:12'},
+ {'active': True,
+ 'name': 'CIR0501308446',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:52'},
+ {'active': True,
+ 'name': 'CIR0501401084',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:28'},
+ {'active': True,
+ 'name': 'CIR0501403531',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:44'},
+ {'active': True,
+ 'name': 'CIR0501403537',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:40'},
+ {'active': True,
+ 'name': 'CIR0501407326',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:12'},
+ {'active': True,
+ 'name': 'CIR0501407379',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:56'},
+ {'active': True,
+ 'name': 'CIR0501500210',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:12'},
+ {'active': True,
+ 'name': 'CIR0501500212',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:24'},
+ {'active': True,
+ 'name': 'CIR0501500213',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:36'},
+ {'active': True,
+ 'name': 'CIR0501500214',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:04'},
+ {'active': True,
+ 'name': 'CIR0501500226',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:24'},
+ {'active': True,
+ 'name': 'CIR0501500231',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:40'},
+ {'active': True,
+ 'name': 'CIR0501500232',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:44'},
+ {'active': True,
+ 'name': 'CIR0501500234',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:12'},
+ {'active': True,
+ 'name': 'CIR0501500235',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:36'},
+ {'active': True,
+ 'name': 'CIR0501500237',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:20'},
+ {'active': True,
+ 'name': 'CIR0501500238',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:04'},
+ {'active': True,
+ 'name': 'CIR0501500239',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:28'},
+ {'active': True,
+ 'name': 'CIR0501500241',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:56'},
+ {'active': True,
+ 'name': 'CIR0501500242',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:44'},
+ {'active': True,
+ 'name': 'CIR0501500243',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:20'},
+ {'active': True,
+ 'name': 'CIR0501500244',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:24'},
+ {'active': True,
+ 'name': 'CIR0501500245',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:44'},
+ {'active': True,
+ 'name': 'CIR0501500246',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:34'},
+ {'active': True,
+ 'name': 'CIR0501500248',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:16'},
+ {'active': True,
+ 'name': 'CIR0501500249',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:16'},
+ {'active': True,
+ 'name': 'CIR0501500251',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:28'},
+ {'active': True,
+ 'name': 'CIR0501500252',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:16'},
+ {'active': True,
+ 'name': 'CIR0501500253',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:14'},
+ {'active': True,
+ 'name': 'CIR0501500255',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:08'},
+ {'active': True,
+ 'name': 'CIR0501500256',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:22'},
+ {'active': True,
+ 'name': 'CIR0501500259',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:16'},
+ {'active': True,
+ 'name': 'CIR0501500260',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:10'},
+ {'active': True,
+ 'name': 'CIR0501500261',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:16'},
+ {'active': True,
+ 'name': 'CIR0501500262',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:08'},
+ {'active': True,
+ 'name': 'CIR0501500263',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:10'},
+ {'active': True,
+ 'name': 'CIR0501500264',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:56'},
+ {'active': True,
+ 'name': 'CIR0501500275',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:46'},
+ {'active': True,
+ 'name': 'CIR0501500277',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:40'},
+ {'active': True,
+ 'name': 'CIR0501500308',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:52'},
+ {'active': True,
+ 'name': 'CIR0501500316',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:50'},
+ {'active': False,
+ 'name': 'CIR0501500336',
+ 'season': 'S',
+ 'status': 0,
+ 'timestamp': '2018-05-16 09:39:30'},
+ {'active': True,
+ 'name': 'CIR0501516114',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:52'},
+ {'active': True,
+ 'name': 'CIR2081511137',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 01:47:15'},
+ {'active': True,
+ 'name': 'ITE0131750207',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:36'},
+ {'active': True,
+ 'name': 'ITE0131750594',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:04'},
+ {'active': True,
+ 'name': 'ITE0131751583',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:52'},
+ {'active': True,
+ 'name': 'SAG0135150701',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:08'},
+ {'active': True,
+ 'name': 'SAG0136960961',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:28'},
+ {'active': True,
+ 'name': 'SAG0146963466',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:48'},
+ {'active': True,
+ 'name': 'SAG0155300042',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:32'},
+ {'active': True,
+ 'name': 'SAG0155300051',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:24'},
+ {'active': True,
+ 'name': 'SAG0155300054',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:04'},
+ {'active': True,
+ 'name': 'SAG0155300071',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:12'},
+ {'active': True,
+ 'name': 'SAG0155300074',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:20'},
+ {'active': True,
+ 'name': 'SAG0155300076',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:04'},
+ {'active': True,
+ 'name': 'SAG0155300077',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:48'},
+ {'active': True,
+ 'name': 'SAG0155300078',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:56'},
+ {'active': True,
+ 'name': 'SAG0155300097',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:48'},
+ {'active': True,
+ 'name': 'SAG0155345831',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:40'},
+ {'active': True,
+ 'name': 'SAG0155345832',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:14'},
+ {'active': True,
+ 'name': 'SAG0155345833',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:42'},
+ {'active': True,
+ 'name': 'SAG0155345834',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:24'},
+ {'active': True,
+ 'name': 'SAG0155345837',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:16'},
+ {'active': True,
+ 'name': 'SAG0155345839',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:10'},
+ {'active': True,
+ 'name': 'SAG0155345840',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:20'},
+ {'active': True,
+ 'name': 'SAG0155345841',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:10'},
+ {'active': True,
+ 'name': 'SAG0155345843',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:32'},
+ {'active': True,
+ 'name': 'SAG0155345844',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:48'},
+ {'active': True,
+ 'name': 'SAG0155345845',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:36'},
+ {'active': True,
+ 'name': 'SAG0155345848',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:25:42'},
+ {'active': True,
+ 'name': 'SAG0155345850',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:32'},
+ {'active': True,
+ 'name': 'SAG0155345852',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:48'},
+ {'active': True,
+ 'name': 'SAG0155345857',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:29:19'},
+ {'active': True,
+ 'name': 'SAG0155345864',
+ 'season': 'S',
+ 'status': 1,
+ 'timestamp': '2018-05-28 20:29:53'},
+ {'active': True,
+ 'name': 'SAG0155345865',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:28'},
+ {'active': True,
+ 'name': 'SAG0155379763',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:46'},
+ {'active': True,
+ 'name': 'SAG0155385243',
+ 'season': 'S',
+ 'status': 1,
+ 'timestamp': '2018-05-28 20:23:53'},
+ {'active': True,
+ 'name': 'SAG0155385247',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:12'},
+ {'active': True,
+ 'name': 'SAG0155385248',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:20'},
+ {'active': True,
+ 'name': 'SAG0165753539',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:30:32'},
+ {'active': True,
+ 'name': 'SAG0175822291',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:26:00'},
+ {'active': True,
+ 'name': 'ZIV0036301504',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:40'},
+ {'active': True,
+ 'name': 'ZIV0036303383',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:27:28'},
+ {'active': True,
+ 'name': 'ZIV0036303384',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 09:28:24'}],
+ 'season': 'S',
+ 'timestamp': '2018-05-29 09:30:51'}]
\ No newline at end of file
diff --git a/spec/data/CIR4621707229_0_S24_0_20180529200000 b/spec/data/CIR4621707229_0_S24_0_20180529200000
new file mode 100644
index 0000000..0cd3767
--- /dev/null
+++ b/spec/data/CIR4621707229_0_S24_0_20180529200000
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spec/data/CIR4621707229_0_S24_0_20180529200000_result.txt b/spec/data/CIR4621707229_0_S24_0_20180529200000_result.txt
new file mode 100644
index 0000000..db5a503
--- /dev/null
+++ b/spec/data/CIR4621707229_0_S24_0_20180529200000_result.txt
@@ -0,0 +1,58 @@
+[{'cnc_name': 'CIR4621707229',
+ 'meters': [{'active': True,
+ 'name': 'CIR0501407341',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:39'},
+ {'active': True,
+ 'name': 'CIR0501701201',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:18'},
+ {'active': True,
+ 'name': 'CIR0501701209',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:35'},
+ {'active': True,
+ 'name': 'CIR0501701426',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:03'},
+ {'active': True,
+ 'name': 'CIR0501701428',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:31'},
+ {'active': True,
+ 'name': 'CIR2081707282',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 18:28:56'},
+ {'active': True,
+ 'name': 'SAG0165790033',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:27'},
+ {'active': True,
+ 'name': 'SAG0165790092',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:15'},
+ {'active': True,
+ 'name': 'SAG0165790094',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:29'},
+ {'active': True,
+ 'name': 'SAG0175811896',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:23'},
+ {'active': True,
+ 'name': 'SAG0176451405',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:06'}],
+ 'season': 'S',
+ 'timestamp': '2018-05-29 20:00:00'}]
\ No newline at end of file
diff --git a/spec/data/CIR4621707229_0_S24_0_20180529200000_warnings b/spec/data/CIR4621707229_0_S24_0_20180529200000_warnings
new file mode 100644
index 0000000..e8c00f0
--- /dev/null
+++ b/spec/data/CIR4621707229_0_S24_0_20180529200000_warnings
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spec/data/CIR4621707229_0_S24_0_20180529200000_warnings_result.txt b/spec/data/CIR4621707229_0_S24_0_20180529200000_warnings_result.txt
new file mode 100644
index 0000000..39b7987
--- /dev/null
+++ b/spec/data/CIR4621707229_0_S24_0_20180529200000_warnings_result.txt
@@ -0,0 +1,50 @@
+[{'cnc_name': 'CIR4621707229',
+ 'meters': [{'active': True,
+ 'name': 'CIR0501407341',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:39'},
+ {'active': True,
+ 'name': 'CIR0501701201',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:18'},
+ {'active': True,
+ 'name': 'CIR0501701209',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:35'},
+ {},
+ {'active': True,
+ 'name': 'CIR0501701428',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:31'},
+ {'active': True,
+ 'name': 'CIR2081707282',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 18:28:56'},
+ {},
+ {'active': True,
+ 'name': 'SAG0165790092',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:15'},
+ {'active': True,
+ 'name': 'SAG0165790094',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:29'},
+ {'active': True,
+ 'name': 'SAG0175811896',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:23'},
+ {'active': True,
+ 'name': 'SAG0176451405',
+ 'season': 'S',
+ 'status': 2,
+ 'timestamp': '2018-05-29 19:59:06'}],
+ 'season': 'S',
+ 'timestamp': '2018-05-29 20:00:00'}]
\ No newline at end of file