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

Multiple Set Points in Event Handler


  • Hi IA crew,

    Is it possible, and do you think it would be of an advantage to have the ability to set more than just one Target point in the Set Point TAB of Event handlers.

    Application example would be irrigation, where it would then be easy to change the zones that come on for the times set in Advanced Scheduler.

    Hayden
    AU


  • Why not set a virtual binary point and use that to trigger a scripted datasource to fire off multiple points in one go as I suggested in your last forum post?
    AFAIK the purpose of setting a single point is for status flags anyway to trigger some form of UI status update or another event in the chain.
    I work in the agriculture sector myself and whilst the advanced scheduler is handy, it lacks the ability to add logic if you're alternating groups, or need to extend/reduce the irrigation time if fill point capacity is not reached, that's why using it in conjunction with a script makes it more versatile.

    EDIT:
    Sorry I delved further and found this.
    I looked into the legacy page for this, it appears it can already be done. Chances are it probably in the pipe works if not done already:
    0_1564615821851_32ceedd7-bbcf-4941-8e79-7555698e32e9-image.png
    As you can see, you can set multiple context points and do it all here.
    I take it it's more the case you want to be able to have someone be able to do this on the fly with the mangoUI rather than the legacy backend.

    Fox


  • Thanks for the reply Fox.

    I understand that it is possible (more that one way), however you point about the USER being able to do this easily is what I am suggesting.

    There is also the angle of NOT having the user do it, but PAYING us to do it. Probably makes financial sense for a return on our time learning this platform.


  • @hayden_aus my thoughts exactly, have it set up as part of your configuration fee.

    @hayden_aus said in Multiple Set Points in Event Handler:

    I understand that it is possible (more that one way), however you point about the USER being able to do this easily is what I am suggesting.

    I'd argue this is likely in development as infinite intend to bring all legacy pages forward into angularJS components.


  • Hi Hayden,

    As Fox suggests it is possible to add additional points to the context of the event handler and then call .set() on them. One can also use the DataPointQuery object in the script to dynamically grab a list of points using XIDs or RQL.

    I understand that it is possible (more that one way), however you point about the USER being able to do this easily is what I am suggesting.

    I would advise giving the user an interface that sets information into an alphanumeric point, and then using that information to construct your set of points to set whatever value to in a scripting data source, which has the same ability to set to context points, be triggered by an event like a context update, etc. Maybe the encoded values are zones and runtimes, so you can use the zone to query for a zone tag on the points and set it with a runtime, for instance. Hard to be more specific without really getting into how / what you're implementing.

    var encodedData = alphanumericPoint.value.split(":"); //i.e. east-raised-beds:30
    var zoneDataPoints = DataPointQuery.query('eq(tags.zone,' + encodedData[0] +')&limit(1000)');
    var runtimeValue = parseInt(encodedData[1])); //maybe runtime minutes?
    for( var k = 0; k < zoneDataPoints.length; k+=1 ) {
      if( zoneDataPoints[k].runtime !== null )
        zoneDataPoints[k].runtime.set(runtimeValue);
    

    @MattFox said
    I'd argue this is likely in development as infinite intend to bring all legacy pages forward into angularJS components.

    While that's true for the most part (there is limited future support for the Graphical Views module for instance), it doesn't sound to me like that'd solve how his users are going to identify points they want to control and control them easily. That's going to be an issue only his implementation of a dashboard / Mango could completely solve.


  • @phildunlap said in Multiple Set Points in Event Handler:

    it doesn't sound to me like that'd solve how his users are going to identify points they want to control and control them easily. That's going to be an issue only his implementation of a dashboard / Mango could completely solve.

    Agreed, but as he was only able to give an example without greater in depth information on the desired outcome, only wishing to be able to add multiple points to a context. I'd give him what I knew was freely available. I do not believe he wants to go into the grit of a custom dashboard page at this time. However, if that changes I'll be more than happy to assist.

    Fox