MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Release_Notes_3.3.0",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "1135": {
                "pageid": 1135,
                "ns": 0,
                "title": "Redirect variables",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "Redirect variables allow [[UI Objects]] to be linked dynamically to a source.\n\nRedirect variables can be used in:\n* any object's id\n* I/O Server Objects, in server id and address parameters\n* [[Button]] objects, in the address parameter\n\n\n== Syntax ==\nVariables are defined with the following syntax:\n [<variable name>]\nE.g.\n [myaddr]\n\n== Setting Values ==\nServer UISets (from events or java) are used to set a redirect variable's value.\nEach redirect variable is a property of the \"redirect\" object.\nFor example, a redirect variable called \"myaddr\" can be set to \"70\" with a [[Action_Keywords#UISET|UISet]] command on events:\n UISET redirect.myaddr=70\n\n== Example: Userlist object (redirecting the object's ID) ==\nIn this example we use a single [[UserList]] object to display different values associated with distinct IDs.\nIn a project we place a [[UserList]] and two [[User]] buttons.\nWe use a redirect variable as the ID: myid. We leave parameters and labels empty, to be set by UISets.\n\n[[File:redirect_vars_03.png|570px]]\n\nEach [[User]] button will have \"changeid\" as name and \"ulist1\" or \"ulist2\" respectively as param.\n\nIn [[JavaScript_Callback_Functions_API#userCommand|events]] we add: \n\n # initialize two UserList objects with different values\n init : {\n     uiSet(\"ulist1\", \"parameters\", \"1,2,3\");\n     uiSet(\"ulist1\", \"labels\", \"one,two,three\");\n     uiSet(\"ulist2\", \"parameters\", \"a,b,c\");\n     uiSet(\"ulist2\", \"labels\", \"A,B,C\");\n }\n\n # change the id to show different lists\n function userCommand(session, userid, name, param) : {\n     if (name == \"changeid\") {\n         uiSet(\"redirect\", \"myid\", param);\n     }\n }\n\nThe parameters and labels for ulist1 and ulist2 will be initialized.\nClicking on a button in the interface will execute the above callback, which sets the redirect variables' values and changes the ID of the UserList object accordingly, which will in turn display one of the two sets of values.\n\n== Example: TempMini Object ==\nIn this example we will use a single [[TempMini]] object to display different sources.\nIn hsyco.ini we have an ioServer with 3 zones.\n ioServers = bmne500\n ioServersType.bmne500 = MYHOME\n ioServersOptions.bmne500 = tempzones=1;2;3\n\nIn a project we place a [[TempMini]] and three [[User]] buttons.\nOn the TempMini parameters, we use two redirect variables: mysid and myzone.\n\n[[File:redirect_vars_01.png]]\n\nEach [[User]] button will have \"changetemp\" as name and \"1\", \"2\" or \"3\" respectively as param.\n\nIn [[JavaScript_Callback_Functions_API#userCommand|events]] we declare: \n\n function userCommand(session, userid, name, param) : {\n    if (name == \"changetemp\") {\n \tuiSet(\"redirect\", \"mysid\", \"bmne500\");\n \tuiSet(\"redirect\", \"myzone\", param); // address: \"temp.\"+ myzone\n        return \"ok\";\n    }\n }\n\nClicking on a button in the interface will execute the above callback, which sets the redirect variables' values and changes the source of the TempMini object accordingly.\n\n== Example: Button object ==\nSimilarly to the previous example, in a project we place a [[Button]] object with a redirect variable called myaddr.\nWe also place two User buttons with name \"changeaddr\" and param \"light.1\" and \"autom.1\"\n\n[[File:redirect_vars_02.png]]\n\n function userCommand(session, userid, name, param) : {\n    if (name == \"changeaddr\") {\n        uiSet(\"redirect\", \"myaddr\", \"dummy.\"+param); // dummy.light.1\n    }\n }\n\nOnce again clicking on a User button will cause the Button object to change its source, from a light to an autom."
                    }
                ]
            },
            "1016": {
                "pageid": 1016,
                "ns": 0,
                "title": "Redscan",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "The OPTEX REDSCAN is a laser scan detector that can detect a moving object's size, speed, and distance with high-reliability. The integration with HSYCO can be accomplished via direct control through Ethernet connection. \nThe I/O Server complies with the Optex Redscan Protocol v1.71 and has been tested on firmware version 7.3.0.\n\n[[Category:I/O Server]]\n\n== Redscan Configuration ==\nTo enable alarm events, make sure the Event Code via Broadcast UPD is enabled. In the Redscan Manager go to '''Basic Settings''' > '''I/O Settings''':\n\n[[File:Redscan_event_code.png|500px|border]]\n\n\nTo enable the drawing of detected objects on HSYCO's interface, you need to provide the I/O Server with the coordinates of the area that is monitored by the scanner.\n\nTo this end, open the Redscan Manager and take note of the upper-left and lower-right corners of the virtual rectangular area covering the detection area set on the scanner:\n\n[[File:Redscan_detection_area.png|800px|border]]\n\nSet the coordinates (in millimeters) of this two points in the [[#Options|I/O Server options]] 'areaX1', 'areaY1', 'areaX2' and 'areaY2'.\n\n== HSYCO Configuration ==\nAdd a REDSCAN I/O Server in the [[Settings#I/O Servers|I/O Servers section of the Settings]] and set its parameters:\n\n=== Communication ===\n*'''IP Address''': host name or IP address of the REDSCAN detector\n*'''IP Port''': TCP/IP port to use (as configured on the REDSCAN detector)\n\n=== High Availability ===\n*'''Shutdown when inactive''': defaults to true.\n\n=== Options ===\n\n{| class=\"wikitable\"\n!ID\n!Default\n!Values\n!Description\n\n|-\n\n|eventsport\n|1234\n|<port_number>\n|port number to which UDP alarm messages are sent by the scanner. Set to 0 to disable alarm events\n\n|-\n\n|areax1\n|\n|<x>\n|X coordinate of the upper-left corner of the detection area. If not specified the image is not drawn\n\n|-\n\n|areay1\n|\n|<y>\n|Y coordinate of the upper-left corner of the detection area. If not specified the image is not drawn\n\n|-\n\n|areax2\n|\n|<x>\n|X coordinate of the lower-right corner of the detection area. If not specified the image is not drawn\n\n|-\n\n|areay2\n|\n|<y>\n|Y coordinate of the lower-right corner of the detection area. If not specified the image is not drawn\n\n|-\n\n|rowspan=\"2\"|flipx\n|rowspan=\"2\"|false\n|true\n|the detected objects image is flipped horizontally\n|-\n|false\n|the image is not flipped horizontally\n\n|-\n\n|rowspan=\"2\"|flipy\n|rowspan=\"2\"|false\n|true\n|the detected objects image is flipped vertically\n|-\n|false\n|the image is not flipped vertically\n\n|-\n\n|bordercolor\n|red\n|<color>\n|[[Draw_API#color|color]] for the border of the circles representing the detected objects. If the color string contains commas, replace them with colons (e.g. 255,10,10 becomes 255:10:10)\n\n|-\n\n|fillcolor\n|white\n|<color>\n|[[Draw_API#color|color]] for the inner part of the circles representing the detected objects. If the color string contains commas, replace them with colons (e.g. 255,10,10 becomes 255:10:10)\n\n|-\n\n|detectioninterval\n|10\n|0 &le; n &le; 100\n|interval between detection reports sent by the scanner. 1 = 50ms, 100 = 5sec. Set to 0 to disable detection events\n\n|}\n\n== Datapoints ==\n\n{| class=\"wikitable\"\n!ID\n!Value\n!R/W\n!Description\n\n|-\n\n|rowspan=\"2\" |connection\n|online\n|R\n|connection established\n|-\n|offline\n|R\n|HSYCO can't connect to the scanner\n\n|-\n\n|version\n|<version>\n|R\n|Firmware version of the scanner, e.g. \"7.3.0\"\n\n|-\n\n|detected\n|<array>\n|R\n|JSON array with the list of detected objects. See [[#Detected objects format|here]] for details\n\n|-\n\n|rowspan=\"2\" |alarm.latest\n|<area>\n|R\n|latest area in which there is an active alarm, e.g. \"A1\" or \"B2\".\n|-\n|<empty_string>\n|R\n|no active alarms\n\n|-\n\n|rowspan=\"2\" |alarm.disq\n|0\n|R\n|Disqualification circuit restored\n|-\n|1\n|R\n|Disqualification circuit active\n\n|-\n\n|rowspan=\"2\" |alarm.antirot\n|0\n|R\n|Anti-rotation function restored\n|-\n|1\n|R\n|Anti-rotation function active\n\n|-\n\n|rowspan=\"2\" |alarm.antimask\n|0\n|R\n|Anti-masking function restored\n|-\n|1\n|R\n|Anti-masking function active\n\n|-\n\n|rowspan=\"2\" |alarm.sensor\n|0\n|R\n|Sensor error condition restored\n|-\n|1\n|R\n|Sensor error condition\n\n|-\n\n|rowspan=\"2\" |alarm.dirt\n|0\n|R\n|Laser window OK\n|-\n|1\n|R\n|Dirt on the laser window (Self check function)\n\n|-\n\n|rowspan=\"2\" |alarm.tamper\n|0\n|R\n|Tamper circuit restored\n|-\n|1\n|R\n|Tamper circuit active\n\n|}\n\n=== Detected objects format ===\n\nWhen no object is detected the value of the 'detected' datapoint is an empty JSON array:\n\n    []\n\n\nWhen there are objects detects, it has the following format:\n\n    [\n        {\n            \"x\":512,\n            \"y\":5622,\n            \"ox\":8565,\n            \"oy\":4421,\n            \"w\":229\n        },\n        {\n            \"x\":1040,\n            \"y\":2283,\n            \"ox\":1754,\n            \"oy\":3987,\n            \"w\":194\n        }\n    ]\n\nThe above example corresponds to the detection of two objects. Each object has the following attributes:\n* '''x''': X coordinate of the object's current position\n* '''y''': Y coordinate of the object's current position\n* '''ox''': X coordinate of the object's position when the alarm was initially triggered\n* '''oy''': Y coordinate of the object's position when the alarm was initially triggered\n* '''w''': current width of the detected object\n\n== User Interface ==\n\nIf the detection area coordinates are specified in the [[#Options|I/O Server options]], the driver will be able to draw the detected objects on an [[Image]] object.\n\nTo this end, just add an Image to your project and set its ID to \"<IOServer_ID>.area\" (e.g. \"redscan.area\"). You can place this image on top of another image representing the monitored area to see the objects moving over it.\n\n== Release Notes ==\n=== 3.6.0 ===\n*initial version release\n\n----\n\n\n''OPTEX and REDSCAN are registered trademarks of OPTEX INC.''"
                    }
                ]
            }
        }
    }
}