Import values from python script?
-
Now I wonder if there is a way to have mango start my python script automatically since I have not been able to get crontab to start it periodically for me....
Certainly. I suspect you'll find the Process Event Handler, perhaps on something like the System startup event, can do this for you.
So now I wonder if there is a way to change the time format in Mango to 24 hrs.
Is there some setting to display 2:00:00 PM as 14:00:00 ?Yes, it's a simple change. Go to Mango/web/modules/dataFile/web/CompilingGrounds/CSV/ and edit MultiColumnCsvImporter.java . Change,
private DateTimeFormatter dtf = DateTimeFormat.forPattern("MM/dd/yyyy hh:mm:ss");
to
private DateTimeFormatter dtf = DateTimeFormat.forPattern("MM/dd/yyyy HH:mm:ss");
Then edit the data source edit page to recompile the importer class:
And restart the data source.
-
Phil, I was thinking of changing the time format for all data points in Mango. So for example Modbus and Bacnet. Can I change the Time formatter for those modules as well?
Thanks
-
I'm not really sure what you mean. There isn't time formatting in Modbus, for instance. The timestamps for a poll on Modbus is the time that the poll occurred measured in elapsed milliseconds, this is then converted for display using the locale set on your user. If you change your user's locale, you should see the new UI use an appropriate time format. It is not currently possible to explicitly control the time format.
-
I meant the Times given in the UI. For example in the "data point details" page the windows "point history values", "point statistics" and "chart" all give the Time in 12 hrs AM/PM format. I tought maybe there is a setting to change that format to 24 hrs (military time format).
But now I'm nit picking ...Thank again for the help.
-
Just set my locale and bingo I'm a happy camper! There's just so much to explore!
Cool !! Thanks! -
Sweet! Glad to hear it!
I'm not sure this would be easy to change on the data point details page or other pages we provided, but if you find yourself using
<ma-point-value></ma-point-value>
components in your custom dashboards and wanting to provide a time format, the API docs (enable in Administration --> Edit menu) suggest,display-type (optional) string Changes how the data point value is rendered on the page. Options are: rendered (Displays live value in point's text rendered format) *Default converted (Displays live value in point's unit converted format) dateTime (Displays the time the of the point's last update)
date-time-format (optional) string If dateTime is used with display-type then you can pass in a momentJs string to format the timestamp. (Defaults to Mango default date format set in system settings)
where the data point details page is displaying time in that element with the settings,
display-type="dateTime" flash-on-change="true" same-day-date-time-format="timeSeconds"
where timeSeconds is one of the shorthands for normal formats one may find around Mango, defined: https://github.com/infiniteautomation/ma-dashboards/blob/bf9f8ba49754a1a93d59d1f3bd562b69b8523680/UI/web-src/ngMango/ngMangoServices.js#L151
-
I haven't yet started with the custom dashboards, so I will keep this in mind for future reference.
Another thing I having difficulty with is the spline setting for the charts.
I've set my data points "point properties/Plot type" to "Spline" but the chart in the "Data Point Page" is never a smooth spline. The Bar and Step entries in the dropdown menu in the Chart window work nicely, the Line and Smooth entries don't seem to change anything, there are always steps.
I'm obviously missing something here again but what? -
I'm obviously missing something here again but what?
The plot type setting applies to the old UI pages, such as /data_point_details.shtm
On charts in the new UI, such as /ui/data-point-details/ , there is a selector in the top right portion of the chart to toggle between smooth, line, step, or bar styles.
-
Phil, I' ll try to upload some screenshots. Whatever I choose in the selector in the top right portion of the chart the outcome seems the same to me. Except for "Bar", then the area below the graph is filled in solid:
-
Hmm. I was not able to replicate. Can you share the JSON for the point you're seeing that with? Are there any errors in the browser developer console?
-
Hi, I've got myself a litte confused with this one. I only just realized how to zoom into the chart and it turns out that the steps I'm seeing are actually a result of the data aquisition. Although I poll the devices every minute the data sources do not seem to update the data that fast. So I might get back constant values for several minutes and then record a change from one poll to the next.
So then of course the spline is only 1 minute segment long and does not seem to be there at all when I'm looking at the whole chart.
Sorry about that, don't know where my brain was...Nevertheless another question came up (of course). Please see next Post.
-
I've been playing around with the dashboard designer and I can't delete any pages.
I'm admin and I think I've got all the permissions:
Then I try to delete this page called "Testpage" by clicking on the trashcan symbol but nothing happens.I try the same thing in "edit pages". The page is empty but I can't delete it.
But I noticed this error in the Browser console:
So I checked Mango on my Windows installation and the exact same thing happens there.
This is the java version I'm running:
I hate to pepper you with questions, but I'm still hoping I just overlooked something really obvious.
Thanks for your patience.
-
Hi Holzatelier,
You should see a confirm dialogue. What browser are you using? I was not able to reproduce in Chrome on the latest.
I hate to pepper you with questions, but I'm still hoping I just overlooked something really obvious.
No worries. But, this particular thread has strayed quite far from its topic. Don't hesitate to make more topics, it is ultimately a better question-answer or discussion style than threads twisting to new topics.