Thanks, I will take a look at these options.
Posts made by Andras
-
RE: Bulk configuration of devices/datapoints
-
Bulk configuration of devices/datapoints
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?
-
RE: [solved] Change device in dynamic watchlist as result of click event
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 ;)
-
RE: [solved] Change device in dynamic watchlist as result of click event
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.
-
RE: [solved] Change device in dynamic watchlist as result of click event
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.
-
[solved] Change device in dynamic watchlist as result of click event
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!
-
RE: Arduino is an open-source electronics prototyping platform
Hi JointTech,
The sample code initializes the mobus holding register 0 to 123. For your first test, you don't have to do anything else; you can leave the your-code-goes-here part empty .
Next, hook up the Arduino serial port to the machine running Mango and create a Modubus data source.
Then create a data point for holding register 0 and have Mango poll it regularly. If all goes well, you should get the 123 value in your data point.
When this works, you can proceed to put whatever value you would like in the holding register from the your-code-goes-here section. Just assign the value to regs[MB_REG0]. The start_mb_slave() function in the loop runner will take care of responding to modbus master commands.
-
RE: Communicating with modbus rtu slave on Arduino
Hi mgvanosd,
- Your Arduino needs to be a modbus slave. You don't need a separate device.
You can use jpmzometa's mobus rtu slave library in your Arduino. I added some code to make it work with Mango. In the meantime this has been included in the library. You can download it from:
http://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave
- Some sample code can be found here:
-
RE: Modbus4J changes in Mango 1.8.2
Yes, that did the trick. I no longer get the error messages :) Thanks !
-
RE: I'd like to translate Mango to Spanish
Hi jjconti,
Yes, Mango is prepared for localization. In you look in the folder WEB-INF/classes you can find the i18n files. If you open messages_en.properties, you will see key=value text lines. You can translate the value part to Spanish and put the translated text in a new file messages_es.properties. Also add a line "es=Espanol" to the file i18n.properties.
-
RE: Modbus4J changes in Mango 1.8.2
Hi Matthew,
I replaced the Modbus4J.jar and set my modbus source to poll holding register 6 and 8 every 5 seconds (serial settings: 9600 8N1). I noticed that most of the time there is no error reported. About 1 out of 10 times I get an error message like this:
WARN 2010-04-09 10:09:05,029 (com.serotonin.mango.rt.dataSource.modbus.ModbusDa
taSource.receivedException:226) - Modbus exception
com.serotonin.modbus4j.exception.IllegalFunctionException: Function code: 0x28
at com.serotonin.modbus4j.msg.ModbusResponse.createModbusResponse(Modbus
Response.java:50)
at com.serotonin.modbus4j.serial.rtu.RtuMessageResponse.createRtuMessage
Response(RtuMessageResponse.java:16)
at com.serotonin.modbus4j.serial.rtu.RtuMessageParser.parseMessageImpl(R
tuMessageParser.java:21)
at com.serotonin.modbus4j.base.BaseMessageParser.parseMessage(BaseMessag
eParser.java:17)
at com.serotonin.messaging.MessageControl.data(MessageControl.java:129)
at com.serotonin.messaging.InputStreamListener.run(InputStreamListener.j
ava:76)
at java.lang.Thread.run(Thread.java:619)
tried to access field gnu.io.RXTXPort.IOLocked from class gnu.io.RXTXHackThe function code 0x28 reported above isn't always the same; it changes now and then. If we look at the serial trace it becomes clear why:
Request: 9-4-2010 10:09:04.25764 (+4.9375 seconds)
01 03 00 06 00 03 E5 CA ......åÊ
Answer: 9-4-2010 10:09:04.28864 (+0.0313 seconds)
01 03 06 00 00 00 00 00 D2 A1 28 ........Ò¡(It looks like the 0x28 is the last byte of the CRC. Normally I see only 1 request and 1 reply in the trace every 5 secs, but when this error occurs Modbus4J retries and we see a second try shortly after the one that didn't succeed:
Request: 9-4-2010 10:09:05.77264 (+0.4375 seconds)
01 03 00 06 00 03 E5 CA ......åÊ
Answer: 9-4-2010 10:09:05.80464 (+0.0313 seconds)
01 03 06 00 00 00 00 00 D2 A1 28 ........Ò¡(I suppose that's why I still get the data in Mango despite the errors.
Note that the request-reply that preceded the one with timestamp 10:09:04.25764 looks like this:
Request: 9-4-2010 10:08:59.25764 (+4.9688 seconds)
01 03 00 06 00 03 E5 CA ......åÊ
Answer: 9-4-2010 10:08:59.31964 (+0.0625 seconds)
01 03 06 00 01 00 00 00 D2 9C E8 ........Ò?èSo the 0x28 didn't appear in the answer message prior to the one that didn't succeed.
-
Modbus4J changes in Mango 1.8.2
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 ?
-
RE: Modbus4J changes in Mango 1.8.2
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 ?
-
RE: Put my Mango server on web
Hi Walid,
If your Mango is running op port 8080 (you access it on your localhost with http://localhost:8080), then you could configure your router under NAT/portforwarding/application_sharing (depends on your router) like this: set it to forward public TCP port 8080 of your router (or perhaps 80 if you like) to the LAN IP address and TCP port 8080 of the machine on your LAN (for example 192.168.0.1).
Perhaps stating the obvious, but ofcourse you should use a static LAN address for you server as well, or alternatively configure your router to always assign the same IP address to the paricular ethernet MAC address of your server.
-
RE: Building Mango in Eclipse
Regarding your problem to access the manager: did you check that the manager role was assigned to the user with which you tried to access the manager ?
In conf/tomcat-users.xml you should have something like
<tomcat-users>
<role rolename="manager"/>
<user username="manager" password="manager" roles="manager"/>
</tomcat-users>to be able to access http://localhost:8080/manager/html with user manager
-
RE: Firefox error
Mango seems to work OK with Firefox 3.6, so as a quick fix you could do this:
In ROOT/resources/header.js in the function checkCombo add a statement that returns true for version == 3.6.
-
RE: Building Mango in Eclipse
Hi Mario,
For building Mango you don't need the axis stuff. Besides removing the axis jars from the build path, you can remove the last WDSL related part of the build.xml as well. It's not needed for the "deploy" build target. Building the way I described above should then work.
Although building now works, when using the IDE, you will still get quite some unresolved red markings. You can solve that by adding some jars to the build path under the menu "project->properties->java build path->libraries". I used "add jar" to add these jars in war/WEB-INF/lib :
modbus4J
seroUtils
common-httputils
quartz
bacnet4J
commons-codec
jodaYou might also need use "add external jar" to point to the servlet and jsp api. For Tomcat 5 these jars are in ${tomcat.home}/lib and are named:
servlet-api
jsp-apiRegards,
Andras
-
RE: SMS datasource?
Another possibility could perhaps be to use the http publisher with some voip account or SMS gateway provider. The Betamax voip family (voipbuster etc.) have an http api with which you can send your SMS message using GET variables. Usually the SMS rates are better (at least in Europe) than with a normal GSM subscription.
-
RE: Triggering TimeSync to end devices
OK, thanks for the tip. I also added function 6 and I can now set points too :) I also made the whole thing into a separated Arduino library (which was something that needed to be done anyway).
I also added code to make it easy to check which registers were changed by the master.
I'll ask jpmzometa if he wants to include the changes.
(Again, sorry for being off topic here)
-
RE: Simple point text after value
point details -> edit data point, Text render properties->suffix