What is the best approach to read profiles when I want to call the script by cron monthly?
For now I'm able to read it in ReadAll() like this
profiles = self.getProfileGenericColumns()
for i in range(4):
self.readRowsByRange(profiles[i], start, end)
and then in profiles, I've got what I want. (start, end - dates)
ofc I can get the current date and get a specified period time, but I wanted to know if I can do it better?
You can read profile generic using start and end index (readRowsByEntry) or start and end time (readRowsByRange). If you want to read all data from the meter to the database, you can save the last read time and give it to the start time for the next read.
Ok, thank you for your response.
So I will stay with this approach
profiles = self.getProfileGenericColumns()
for i in range(4):
self.readRowsByRange(profiles[i], start, end)
but hera I've got one more question
first line getProfileGenericColumns(), needs to have getAssociationView() red before, how to use saved before xml file in this case?
Ok, so if first run the program where I've got
self.getAssociationView()
self.getProfileGenericColumns()
and set parameter -o output.xml
will I have in output.xml profiles saved?
and then how to use this output.xml in case of reading profiles?
Parameter "-o" is saving all the values that you have read from the meter. If you have read capture objects of the profile generic, you don't need to read them from the meter again, if they are not changed. You can use values that you have saved to the file.
Hi,
Hi,
You can read profile generic using start and end index (readRowsByEntry) or start and end time (readRowsByRange). If you want to read all data from the meter to the database, you can save the last read time and give it to the start time for the next read.
BR,
Mikko
Hi,
Hi,
Ok, thank you for your response.
So I will stay with this approach
profiles = self.getProfileGenericColumns()
for i in range(4):
self.readRowsByRange(profiles[i], start, end)
but hera I've got one more question
first line getProfileGenericColumns(), needs to have getAssociationView() red before, how to use saved before xml file in this case?
Hi,
Hi,
Columns are saved to the file if you save the file after you have read the profile generic columns.
BR,
Mikko
Ok, so if first run the
Ok, so if first run the program where I've got
self.getAssociationView()
self.getProfileGenericColumns()
and set parameter -o output.xml
will I have in output.xml profiles saved?
and then how to use this output.xml in case of reading profiles?
BR,
James
Hi,
Hi,
Parameter "-o" is saving all the values that you have read from the meter. If you have read capture objects of the profile generic, you don't need to read them from the meter again, if they are not changed. You can use values that you have saved to the file.
You can read the values as I have replied here:
http://gurux.fi/node/18048
BR,
Mikko