• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. BG
    3. Posts

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    • Profile
    • Following 0
    • Followers 0
    • Topics 55
    • Posts 200
    • Best 8
    • Controversial 0
    • Groups 0

    Posts made by BG

    • RE: Rate of Change Detector - Looking for real world use cases.

      @terrypacker I know this thread is a year old but we are now trying to set up a display to capture this event and I have been searching the forum when I saw your entry. I am not sure if you are still looking for cases but I have one.

      We have set up a monitor and display that is checking rainfall levels, reservoir levels, and discharge flow rates into rivers and drainage systems for a flood prevention service. Obviously this is a hot topic these days and companies are spending a lot of time to gather, monitor and log this information. Our system is just the online portion of this system and the company will use the information as a kiosk style display so that the main office can see what is happening across the various points at a glance.

      We have set up 2 sets of high alarms, the first an amber warning and the second a red critical warning for the levels and flow rates. We have also set up the Rate Of Change event detector for the flow rates that will alert on an increasing rate of change and a decreasing rate of change so the users will alerted to the flood potentials.

      On test the system works well and thankfully since the system went live we have not had an event yet. I like the Rate of Change Event Detector for this type of application as it can give an early indication of the flood potential before the actual reservoir levels have reached the warning levels.

      Cheers
      Brian

      posted in Mango feedback
      BGB
      BG
    • RE: Error while checking certificates

      @jcaballeroa
      I am sorry I can't help with your error, but I am very interested to know how you get on with your tests with mango 5. We are also considering the move from 3 to 5 ourselves and I haven't had the time to test 5 yet.

      Cheers
      Brian

      posted in User help
      BGB
      BG
    • RE: Scripting Data Source to create a parameter

      @MattFox Hello Matt,
      Thank you very much for spelling that out to me.
      Here's the rub though.

      I am trying to use a timestamp to update an integer. So on validation I got this message:

      Setting point 0100raw - 0100-zflag to 2024-03-14 09:20:00.0 @ 12 Apr 2024 07:54:01 UTC

      What I really need is the parameter to set a 1 when the timestamp updates.
      In the old point links I had a simple line,

      Return '(1)';

      So I tried something actually quite simple once you know. I left the timestamp as the update context and used this script:

      target.set('(1)')

      I assumed that the example Phil put on the forum all those years ago required me to assign the target and source point in the script code.

      Sometime I can't see the forest for the trees.

      So HUGE THANKS Matt. I can now get my system running and I now know how to take it into Mango 4 hopefully.

      Cheers
      Brian

      posted in User help
      BGB
      BG
    • Scripting Data Source to create a parameter

      Hello all,
      In Mango 3.7.12, Can anyone tell me how to write a script in the Scripting Data Source that would create a parameter that can then be picked up by a SQL Data Source script to use for setting a value in the MySQL database table?

      This to replace the Point Links feature where the source and target were from drop down lists.

      Cheers

      Brian

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 restore

      @MattFox Hello Matt,
      Sorry for my ignorance, but I ran your code in my SQL console and I got an error.

      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'var dbProxy,JDBC,sqlClassInstance; var DatabaseProxy=com.serotonin.m2m2.db...' at line 1

      I am not sure if I was supposed to change any of the the values.

      Cheers
      Brian

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 restore

      @MattFox Hello Matt,
      Yes they are on the same server just different databases. I hadn't thought about copying the data to a table in the Mango MySQL Db.

      Would that solve anything?

      Cheers
      Brian

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 restore

      @MattFox Instead of starting a new thread I will explain what we are doing here. I don't think too many people are searching for Mango 3 solutions anymore.

      Our dataloggers have the ability to store its data locally during a mobile data connection loss. Once the data connection is restored the logger could potentially upload 100K rows of data to the MySQL database in a very short period of time. The other eccentricity of the loggers is that the digital channels only send data on a state change. we do not get an the current digital state value on every record that is sent.

      So we need to be able to read the data from earliest to latest, and if there is no new data, mango needs to be able to go back to the last non null digital point found in the already read rows of data.

      So to make sure Mango reads the data into the NoSQL database sequentially in timestamp order, we use the flag method to mark which rows have been read and identify the next row to be read.

      We use a SQL data source to bring the data into mango, then use a Meta data source to scale the data for display on the dashboards, trigger alarms etc, as you know.

      In the SQL data source we have a series of coalesce select statements as shown:

      Select date, flag,
      coalesce(
               	(SELECT an1 FROM staging_all where grd_id = 0100 and flag = 0 order by date asc limit 1), 
               	(SELECT an1 FROM staging_all where grd_id = 0100 and flag = 1 and an1 IS NOT NULL order by date desc limit 1)
                           ) as an1,
      coalesce(
               	(SELECT an2 FROM staging_all where grd_id = 0100 and flag = 0 order by date asc limit 1), 
               	(SELECT an2 FROM staging_all where grd_id = 0100 and flag = 1 and an2 IS NOT NULL order by date desc limit 1)
                           ) as an2
      coalesce(
               	(SELECT i1 FROM staging_all where grd_id = 0100 and flag = 0 order by date asc limit 1), 
               	(SELECT i1 FROM staging_all where grd_id = 0100 and flag = 1 and i1 IS NOT NULL order by date desc limit 1)
                           ) as i1,
      coalesce(
               	(SELECT i2 FROM staging_all where grd_id = 0100 and flag = 0 order by date asc limit 1), 
               	(SELECT i2 FROM staging_all where grd_id = 0100 and flag = 1 and i2 IS NOT NULL order by date desc limit 1)
                           ) as i2
      from staging_all 
      where grd_id = 0100
      and flag = 0
      order by date asc 
      limit 1;
      
      
      

      This works well for us and as you can see gives us the choice of picking the earliest unread or the latest read row of data.

      I then have a data point in the SQL data source called zflag that had this statement:

      UPDATE GRDXF.staging_all SET flag= ?  WHERE grd_id=0100 AND flag=0 ORDER BY date ASC LIMIT 1;
      

      The question mark is the integer parameter assigned via the point link which just says "Return 1;"

      I tried putting that line in the SQL data source code as below without the parameter ?:

      Select date, flag,
      coalesce(
               	(SELECT an1 FROM staging_all where grd_id = 0100 and flag = 0 order by date asc limit 1), 
               	(SELECT an1 FROM staging_all where grd_id = 0100 and flag = 1 and an1 IS NOT NULL order by date desc limit 1)
                           ) as an1,
      coalesce(
               	(SELECT an2 FROM staging_all where grd_id = 0100 and flag = 0 order by date asc limit 1), 
               	(SELECT an2 FROM staging_all where grd_id = 0100 and flag = 1 and an2 IS NOT NULL order by date desc limit 1)
                           ) as an2,
      coalesce(
               	(SELECT i1 FROM staging_all where grd_id = 0100 and flag = 0 order by date asc limit 1), 
               	(SELECT i1 FROM staging_all where grd_id = 0100 and flag = 1 and i1 IS NOT NULL order by date desc limit 1)
                           ) as i1,
      coalesce(
               	(SELECT i2 FROM staging_all where grd_id = 0100 and flag = 0 order by date asc limit 1), 
               	(SELECT i2 FROM staging_all where grd_id = 0100 and flag = 1 and i2 IS NOT NULL order by date desc limit 1)
                           ) as i2
      
      from staging_all 
      where grd_id = 0100
      and flag = 0
      order by date asc 
      limit 1;
      
      UPDATE GRDXF.staging_all SET flag= 1  WHERE grd_id=0100 AND flag=0 ORDER BY date ASC LIMIT 1;
      
      

      This works manually in the MySQL workbench but this failed in Mango. I think the reason it fails in Mango is that the SQL data source is a read only unless the data point has the Modify Table attribute ticked. So I can't add the update statement to the data source SQL code.

      I did some digging in the forum from the time when IAS was going to remove the point links after version 3.7.7 and the only comment I could find was that point links could be accomplished in the Scripting data source but didn't give much more detail on how. I apologise if the "How" was in the early form but i didn't find it.

      So I started to look there and first of all I can't see how to create a connection to the MySQL database as in the SQL data source.

      Then as I am writing this I started to realise that I think I am supposed to use the Scripting data source to recreate the Source Point and the Target point that was chosen as drop downs in the Point Link. And if that IS the case, that is where I am stuck.
      I am researching about using Ecmascript to use target and source points to provide a parameterised integer to my SQL data point that can modify the table.

      Once I have that figured out I think our system will be back to normal.

      Thank you for your time in reading this lengthy post. :)

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 restore

      @MattFox Thank you for your offer of help Matt.

      I think I will stick with version 3.7.12 for now an figure out how to get the system running without the point links. After the recent crash it has highlighted the need to stay more relevant in regards to database versions and Linux versions which also mean we should think about moving towards Mango 5 with a stop over in Mango 4 just to be sure everything is still working. And in no future that we see for the Mango service will point links return. A shame because I found them an easy and simple way to achieve what we needed.

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 restore

      Hello All,
      The restore process was almost a success.

      The process went ok. I managed to get the NoSQL back up restored via the legacy pages, the MySQL restored via the new system settings pages and the json configuration imported via the new configuration import/export page.

      The automatic back ups did not back up the filestore but I happened to have a recent copy of that folder so I was able to restore all of the images I created for my dashboards as well as the excel report templates in use,

      The only problem I encountered and it is a major problem for us, is that we had to install 3.7.12 as it is the only Mango 3 option available and that version does not have the Point Links feature.

      All of our loggers used the Point Link Feature to change a flag data cell on each row of data in the MySQL table after the row was read into Mango.

      I am now left with trying to figure out how to get the MySQL data row read into Mango using the Scripting Data Source. And I am struggling but I will put that into the forum under a new thread with more details.

      Cheers
      Brian

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 Install on new AlmaLinux9

      @lgorence Hello Liv, and anyone else who comes across this thread.

      I discovered that the AlmaLinux 9 was not allowing the Mango 3 install to complete due to permissions. Even after making the mango user the owner of the /opt/mango folder
      the install still failed at the last module and kept trying to restart itself over and over again.

      I recursively set the execute permission on the mango folder for the mango user and the install completed and we were able to get to the log in screen and pick up the correct license file.

      That seems to have been the crux of the whole install problem.

      Cheers
      Brian

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 Install on new AlmaLinux9

      @lgorence
      Hello Liv,
      Thank you for your reply. I have a support ticket now. So I guess I will work through the problem there. Your colleague referenced your advice as well and I will try that tonight.

      I will post our solution here for others using Mango 3 to reference .

      Thank you
      Brian

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 Install on new AlmaLinux9

      @lgorence
      Hello Liv,
      Thank you for replying to my question on the forum.
      First of all, our HOME/.ma file has a permission set of 0644 with the owner as root.
      Please confirm that is appropriate setting.

      Our previous Linux distro was Centos 7 but the web hosts could rebuild that distro due to its end of life. During the rebuild we discovered that the Mariadb version and the Plesk version were all end of life as well.

      So now we use AlmaLinux 9 as it was supposed to be the closest to Centos 7. (Should have gone with Debian as Matt Fox suggested in one of my recent forum questions) I think it is what you call a shared databsse cluster. The web server is a dedicated physical box but set up so that I can set up and sell multiple domains. I don't use it like that but it is set up like that. The Plesk control panel is the GUI for the server and database settings and has been updated to Obsidian 18 and it has at least one major change in that we can't create databases remotely. One article in the Plesk forum says this is by design. I have a user with all rights and from any where wild card set but it still won't let me create a new db from mysql workbench on my desktop. Not sure what's going on there to be honest. But just in case, I created the db mango from the plesk control panel, then went through the set up procedure and hit that error right at the end of the install procedure that is in the Mango 3 documentation. No tables have been created in the mysql mango db yet.

      Now, if this related to the Java version, I have openjdk version 21 running on the server. It may be that this is too new. I didn't want to go making changes on the server in that regard until I had some advice from people that a lot more about this than I do. :)
      Let me know if you think I need to install an earlier version. I cannot remember what we had on the previous server but it would have been something from about 5 years ago and I think the Java licensing came into affect after that.

      Thank you for your help.
      Cheers
      Brian

      posted in User help
      BGB
      BG
    • Mango 3.7 Install on new AlmaLinux9

      Hello,
      I am hoping someone can help me out.

      After our server crash and rebuild, the web host company had to put AlmaLinux9 on the server.

      I have been trying to re-install mango 3.7.12 with my downloaded zip.
      I have tried using the script found in the Mango 3 documentation. I have also run through the steps manually. But it seems that so many other items have changed since Mango 3.7 came out.

      The web server does not let applications or remote connections create databases. So I had to create the databases from the Plesk control panel first.

      I am at the point that this error has occurred and I am not web savvy enough to figure out how to get past this hurdle. I would be very grateful if anyone can tell me how to get past this point.

      [root@m-2-m ~]# systemctl start mango
      [root@m-2-m ~]# systemctl status mango
      ● mango.service - Mango Automation
           Loaded: loaded (/etc/systemd/system/mango.service; enabled; preset: disabled)
           Active: active (running) since Tue 2024-03-26 10:41:24 UTC; 19s ago
          Process: 5060 ExecStart=/opt/mango/bin/start-mango.sh (code=exited, status=0/SUCCESS)
         Main PID: 5064 (java)
            Tasks: 38 (limit: 202900)
           Memory: 388.7M
              CPU: 10.531s
           CGroup: /system.slice/mango.service
                   └─5064 java -server -Dma.home=/opt/mango com.serotonin.m2m2.Main
      
      Mar 26 10:41:27 m-2-m.com start-mango.sh[5064]: SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
      Mar 26 10:41:27 m-2-m.com start-mango.sh[5064]: SLF4J: Ignoring binding found at [jar:file:/opt/mango/lib/log4j-slf4j-impl-2.16.0.jar!/org/slf4j/impl/S>
      Mar 26 10:41:27 m-2-m.com start-mango.sh[5064]: SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
      Mar 26 10:41:28 m-2-m.com start-mango.sh[5064]: Unable to determine the machine id
      Mar 26 10:41:28 m-2-m.com start-mango.sh[5064]: FATAL (com.serotonin.m2m2.Lifecycle.loadLic:591) - Unable to determine the machine id
      Mar 26 10:41:28 m-2-m.com start-mango.sh[5064]: ERROR (com.serotonin.m2m2.Main.main:162) - Error during initialization
      Mar 26 10:41:28 m-2-m.com start-mango.sh[5064]: java.lang.RuntimeException: Unable to determine the machine id
      Mar 26 10:41:28 m-2-m.com start-mango.sh[5064]:         at com.serotonin.m2m2.Lifecycle.loadLic(Lifecycle.java:594) ~[ma-priv-3.7.12.jar:?]
      Mar 26 10:41:28 m-2-m.com start-mango.sh[5064]:         at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:276) ~[ma-priv-3.7.12.jar:?]
      Mar 26 10:41:28 m-2-m.com start-mango.sh[5064]:         at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.12.jar:?]
      
      [root@m-2-m ~]#
      

      Thank you for any help help given.
      Cheers
      Brian

      posted in User help
      BGB
      BG
    • RE: Mango 3.7 restore

      @BG Thank you very much Matt. I will follow your advice.

      Cheers

      Brian

      posted in User help
      BGB
      BG
    • Mango 3.7 restore

      Hello Mango Forum,
      We have had a database corruption in the MySQL tables. I have reinstalled the MySQL server/service and am wondering about the restore process for Mango 3.
      We have weekly back ups so I would not be losing too much in the way of data and configurations.
      my questions is:
      Will the Mango restore process also restore the MySQL tables?
      Will the restored backup be restored into a newer version of MySQL tables?

      Thank you for your help.

      Cheers
      Brian

      posted in User help
      BGB
      BG
    • RE: Linux Version advice needed

      @MattFox Thank you very much. That puts my mind at ease a bit more now.

      Cheers

      Brian

      posted in User help
      BGB
      BG
    • Linux Version advice needed

      Hello All,
      I hope everyone will have a happy and healthy 2024.

      I just saw today that our Centos7 server is coming up for its End Of Life. Not sure how long this has been announce but I only just now saw it while researching MQTT broker software for a now project on our Mango 3.7 system.

      Does any one have any advice on which Linux version works well with Mango 3.7 going forward and not looking like it will end in the near future? Any experience with Centos-Stream?

      Thank you for your time.

      Cheers
      Brian

      posted in User help
      BGB
      BG
    • RE: User Permissions

      Hello Zaaphod,
      Unique roles are added in the user menu. When creating a new user we add the user name to the "Roles (permission groups)" setting. This creates a new user role in the system. We then assign that role to the read / set settings on the data points and dashboards as needed.

      29233e04-e72e-4b0a-8f1a-dd221c37e9ca-image.png

      I hope this is what you were looking for.

      Cheers

      Brian

      posted in User help
      BGB
      BG