Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Who's afraid of Python - Part II

Gateways and Energy Servers

Schneider Electric support forum to share knowledge about product selection, installation and troubleshooting for EcoStruxure Panel Server, PowerTag, Com'X, Link150…

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Power & Grid
  • Gateways and Energy Servers
  • Who's afraid of Python - Part II
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
Romain_Polette
Spock Romain_Polette Spock
98
Randi_Dolan
Commander Randi_Dolan Commander
46
Guillaume_Evrard
Commander Guillaume_Evrard Commander
43
Thierry_Baudard
Commander Thierry_Baudard Commander
30
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Gateways and Energy Servers
sesa82384_bridg
Ensign sesa82384_bridg
Ensign

Posted: ‎2013-08-22 09:40 PM

1 Like
0
675
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2013-08-22 09:40 PM

Who's afraid of Python - Part II

In my last post about the Python script, I wrote about a very simple, two lines of Python script to be used in EO charts in order to remove the meter classification from the legend.

Unfortunately this feature was removed from the platform, at least for us, the mortals.

But learn Python is not a waste of your time at all, at least in our context here because of few reason:

  1. Python is fun, free and simple
  2. You can transform unsupported file formats and import this data to EO.
  3. You can write a small script in EODC in order to industrialize the import process

 

This week I received our colleagues from UK and Greece in Grenoble to teach them how to commission a tenant. Among other tasks, of course there is the data import process. As you may know, UK massively uses the ERM platform to provide services in the country. And one of their source of meter data is a file that is sent from Invensys to their server. ERM handle the file automatically and generate meter data.

But how to consume such file in EO? The answer is simple, write an script in Python, test it, port it to EODC and install a new job.

So I decide to make an experiment to try to do this exercise. The final result was a tiny, readable, portable and efficient program. Check the source code in the attached file

The meter data file looks like our CMEP format, an meter identification, a initial data and several data points (12 in fact since the demand interval in UK is 30 minutes) and a flag for each measure (A=Actual, E=Estimated).

Here is one line of such file

1507659320039,26/06/2010,KWH,34.6,A,33.7,A,26.9,A,27.1,A,25.8,A,26.3,A,25,A,26.8,A,27.2,A,24.5,A,30.8,A,30.1,A,30.3,A,29.3,A,35.5,A,49.2,A,59.7,A,66.3,A,74.4,A,74.7,A,77.2,A,75.4,A,74,A,72.6,A,75.3,A,77.1,A,74.5,A,76.9,A,75.5,A,76.1,A,74.8,A,81.5,A,77.9,A,75.6,A,72.1,A,70.3,A,71.6,A,70.1,A,69.2,A,53.5,A,42.5,A,37.7,A,38,A,36.6,A,35.7,A,35.5,A,34.9,A,34.6,A

After running the script in my PC, it generates a Vizelia CSV file format. So, before was a file with horizontal information and now the same data but in a vertical shape.

2010-06-26T00:30:00,"34.6",METER_1507659320039

2010-06-26T01:00:00,"33.7",METER_1507659320039

At the end of the file I insert, for convenience, the number of data points and the meters that was found inside the file, so the application engineer can easily use such id’s in the commissioning tool to create them.

2013-06-19T23:30:00,"11.8",METER_1700051519478

2013-06-20T00:00:00,"11.7",METER_1700051519478

--- Done! --------- Cut Here ----------

345984 measurements found in 7 meters

--------- meter names ------------

METER_1507659320039

METER_1620001671458

METER_1300037714369

METER_1300053364728

METER_1300053364658

METER_1460001876631

METER_1700051519478

The next steps for this are:

  • Tweak the script to handle the input arguments as source file, output file name, etc. Today the input and output file name are hard coded. I’m inside the train heading to Paris, not in a mood now.
  • Ignore the last topic and port the code to be used inside EODC so we can industrialize the process.

Is there anyone out there willing to help? Just download Python to your machine and try it. If you need any help, just ask my help.

That’s all folks.

Carlos

 

Attachments
PythonCSV.zip
Tags (2)
  • Tags:
  • eodc
  • python
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
Replies 0
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of