• A
    Andras

    Thanks, I will take a look at these options.

    posted in How-To read more
  • A
    Andras

    In my use case, my devices have about 5 or 7 associated datapoints and also entries in point hierarchy/watchlist are needed in order to be select device related/grouped points from a watchlist.

    I have configured a couple of devices manually, but I am going to need to add up to 100 or somewhere in that magnitude. It will be way too cumbersome to do that manually.

    I tried to find a topic on the forum on how to do this. The closest I found was a link to this topic:

    https://forum.infiniteautomation.com/topic/3708/a-script-jsonemport-example

    I suppose I should be able to figure it out eventually this way. At the same time, I was thinking that this is a quite basic textbook sort of configuration structure I have, and I can't be the first. So I was hoping maybe a bulk device/datapoints config script already exists that I can modify for my purposes?

    posted in How-To read more
  • A
    Andras

    OK, I found the solution:

    ng-click="designer.parameters.dn={id:2,name:'Device-40'}"
    

    It just occured to me that the watchlist did initially change (clear), so the change detection can't be the problem. It looks like both id and name need to be set this way simultaneously, and then it works.

    Thanks for your help. Next time I will use tags too ;)

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • A
    Andras

    The dn object looks like this:

    "dn": {
        "name": "Device-45,
        "id": 1,
        "pointCount": 5,
        "subfolders": []
    }
    

    In the dashboard designer, I use:

    <ma-watch-list-get ng-model="designer.watchList" parameters="designer.parameters" on-points-change="designer.points = $points" id="d8b6dbb5-2b9c-4588-86ac-8a146e2891d9" watch-list-xid="WL_fecfa985-8e78-44c7-8a73-a2a97b0ef3b6"></ma-watch-list-get>
    
    <ma-watch-list-parameters id="fc2d053c-1d74-4548-b8f2-a7a253adfb44" style="position: absolute; width: 792px; left: 554px; top: 0px; height: 56px;" ng-model="designer.parameters" watch-list="designer.watchList" ng-change="updateParams = designer.parameters"></ma-watch-list-parameters>  
    
    <ma-indicator id="dev40" style="position: absolute; width: 16px; height: 16px; left: 747px; top: 627px;" default-color="#00f500" point-xid="DP_8c32d66c-627b-42cd-b5cb-917d4684b9e5" ng-click="designer.parameters.dn.id=2; designer.parameters.dn.name='Device-40'"></ma-indicator>
    

    The on-points-change attribute is present (it looks like it is an attribute of ma-watch-list-get). The click will change the dn object such that it has the same data as when device 40 was selected from the dropdown. But the change goes unnoticed.

    It looks like some change detection is still needed. My thought was that ng-change="updateParams=designer.parameters" in the parameters dropdown causes a change in the dropdown to propagate, and that something similar is needed for the click. But everything will work even without this attribute being present.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • A
    Andras

    Hi CraigWeb,

    Thank you for your answer, I much appreciate it. I did indeed follow the 'Dynamic Dashboard Workflow' video tutorial, so the point hierarchy is used to select the device points for the watchlist. The names of the devices are 'Device-xx', with xx the device number. I now tried:

    ng-click="designer.parameters.dn = 'Device-40'"
    

    The watchlist parameter selector does clear on the click event, however Device-40 is not selected. It looks like the dn parameter is no longer valid after the click.

    Isn't dn itself an object? I tried for instance to change the code to assign the 'Device-40' string to the name property of dn:

    ng-click="designer.parameters.dn.name = 'Device-40'"
    

    In which case the name 'Device-40' does appear in the device selector dropdown, however this doesn't change the selected watchlist itself.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • A
    Andras

    Hello all,

    After 8 years, I'm back using Mango for a commercial (light for now) project. I like the new dashboard and other new features, good job! A lot has changed in all those years. It's funny to see that my forum profile is older than that of the IAS staff members :)

    So I created a nice dashboard with a dynamic watchlist for this project, and everything is working pretty much as I intended. There is only one thing that I would like to add, but couldn't figure out yet how to do.

    On top of the possibility for users to change the dynamic watchlist by selecting a device from the watch list parameter dropdown, I would like users to also be able to change the selected watchlist device by clicking on the device ma-indicator that represents the device status. How can I achieve this? Thanks in advance!

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • A
    Andras

    Hi,

    I upgraded from 1.8.0 to Mango 1.8.2. I'm since getting frequent exception messages from Modbus4J that I didn't get in 1.8.0, like this:

    WARN 2010-04-07 10:23:07,562 (com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource.receivedException:226) - Modbus exception
    com.serotonin.modbus4j.exception.IllegalFunctionException
    at com.serotonin.modbus4j.msg.ModbusResponse.createModbusResponse(ModbusResponse.java:50)
    at com.serotonin.modbus4j.serial.rtu.RtuMessageResponse.createRtuMessageResponse(RtuMessageResponse.java:16)
    at com.serotonin.modbus4j.serial.rtu.RtuMessageParser.parseMessageImpl(RtuMessageParser.java:21)
    at com.serotonin.modbus4j.base.BaseMessageParser.parseMessage(BaseMessageParser.java:17)
    at com.serotonin.messaging.MessageControl.data(MessageControl.java:129)
    at com.serotonin.messaging.InputStreamListener.run(InputStreamListener.java:76)
    at java.lang.Thread.run(Thread.java:619)

    As an illegal function exception is reported, I'm guessing that the Modbus4J is using a modbus function that wasn't used before. Despite these error reports, my data is still comming in OK in Mango by the way.

    I'm polling holding registers with Mango. The modbus device supports the modbus function 3 (read block), 6 (write single reg), 16 (write block). I know that Modbus4J reads with function 3 and writes with function 6 in the Modbus4J version that shipped with Mango 1.8.0. Did this mechanism perhaps change in the latest version ?

    posted in Modbus4J general discussion read more
  • A
    Andras

    I have a datapoint that updates everytime a watthour is consumed. The value of this datapoint itself isn't relevant in this case, only the number of times it has been updated.

    What I would like to do is to create a metapoint that will increment on every update so I have the total of consumed watthours. I can do that by putting the datapoint in the context so that the script will execute on an update.

    If I want to increment the metapoint, I need to put the metapoint itself in the script context as well to to be able to access the current value. However that will trigger the script to be executed again when the script returns the incremented value, so that doesn't work.

    Currently I use the count function from the statistics object returned by past() to get the job done, but that seems to iterate over all values everytime and thus takes a lot of work. That doesn't seem to be the right way.

    posted in User help read more
  • A
    Andras

    I'd like to share here how to get Mango datapoints published on pachube.com. You could want to do so if you want to share some data feed with the world on this common datastream excange platform, or maybe you would like to be able to view datapoint charts in the pachube iPhone/Android app.

    You can create a free account at pachube. You will get an API key after creating your account.

    The pachube api normally works with http PUT to update data feeds and requires the api key to be put in a custom http header; that won't work with the Mango publisher. Luckily it is still possible to do it differently, but it is a bit hard to derive that from the documentation. Here's how to do it.

    In the Mango publisher:
    -choose the POST method.
    -For feed number 0 in your stream number 1234, choose URL:

    http://www.pachube.com/api/feeds/1234/datastreams/0.csv?_method=put&key=57<bla>7e

    -Add the Mango point that you'd like to publish. Use parameter name "data". Don't add the timestamp.

    That's it.

    posted in How-To read more
  • A
    Andras

    Hi,

    I have Mango running with wireless sensor nodes from Jee Labs. The JeeLabs hardware and software are based on Arduino and is open source hardware/software. You can get JeeNodes from jeelabs.org either fully assembled or as a kit (note: I'm not affiliated in any way with Jee Labs).

    To get JeeNode rooms data (temp, presence, humidity, etc.) into Mango, I made a rooms2modbus sketch (in the Arduino world, that's a program that can be compiled and loaded on you microcontroller). This makes the central JeeNode/JeeLink act as a modbus RTU slave. For those interested, you can get the source here:

    www.tucsni.nl/jee

    posted in Hardware read more