• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. jflores13

    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
    J
    • Profile
    • Following 3
    • Followers 0
    • Topics 10
    • Posts 45
    • Best 3
    • Controversial 0
    • Groups 0

    jflores13

    @jflores13

    3
    Reputation
    487
    Profile views
    45
    Posts
    0
    Followers
    3
    Following
    Joined Last Online

    jflores13 Unfollow Follow

    Best posts made by jflores13

    • RE: Excel Reports Sent at Wrong Time

      Hello, @mattfox .

      I just checked the time zone via SSH and indeed it was set to Denver time (1 hour less) there. Then I used the SSH commands to change to the correct time zone via ~$sudo timedatectl set-timezone, and it worked! Now it displays the right time, which I'm sure will solve the issue.

      Thank you so much!

      posted in User help
      J
      jflores13
    • RE: Spanish Translation

      I could also help if needed; native spanish speaker with proficient english skills. Greetings.

      posted in Development general discussion
      J
      jflores13
    • RE: Help with 3.6.6 UI Menu and More

      @jared-wiltshire Ohhhh! How dumb of me.

      So I was screwing up, my bad practice since the previous UI, just created pages to add menu items and it used to work. Now I added the menu item properly, as "No content", and the page does load! Sorry about that.

      Nevertheless, about the bug in the UI menu editor, it does sound to me like there is one. Hope you can find it without too much hassle, please tell me if I can be of help, if I should try to recreate the error or whatever.

      Thanks a lot, Jared!

      posted in User help
      J
      jflores13

    Latest posts made by jflores13

    • RE: Error saving Scripting DS on v3

      Hi @mattfox ,

      You can indeed! Tags will definitely help in this instance.
      Like I said, we do not need to have your exact code. But! If we can mimic it, you will be in a better position to realise a solution.

      Alright, excellent! Let me first find the time to try and do it on my own, and if something fails I'll let you know how far I got here.

      With your help the emergency is gone for now, so we can take some time to improve it.

      Thank you, have a great day!

      posted in User help
      J
      jflores13
    • RE: Error saving Scripting DS on v3

      Hey, @mattfox !

      Okaaaay I think I get it now, looks like I should really take some time to program and test following your suggestions. From what I'm seeing, the use of "this" might be the key.

      For the RQL query, how can I identify the points if the XID and variable name aren't an option? Can data point tags help with this?

      By the way, it was very dumb from me to use "eval" as a function name example, but that's not my actual function name and I'm not using the javascript eval, was just too lazy to write something like "evaluationFunction" hahaha. I think my function is called something like "calculateResults" in spanish.

      Many thanks once again!
      Greetings.

      posted in User help
      J
      jflores13
    • RE: Error saving Scripting DS on v3

      @mattfox wow okay thank you!

      Just a doubt with this part:

      //Going out on a limb here...
      pt.set(  generateCmdString("id", "LocId") );
      

      This is I think my main problem, what I'm probably not getting is, how can "pt" refer to the different points that I have?

      My lines are mostly:

      location1_deviceId_value1.set(result1);
      location1_deviceId_value2.set(result2);
      ...
      locationN_deviceId_valueN.set(resultN);
      

      So from your ideas (which are great) what I'm still not getting is how to call the different set methods for the different points based on the generated strings? This is probably not possible but if it is, it probably looks kinda like:

      //Generating strings that are the variable names
      var variableNames=generateCmdString(id, locId);
      
      //Calling the read function
      var valuesToEval=readValues(variableNames);
      
      //Reading script variables
      //**my doubt is here
      function readValues(variableNames){
      var values=[];
      for(var k=0; i<variableNames.length; k++){
      values.push(${variableNames[k]}.value); //how to do this?
      }
      return values;
      }
      
      //Analizing
      var results=eval(values);
      
      //Setting
      //**my doubt is also here
      for(var j=0; j<variableNames.length; j++){
      ${variableNames[j]}.set(results[j]); //how to do this?
      }
      

      I'm not sure if this would even be necessary if I followed your approach, but the

      pt.set(  generateCmdString("id", "LocId") );
      

      line confused me a bit. If I'm wrong and this isn't necessary, the part that I'm probably not getting is the first one, where the locations object is defined. Would there be functions inside that object?

      Greetings.

      posted in User help
      J
      jflores13
    • RE: Error saving Scripting DS on v3

      Hey @mattfox ,

      Sorry, I am not allowed to share code here. Will try to explain what's going on though, hopefully you'll be able to understand. Not sure if this is the best approach but this is working atm.

      Yes, it would be awesome to be able to reuse code, probably if I knew more javascript I would already know the way to do so, but for now what makes the lines grow is that the same script sets 440 datapoints and checks values for them too. Those 440 datapoints correspond to 20 locations (same 22 datapoints for each location).

      Right now what happens is that I get a string, this is my context variable. This string first gets split into ID and data, then that ID is looked up in an object array, with an object for each location. According to where it's found it will determine which location corresponds to that ID, enters a switch, and fires a specific function for that location.

      In that function, which is the same for each location and this is why there are so many lines, what happens first is that the specific values for that location are read from the variable names for that location, then stored in an object, then that object is sent to an evaluation function (this function is perfectly reused by all 20 locations) that analyzes them and returns more values, then those values are used to set the location's values using the specific variable names for that location.

      I do have a scructure for variable names, so the only things I would need is the location's id and the id from the data, and from those two IDs I could construct the strings that would represent the variable names to read and set. I mean, I could already generate those strings, but what I don't know how to do is how to pass those strings to a function that reads and sets the variables (datapoints) named as the strings that I generated with those two IDs.

      I hope I am being somewhat clear with my explanation.
      Many thanks in advance!

      posted in User help
      J
      jflores13
    • RE: Error saving Scripting DS on v3

      @mattfox Yes, this helped, had to move around 200 data points to the new source and divide my device group into 2, transfer the devices etc, a bit of a hassle, but now it works better. Some odd behaviour I started to notice is now gone.

      Lesson learned:
      Will keep Scripting source data points below 500 and script lines below 1600.

      Thanks a lot!

      posted in User help
      J
      jflores13
    • RE: Error saving Scripting DS on v3

      @mattfox Will try that, thanks.

      posted in User help
      J
      jflores13
    • Error saving Scripting DS on v3

      Hello,

      I have a scripting datasource on a MangoES that sets lots of different points on change of an HTTP receiver data point.

      Today I tried growing the script with more places I had to add but the Data Source is throwing an error I had never seen before:

      Error saving data source: Internal Server Error — com.serotonin.ShouldNeverHappenException: java.io.UTFDataFormatException
      

      It seems to talk about the encoding, but I didn't change it from one script version to the next one.

      Now, it looks like the data source is disabled even though it's supposed to be enabled.

      The script is about 1,900 lines long.

      Any idea of why this could be happening? I really need to be able to update the data source soon, I'm losing data :(

      posted in User help
      J
      jflores13
    • RE: Difference between MangoES and MangoHTS

      @mattfox got it! Thanks a lot, man!

      posted in Hardware
      J
      jflores13
    • RE: Difference between MangoES and MangoHTS

      @mattfox I tried removing the plastic case but I haven't figured out the trick to release the corner with the red clip that grabs onto the DIN rail. Any advice so I can avoid breaking it?

      posted in Hardware
      J
      jflores13
    • RE: Slack Log Settings - Only one log level?

      Oh well, I'm sorry but I take it back, seems like we can't stop the loop, even with the Log4j approach we are still getting thousands of events. More than 24,000 in a couple of hours. Most of them are like this:

      ERROR 2019-10-29T11:44:19,621 (com.infiniteautomation.mango.slack.event.SlackMessageEventHandlerRT.postMessage:145) - Slack message failed to send java.net.ConnectException: ratelimited at com.ullink.slack.simpleslackapi.impl.SlackWebSocketSessionImpl.connectImpl(SlackWebSocketSessionImpl.java:338) ~[?:?] at com.ullink.slack.simpleslackapi.impl.SlackWebSocketSessionImpl.connect(SlackWebSocketSessionImpl.java:292) ~[?:?] at com.infiniteautomation.mango.slack.event.SlackMessageEventHandlerRT.postMessage(SlackMessageEventHandlerRT.java:122) ~[?:?] at com.infiniteautomation.mango.slack.event.SlackMessageEventHandlerRT.eventRaised(SlackMessageEventHandlerRT.java:67) ~[?:?] at com.serotonin.m2m2.rt.EventManagerImpl.handleRaiseEvent(EventManagerImpl.java:1048) ~[mango-3.6.4.jar:?] at com.serotonin.m2m2.rt.EventManagerImpl.raiseEvent(EventManagerImpl.java:243) ~[mango-3.6.4.jar:?] at com.serotonin.m2m2.rt.event.detectors.PointEventDetectorRT.raiseEvent(PointEventDetectorRT.java:43) ~[mango-3.6.4.jar:?] at com.serotonin.m2m2.rt.event.detectors.PointChangeDetectorRT.pointChanged(PointChangeDetectorRT.java:54) ~[mango-3.6.4.jar:?] at com.serotonin.m2m2.rt.dataImage.DataPointRT$EventNotifyWorkItem.execute(DataPointRT.java:817) ~[mango-3.6.4.jar:?] at com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl$RejectableWorkItemRunnable.run(BackgroundProcessingImpl.java:632) ~[mango-3.6.4.jar:?] at com.serotonin.timer.Task.runTask(Task.java:179) ~[mango-3.6.4.jar:?] at com.serotonin.timer.TaskWrapper.run(TaskWrapper.java:23) ~[mango-3.6.4.jar:?] at com.serotonin.timer.OrderedThreadPoolExecutor$OrderedTaskCollection.run(OrderedThreadPoolExecutor.java:336) ~[mango-3.6.4.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_172] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_172] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]
      

      Couldn't find out what is triggering these changes that raise the event detector.

      Tried turning off the "Error" data point but now the "Warning" one is also sending weird messages, like this one:

      WARN 2019-10-29T12:01:45,429 (com.serotonin.m2m2.web.dwr.MiscDwr.jsError:167) - Javascript error Description: Error: Tried to register widget with id==chartRendererSelect but that id is already registered Page: http://192.168.100.33:8088/resources/dojo/dojo.js?v=1571864830 line 345 > Function line 3 > eval Line: 2 Browser name: Firefox Browser version: 71 osName: Windows location: http://192.168.100.33:8088/data_source_edit.shtm?dsid=498 @ Oct 29, 2019 12:01 PM
      

      We are getting this message when we try to edit the Log4j data points in the old UI (so we can access the event detectors and the purge now button). Explanation below:

      Strangely, when we try to edit the data source in the old UI, the "Data points" tab is not existent inside the data source. So I look for the points in the global "Data points" tab, where all data points appear, I filter them by name to find the Log4j Slack Messages Data Points, but most times, when I click the edit (pencil) button on any of the 4 data points, I only get the above "Warning" message in Slack and this same message on a blue box in the old UI:

      Error: Tried to register widget with id==chartRendererSelect but that id is already registered
      

      It works super randomly; I seldom get to edit the data point. It's a strange behaviour, something I never saw before with any other data source. I did add the line @terrypacker suggested in the log4j2.xml, inside the loggers section, and restarted it btw.

      Is there a quick fix to this? Thanks!

      posted in Mango feedback
      J
      jflores13