• 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
  • I
    iperry

    Heya,

    I am having some issues/confusion regarding the resources that are available in an (email) event handler.

    I have a test script data source that retrieves the point hierarchy and list of data points and prints their length:
    0_1558724609581_1afb94b6-18cd-43fa-baef-ceffde00e7c8-image.png

    When I copy the same code to an event handler script, the lengths are 0 (or undefined):
    0_1558724802490_e747b8b6-05ce-4205-9044-840408e422c9-image.png

    Is the configuration and data point query not available in the event handler?

    Aside: it's sometimes a challenge that the logging behaviour is not the same between a data source and event scripting. Unless logging is turned on in a data source script, log statements will not be displayed when validating the script. However, they will be displayed when validating an event handler script. This is kinda understandable considering there is no explicit switch for logging in the handler (which would be nice to have).

    This there something I am missing?

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Hi @phildunlap

    Ahh, ok makes sense that meta point cannot trigger its own execution to avoid loops. I guess the way I read the overview in the pop-up help lead me to think that.

    Hitting the refresh button on a meta point triggers a script execution.

    Where is this button? This might have potential.

    Thanks
    Ian

    posted in User help read more
  • I
    iperry

    Heya,

    I am trying to create a meta data point so that once the user updates its value, a script is executed to update other points. According to the point details help, I should be able to add itself to the context once the point has been initially saved.

    0_1558033082192_8559359a-d95a-45f2-b931-f64d42c449b1-image.png

    Once the point has been created and saved, I see the point in the script context droplist but when I try to select it, nothing happens. I can add other points without issue but not the current point. I have refreshed the data sources page just in case but that didn't help. I thought the point needed to be enabled but that didn't help.

    I'm I missing something?

    Thanks
    Ian

    PS: the help window is a bit out-of-date as it refers to clicking a plus sign to add a point to the context.

    posted in User help read more