To use a specific Timezone:
DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("MM/dd/yyyy HH:mm").withZone(DateTimeZone.UTC);
To use a specific Timezone:
DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("MM/dd/yyyy HH:mm").withZone(DateTimeZone.UTC);
Hi All,
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:
xbastek,
You say:
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.
Thanks,
Terry
@nachum37 thanks for making us aware of this, I will take the information you provided here and have our team replicate what is happening so we can fix any problems we find.
I wrote this help article not too long ago which may provide some insight into configuring the Apache proxy.
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-SNAPSHOT
to 3.6.0
and you should be good to go.
@vanjr something isn't quite right with the image you posted. First try to understand what function code 02 is doing, Read an Input Status at an offset starting from 10001.
https://www.simplymodbus.ca/FC02.htm
Maybe I'm missing something but it doesn't seem possible that there is an input register at location 100001 as that offset from 10001 is larger than the 2 bytes that are allowed for the offset in the protocol message of function code 02. My guess is that there is a display error in the software you are using and the address is really 10001 in which case the offset is 0.
@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.
@Nurr
There is the possibility to use the Email Event handler to do this. If you return "CANCEL" from the script on an email event handler it won't actually send an email. Leveraging this one could write a script to make an SQL query for the numbers and then call your global script. You can call Java code directly from the script but it will require some knowledge of Java and how to use it within the Nashorn Javascript Engine. There should be some examples of this on our forum. Basically the script needs superadmin permission and you must use the full package and class name when you reference a Java class.
If you are game to give it a try, here is some documentation on the SQL api for Java:
https://docs.oracle.com/javase/tutorial/jdbc/basics/processingsqlstatements.html
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.
@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:
https://github.com/infiniteautomation/ma-modules-public/issues/72
@rodrigo I imported your example as superadmin and everything works as expected. When I try to create a schedule as non-superadmin I can't even save it, but I don't think this is the problem you are describing.
From the description I see that you are having problems with a non superadmin user. We will need more information to help you out.
Can you elaborate on what "not working" means? Please provide a detailed step by step procedure that describes what the problem is and how to reproduce it.
Can you provide the full log output or screenshot of the event in the UI you are seeing, I'm unsure of what this means and where you see it: "The event states "Scheduler failed to initialize because user does not hold the required role/s"
@hazel there are no plans to update that documentation, your best bet is to review the code for our modules here:
https://github.com/MangoAutomation/ma-modules-public
If you can be specific about what you are trying to accomplish I might be able to point you in the direction of some code that will help your specific use-case.
@cbyrne I think it is a side affect of why we implemented the 'Sets historical' feature. That is there to allow importing or generating large amounts of historical data which bypass the point-value event system. This prevents an overload of web socket messages and event detectors raising events.
@cbyrne I was just looking through the Script Data Source code and see that if you have the "Sets historical" checkbox checked it won't fire any events to trigger the meta points.
@vanjr something isn't quite right with the image you posted. First try to understand what function code 02 is doing, Read an Input Status at an offset starting from 10001.
https://www.simplymodbus.ca/FC02.htm
Maybe I'm missing something but it doesn't seem possible that there is an input register at location 100001 as that offset from 10001 is larger than the 2 bytes that are allowed for the offset in the protocol message of function code 02. My guess is that there is a display error in the software you are using and the address is really 10001 in which case the offset is 0.
Dear Dillip Funlap,
You are correct I had compiled templates. I removed them and got your error.
After playing with it I found that if I move the desired java source file into the root of the DATA_FILE_TEMPLATE folder and then hit compile new templates it worked. It seems the search for templates to compile will only search the top level of that file store.
Let me know if that works for you too.
@dillfunlap I just went to the Data File Tools tab and hit the compile new templates button on a new un-saved data source and it worked fine?
@cmusselm Sorry guys, there is no way to disable it without disabling all disk usage monitoring using the property: internal.monitor.diskUsage.enabled=false
@robmalone yes, the Script data source and Meta data points retain state while they are enabled. This means you could create an array that exists while the source/point is running to store failed messages. On each run you would check the array and if not empty then try to resend the messages.
Just remember if you stop the point or data source that array will go away. If you need more resilience you could attempt to store the messages, that will be much more complex but is possible.
@cmusselm that is one of the shard files that Mango stores its time series data in. It would have been created by Mango. I don't use Windows but a similar situation in Linux will occur if you started Mango as root, then stopped it and restarted it as a user with less permissions.