• I
    iperry

    Heya,

    Wondering if anyone has had any experience interfacing Mango with Digi RM (https://remotemanager.digi.com/)? I am trying to use either a HTTP Json receiver or retriever but haven't had much luck yet. Just wondering if it possible (good or bad experience) before I recreate a middleware app I used for another similar project.

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    For another option, the strategy I took was that I created global scripts to create the data points (MQTT/Modbus, virtual, meta) for my devices.

    The scripts I have are:
    dataPointJsonTempates
    --> This script contains the minimal set of values I need to set for each type of data point.
    createDataPointFunction
    --> This script contains the list of points I need for each of the devices. It loops through each list of points and calls the appropriate function below.
    createDeviceFunctions
    --> This script creates each of the appropriate data point, event detector, and event handlers.

    The intention was to detect the error generated when an unknown MQTT topic is subscribed to and create the required data points from the device id in the topic. I haven't gotten that working yet but it is a lower priority item at the moment.

    For now, I have a scripting data source to call the function:
    createDevice('PCU_110006');

    I have created multiple 'createDataPointFunctions' scripts for the different devices I need. The same pattern is applied.

    Ian

    posted in Mango Automation general Discussion read more
  • I
    iperry

    Hi Phil,

    Good to know I wasn't missing something simple.

    I have created a simple component that stores and displays the timestamp only when the value changes:

    <ma-point-values point="pPCUAccelCnt" values="point1Values" latest="1" realtime="true"></ma-point-values>
    <sca-latest-timestamp value="{{point1Values[0].value}}" timestamp="{{point1Values[0].timestamp}}"></sca-latest-timestamp>
    

    Once I get some new test devices (and updated data), I will see if this works. :)

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Heya,

    I am stumped with what seems a simple thing: displaying the latest history timestamp for a data point.

    A have a MQTT data point whose topic is being updated every 30 secs (ish). However, the value of the data point may only change once a day for example. I have set the data logging of the point to be "When point value changes".

    0_1566246510436_fb5df63f-38d6-45d3-86ac-78afeafb82e7-image.png
    Note: I originally had the data logging set to "timestamp changes", as showed in the history.

    When I display the timestamp, I get the current value "Aug 14 16:38" which is updated every 30 secs. I get the same behaviour when I display the values returned from ma-point-values. When I added realtime="false", the correct timestamp is displayed but is never updated unless the screen is refreshed.

    0_1566246877416_6a570a4b-1132-48e8-8b88-16b05db1b866-image.png

    <ma-calc input="psPCU | filter: {name: 'PCU Accel Event Count'} | maFirst" output="pPCUAccelCnt"></ma-calc>
    <ma-get-point-value point="pPCUAccelCnt"></ma-get-point-value>
    
    *{{pPCUAccelCnt.lastValue()}}*
    <span>Acceleration Count: <strong><sca-display-na value="{{pPCUAccelCnt.value}}"></sca-display-na></strong></span>
    <span>Latest Acceleration: <strong><sca-display-na value="{{pPCUAccelCnt.time | maMoment:'format':'MMM D, YYYY h:mm:ss A'}}"></sca-display-na></strong></span>
    Count ma-point-value: <ma-point-value point="pPCUAccelCnt" display-type="dateTime" date-time-format="LTS"></ma-point-value>
    Count ma-point-values: <ma-point-values point="pPCUAccelCnt" values="point1Values" latest="1" realtime="false"></ma-point-values>
    {{point1Values[0].timestamp | maMoment:'format':'MMM D, YYYY h:mm:ss A'}}
    

    As in my example above, I have tried a variety of ways to display the latest history timestamp but without success. I don't want to use the realtime flag either. For a shot, I tried getting the lastValue but I knew it wouldn't work.

    I could route the data point through a meta point to capture the timestamp but this is extra complexity for which seems something simple.

    Is there something simple I am missing? heh

    I encountered this before when displaying the timestamp of a virtual point. I discovered the polling update interval changed the timestamp. Turning the polling off fixed that issue.

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Hi Phillip,

    This may/may not be of help but this looks very similar to a problem I had:
    https://forum.infiniteautomation.com/topic/3721/confusing-behaviour-using-json-store-and-ng-map-info-window

    I don't have any updates on my issue there as other things became priority. heh

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Hi @pyeager

    If each of your devices physically reside on a different modbus network, then I would agree that having each device within its own data source would make sense.

    When I started out with another pilot, all of the modbus devices were on the same network, i.e. same host/port, so I used the same organization as I described previously. I had multiple devices with the same set of data points in one data source.

    When I first created the data points for the devices, I was a little confused when the device name was defaulted to the data source name. However, it seemed to me that "device name" of the point should relate to the data point and not to the data source. For me, it seemed the data source should be a group of points related by their physical source. The naming was arbitrary.

    posted in User help read more
  • I
    iperry

    Perhaps but we could be haggling over terminology and not usage of the value.

    In my situation, I have a pilot project with 80 devices each with 12 MQTT sensor values. It would seem to be a much larger maintenance and organization problem to have each device contained in its own data source, which all connect to the same MQTT broker.

    posted in User help read more
  • I
    iperry

    Hi @pyeager

    The way I have organized my data points, I would hope that renaming the data source would NOT rename the device names of its data points. My strategy is that the data source has a generic name versus its data points.

    For example, these are my data sources:
    0_1564777298218_05fd242f-0abc-4a10-ae38-b3ec4c127815-image.png

    Within the MQTT data source, I have multiple devices with the same set of data points:
    0_1564777400216_00774b9b-b21b-42f2-b599-8902388a7a6a-image.png

    My belief is that the data source name should be independent of the name of its data points. Sure they could be the same, depending on your organization strategy.

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Excellent... thanks! That looks to have worked. :)

    posted in User help read more
  • I
    iperry

    I deleted the graphicalViews directory but the exception is still being thrown. As a confirmation, I checked the log and the graphicalViews module is no longer being loaded. I also cleared out the work directory to be sure.

    Also, the machine is an Intel Atom.

    posted in User help read more
  • I
    iperry

    Hi Phil,

    I will confirm the processor being used.

    I downloaded the 3.6.4 zip and deployed it into a separate directory. When the application is launched, it gets stuck again at 85% but I get the following error:

    INFO 2019-08-02T10:46:22,894 (com.serotonin.m2m2.rt.RuntimeManagerImpl.initialize:176) - Starting 0 Publishers...
    INFO 2019-08-02T10:46:22,894 (com.serotonin.m2m2.rt.RuntimeManagerImpl.initialize:188) - 0 Publisher's started in 4ms
    Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
    at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
    at com.serotonin.m2m2.view.ViewGraphicLoader.loadDirectory(ViewGraphicLoader.java:109)
    at com.serotonin.m2m2.view.ViewGraphicLoader.loadModuleGraphics(ViewGraphicLoader.java:56)
    at com.serotonin.m2m2.view.ViewGraphicLoader.loadViewGraphics(ViewGraphicLoader.java:44)
    at com.serotonin.m2m2.Lifecycle.imageSetInitialize(Lifecycle.java:1479)
    at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:363)
    at com.serotonin.m2m2.Main.main(Main.java:143)

    I didn't see this previously.

    Thanks
    Ian

    Note: this error is only visible on the console. It is not recorded in the ma.log

    posted in User help read more
  • I
    iperry

    Hi Phil,

    For this deployment, we installed the openJDK:

    openjdk version "1.8.0_222"
    OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
    OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

    Funny enough we have been using the Oracle JDK for all our other deployments.

    Aside: we are concerned about using Oracle JDK v8 and the new licensing for future deployments.

    Thanks
    Ian

    Update: As suggested by Matt, I did review the permissions and ownership on the DB files (and all files) and they look correct. I also deleted the work folder. No change. I don't think it is an issue with permissions as the log shows the database starting, etc. I have commented out the store in other deployments and it has worked as expected.

    Perhaps one thing interesting is that even though the application appears stuck the log continues to be updated that the MQTT connection cannot be established. This would indicate at least the server is perhaps working as expected.

    posted in User help read more
  • I
    iperry

    Heya,

    I copied an installation from one PC to another and when trying to start the copy, the boot up is stuck at 85%. I have tried restarting the app a few times and it stops at the same percentage each time.

    0_1564702757632_855430f9-13e2-48ff-821a-d69e8303d3fa-image.png

    I have copied installations around without issues but this is the first time I have seen this behaviour.

    I have cleared the browser cache without any success.

    Any suggestions? Trying to avoid having to build this installation from scratch.

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Hi Phil,

    I increased the default cache size to 6 as you suggested and the data points appear to be all created. Thanks! I will continue to monitor the data for any issues.

    @phildunlap said in Inconsistent values between MQTT and meta points:

    It could perhaps be solved by a faster machine

    This Mango instance is currently running on a 2 core Linode VM so I don't believe that the machine is really a factor here. Perhaps the amount of memory could be increased but the VM looks to be running ok. I will likely review the amount of memory needed once I implement the default cache change on all the necessary points.

    As an aside: as above, I am currently passing only the value I need to the global function, instead of the entire point (or context). Is there any downside to passing the whole object to the function and let it get the data it needs? Is there a preferred pattern to use?

    i.e. return calcTemperatureWithOffset('L1-CS02-02', p3452, 0);

    I am thinking ideally that since I have to update the function call to all the necessary points, passing the object would be better. Then any future changes would be limited to only the global function.

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Hi @phildunlap

    The solution you proposed works... most of the time. After I implemented the solution, the data was changing as I expected over the hour time period:
    0_1562193334677_754c5ee0-2f20-42dd-9342-fb5de077ec08-image.png

    However, as I continued to monitor the data, I was seeing gaps:
    0_1562193421306_221dce86-339c-4c5c-99b1-afbae3677693-image.png

    The gaps appear to match errors that I was seeing in the events table:
    0_1562193541388_2f3b421c-11f5-4c61-9604-a252bf3fa460-image.png

    Global function call in meta point:
    return calcTemperatureWithOffset('L1-CS02-02', p3452.pointValueAt(CONTEXT.getTimestamp(), true).doubleValue, 0);

    It seems like the context is not available when (sometimes) the function is called? It is odd/interesting that the correct value is returned most of the time.

    Any ideas?

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Hi @MattFox

    1. Which point values are you referring to? The meta point values? They should be updated when the MQTT point changes, which in this case is 6 time in < 1 sec.
    2. Correct, the updates to the MQTT topics (and thus the MQTT points) occur within a span of a few milliseconds.
    3. Not quite (I think). To me it seems that the meta data point is not updating fast enough in response to its context point (the MQTT point). The meta point should be updating 6 times < 1 sec like the MQTT point.

    I noticed something in your response. Is there a difference between?
    return calcTemperature...
    versus
    myPoint.set(calcTemperature...)

    To me its odd/interesting that the timestamp of the meta point values are consistent with the MQTT point but the value isn't. To me this would seem the meta point is changing sorta right? heh

    Is there maybe a synchronization issue with using the global function?

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Hi @Jared-Wiltshire

    I don't doubt that the removal has not been a secret but it was the first time I had seen that statement in a posting. It is great that the UI is improving.

    There is nothing that prevents me from using the new UI. When I started using Mango, I think I found the old user more concise and seemed to provide more information at a view. Since then, it has just been habit to use it. I like the white background when using applications as opposed to the black/grey of the newer layouts (not just Mango) but that is just my preference.

    I will be making a more cognizant effort to use the new UI.

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Heh good to know the legacy pages will be removed. I have been using them much more than the newer UI. This might be something to make a more "loud" announcement about so we can adjust a head of time. ;)

    posted in User help read more
  • I
    iperry

    Heya,

    Mango version: 3.5.6

    I am trying to resolve an issue with differences between values recorded by a MQTT data point and its associated meta data point.

    Data flow:

    • Device transmits messages on an hourly basis, which contains sensor values for each 10 minute interval during that previous hour (thus 6 packets of values)
    • MQTT service receives these messages, parses them, and posts the values to the topics. The date/time for each packet is set to the appropriate 10 minute interval it occurred on. All 6 values are published to the topic in < 1 sec
    • (Mango) MQTT client receives these changes to the topic. The meta point is changed based on the context change

    The values recorded by the MQTT data point are:
    0_1561575146595_f592f382-b79b-489c-9031-2441c9e70030-image.png

    The value recorded by the meta data point are:
    0_1561575174176_b57c4e4f-b8b0-4f3f-9943-86ccb74e3dff-image.png

    The pattern is interesting: the first and last values in the hour are consistent. The middle 4 values are the same as the last value.

    The meta point currently calls a global function to process the raw value. However, for this value (temperature), no manipulation is occurring. The same value should be returned by the meta point.

    0_1561575567638_e2ac7d37-c324-4419-880b-0aad92dfc971-image.png

    The logging properties of the meta point is when timestamp changes.

    My belief is there is a timing issue as maybe the rapid changes to the topic are occurring too quickly. I have been using this process for other projects successfully but the updates to the topics have been > 30 secs.

    Are there considerations I need to make if changes to a data point occur at millisecond frequency? Any insights would be great.

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Hi Phil,

    Ahhh thanks! I figured it most have been something I missed.

    Setting "Script data point read permission" to "superadmin" worked!

    The /facepalm for me was that I was sure I had it working correctly before. I had created a script to create the handlers as they were going to be applied to a large number of data points (and event detectors). Likely I had missed this value in the script which has lead to some frustration. Whopps.

    This is the current version of Mango (3.5x).

    I haven't upgraded to the beta version yet as I usually shy away from these versions. ;) I also am trying to keep my version consistent with a few trials we have in progress until I can upgrade them all.

    Thanks again,
    Ian

    posted in User help read more