• 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