To use a specific Timezone:
DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("MM/dd/yyyy HH:mm").withZone(DateTimeZone.UTC);
Just wanted to let you know we have updated our developers documentation. We have separated it into 2 parts, Angular for the UI and Java for the backend. As of Mango 3.7 there is a new 'development' mode that can save time developing. Check them out here:
If you are game to give it a try, here is some documentation on the SQL api for Java:
As a side note Mango 4.0 will have a Message event handler that will allow using Twilio and in the future other platforms to send messages.
But i don't know how to update this files in my mango installation...
It will be far easier for you to upgrade to Mango 2.6.0 that has all the work done for you. It will be pre-released very soon.
Sorry, our maven repository only holds the latest snapshot versions and lets the older ones roll off. The latest version is
3.6.1-SNAPSHOT for the api module. Since that version will also eventually drop off of the repository I would suggest you use the release version of the api module as that will always be available. So change the dependency from
3.6.0 and you should be good to go.
There is no way to currently get a list of realtime values for multiple points by filtering by data point XID. The next release of Mango will have some RQL endpoints. I can see if I can put it in for the realtime endpoint, this would allow you to perform SQL-like queries via the URL such as:
More on RQL here: https://github.com/persvr/rql
For now you could just request ALL the realtime data and filter it by XID on the client side. See this:
Where the limit is greater than or equal to the number of points in your Point Hierarchy.
@MattFox just letting you know I've tried in the past to fix this but didn't have much luck. But I tried again today and managed to make an improvement. There are likely other models that will suffer from this problem so when Mango 3.7.0 is released if you see any more of these types of problems please let us know.
Here is the git issue if you are interested in following:
The REST api has a feature that allows bulk updating of data points via a PUT of a JSON array, but this has not been rigorously tested and is still in Beta. Use at your own risk since not every type of data point has been verified to work. I would suggest making a backup of your database prior to testing your specific updates.
Here is the basic idea:
Note that since the JSON structure for a Data Point in the REST API is different than the Mango JSON Export you cannot use one with the other.
@BG I am pretty sure there will be no problems with the versions of MariaDB that support JSON columns. To make a long story short we have not tested it with MariaDB but the only place we use the
JSON type column so far is in the create table script for the
users table so the alias they have will be fine on that statement.
In the future we may actually create queries that introspect the data in that column but this will likely be for custom modules and not part of the standard Mango application. Also H2 does not support
JSON column types so all of our queries basically use that column as a
LONGTEXT type currently.
Sorry I said QueryBuilder but I meant the DataPointQuery utility, you can read about it here:
@cmusselm I'm not aware of any 100 point limit, but we will look into this. As a temporary work around you could use the QueryBuilder utility and place tags onto your points, then query for them in the script.
One more thing, are you sure all of your points are enabled? This would explain it If only the first 100 are.
@junhyeok928 unfortunately we have removed this module completely and the earlier versions are not compatible with Mango beyond 4.0.0-beta.12. If you can provide a solid enough case I'm sure we could consider re-instating it in a later release of 4.0.
@brownbucks11 another option would be to install the nashorn module which will provide the engine to the JVM when Mango starts.
It looks like you have some module code that is incompatible with the core beta.12 version. If you upgrade a 4.0 beta release you must upgrade everything (all modules and core). At this point you will want to download a bundle and perform a manual upgrade.
I also would suggest you clean out the web/modules folder while Mango is down.
@cbyrne yes mostly but things have changed and I recently gave some training of which the results ended up in this repository:
I suspect you will need to clear the Browser cache. We are working on a permanent fix for Mango 4 that will go out will the full release.
Any chance you could tell me:
@usi I just took a quick peek at the logs and can see one problem, however it isn't going to be the same thing that is causing those events to be raised in your first post.
The data source trying to convert the value using the
multiplier setting on the data point. I would check all of your data points on that data source and confirm the multiplier is set to 1 (or something that you want to multiply by). It seems one (or many) of your points have something that isn't numerical set on that setting.
ERROR 2021-03-10T09:33:47,909 (com.serotonin.m2m2.util.timeout.TimeoutTask.run:61) - Uncaught Task Exception java.lang.NumberFormatException: null at java.math.BigDecimal.<init>(BigDecimal.java:497) ~[?:1.8.0_231] at java.math.BigDecimal.<init>(BigDecimal.java:383) ~[?:1.8.0_231] at java.math.BigDecimal.<init>(BigDecimal.java:809) ~[?:1.8.0_231] at com.serotonin.m2m2.modbus.rt.ModbusDataSourceRT.updatePointValue(ModbusDataSourceRT.java:404) ~[?:?] at com.serotonin.m2m2.modbus.rt.ModbusDataSourceRT.doPoll(ModbusDataSourceRT.java:230) ~[?:?] at com.serotonin.m2m2.rt.dataSource.PollingDataSource.doPollNoSync(PollingDataSource.java:228) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.rt.dataSource.PollingDataSource.scheduleTimeoutImpl(PollingDataSource.java:183) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.rt.dataSource.PollingDataSource$1.scheduleTimeout(PollingDataSource.java:85) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.util.timeout.TimeoutTask.run(TimeoutTask.java:59) ~[mango-3.7.7.jar:?] at com.serotonin.timer.Task.runTask(Task.java:179) ~[mango-3.7.7.jar:?] at com.serotonin.timer.TaskWrapper.run(TaskWrapper.java:23) ~[mango-3.7.7.jar:?] at com.serotonin.timer.OrderedThreadPoolExecutor$OrderedTaskCollection.run(OrderedThreadPoolExecutor.java:314) ~[mango-3.7.7.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_231] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_231] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_231]
I would check the work item priority for Excel reports in the System settings area.
Administration --> System settings --> Excel reports
The low priority pool generally has 1 processing thread in it (which can be configured in the thread pools system settings) and this means any task put in that pool will run when the thread is free to do the work. If you have many low priority tasks running around 1AM it will sit in a queue until it is processed.
You could either increase the low pool size or have it run in the medium priority pool.