Supported Data Source Control Path
ScadaBR exposes data-source and data-point enable/disable control through its script interface. The available evidence does not establish that an HTTP Receiver can interpret a URL parameter such as enabled_data_source=true or enabled_data_source=false as a native control command. Use an event-driven script when a point condition must activate or deactivate the target.
- Create an event detector on the point that determines when the state must change.
- Associate an event handler with that detector.
- Configure the handler to execute a script that enables or disables the required data source or data point.
- Trigger the point condition and verify that the target changes to the intended state.
Diagnosing the PermissionException
An event-handler script can fail with com.serotonin.mango.vo.permission.PermissionException: Not logged in, wrapped by javax.script.ScriptException. The stack trace shows the failure while ScriptHandlerRT invokes the ScadaBR scripting runtime, so confirm that the script operation has a valid execution context and permission before treating the event detector itself as faulty. The evidence does not identify a specific permission setting or authenticated scripting API, so do not guess a role, user, or configuration field.
| Observation | Engineering decision |
|---|---|
| Event occurs, but the target state does not change | Inspect the script-handler error and confirm whether PermissionException: Not logged in is present. |
| The permission exception is present | Validate the script execution context and its authorization to change the data source or data point. |
| Authorization appears correct but script execution remains unreliable | Check the ScadaBR and Java compatibility condition described below. |
ScadaBR 1.0 Java Compatibility
ScadaBR 1.0 scripts are reported not to work correctly with Java 7. For that version, configure the Tomcat application service to run with Java 6. Both Java versions may remain installed; the required change is the Java runtime selected for Tomcat.
After changing the service configuration, restart Tomcat, raise the event again, and verify both outcomes: the script completes without the prior exception and the selected data source or data point reaches the commanded enabled or disabled state. This Java change is a version-specific workaround, not evidence that every Not logged in error is caused by Java 7.
FAQ
Can a ScadaBR HTTP Receiver URL enable or disable a data source?
The evidence supports control through the script interface, not a native URL parameter such as enabled_data_source=true. Connect the controlling point to an event detector and a script event handler.
Why does a ScadaBR event script report PermissionException: Not logged in?
The script is attempting an operation without a valid authorized execution context. Check the handler's scripting context and permissions before changing the event detector.
Which Java version should run ScadaBR 1.0 scripts?
Configure the Tomcat application service to use Java 6 because ScadaBR 1.0 scripts are reported to malfunction with Java 7. Restart Tomcat and retest the event-driven state change.