-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write Values to PI #540
Write Values to PI #540
Conversation
What this checks do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, I appreciate your contribution.
I left some comments. Hope it may help.
Now I really time dependent and want to have some of the features you suggested as soon as possible, so that is why I started a new branch and it consists of 80% of your pr suggestions: #573
@@ -93,7 +92,7 @@ def timestamp_to_index(timestamp): | |||
|
|||
Move outside as separate function? | |||
""" | |||
local_tz = pytz.timezone(PIConfig.DEFAULT_TIMEZONE) | |||
local_tz = pytz.timezone("Europe/Amsterdam") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hardcoded timezone
points = server.search(tag)[0] | ||
# teste write | ||
|
||
points.update_value(1.0,UpdateOption.REPLACE,BufferOption.BUFFERIFPOSSIBLE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about the correct use of IntEnum
here.
UpdateOption.REPLACE
will return <enum 'UpdateMode'>
.
I suggest you to use .value
attr. in addition, i.e. UpdateOption.REPLACE.value
@@ -370,33 +344,6 @@ def summaries( | |||
"""summaries | |||
|
|||
Return one or more summary values for each interval within a time range | |||
|
|||
Args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lot of useful comment removals
I think what happened is that @ldariva based his changes on the latest git pull origin develop # or perhaps git pull upstream develop. depending on how you've configured the git remotes
git rebase develop |
Hi Hugo, I will ty that but I am not sure this is the problem. I took a log from the repository I worked with and this is the result. commit b0258e7 (HEAD -> develop, origin/develop, origin/HEAD)
commit 094f507
commit e52a57b
commit fed90e1
commit d5fec92 |
I implemented a call to UpdateValue method which allows to send values to PI System. I tested this feature using a PI server in my company. I teste the code in Python 2.7.18, 3.5.4, 3.6.0 and 3.7.8. I also create two new enumartion. One for update option and another one for buffer option.