kumajaya

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 144 total)
  • Author
    Posts
  • in reply to: HTTPS on Linux #7817
    kumajaya
    Participant

    I believe Nginx must be better but since somehow mono-xsp4 available on my Ubuntu system:

    PART 1: mono-xsp configuration

    1. Copy /etc/init.d/mono-xsp4 as /etc/init.d/scada-xsp4 and modify it:

    sudo cp /etc/init.d/mono-xsp4 /etc/init.d/scada-xsp4
    sudo nano /etc/init.d/scada-xsp4

    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          mono-xsp4
    # Required-Start:    $remote_fs
    # Required-Stop:     $remote_fs
    # Should-Start:      
    # Should-Stop:
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Mono XSP4
    # Description:       Debian init script for Mono XSP4.
    ### END INIT INFO
    #
    # Written by Pablo Fischer <pablo@pablo.com.mx>
    #            Dylan R. E. Moonfire <debian@mfgames.com>
    # Modified for Debian GNU/Linux
    #
    # Version:	@(#)mono-xsp4 pablo@pablo.com.mx
    #
    
    # Variables
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DAEMON=/usr/bin/xsp4
    NAME=scada-xsp4
    DESC="XSP 4.0 WebServer"
    DEFAULT=/etc/default/$NAME
    CFGDIR=/etc/xsp4
    VIRTUALFILE=$CFGDIR/scada.webapp
    MONO_SHARED_DIR=/var/run/$NAME
    start_boot=false
    
    # Use LSB
    . /lib/lsb/init-functions
    
    # If we don't have the basics, don't bother
    test -x $DAEMON || exit 0
    test -f $DEFAULT && . $DEFAULT	
    
    if [ "x$start_boot" != "xtrue" ] ; then
        exit 0
    fi
    
    if [ ! -e $MONO_SHARED_DIR ]; then
    	mkdir $MONO_SHARED_DIR   
    	chown $user:$group $MONO_SHARED_DIR
    fi
                    
    should_start() {
        if [ ! -e $VIRTUALFILE -o <code>cat $VIRTUALFILE | wc -l</code> = "2" ]; then
    	log_action_msg "You have an incomplete $VIRTUALFILE"
    	log_action_msg "To fix it, you need to install at least one package for xsp4 (like asp.net-examples)"	
    	return 1
        fi 
        
        if [ -f /var/run/$NAME.pid ]; then
    	# Are we really running xsp4?
    	xsp4_pid=<code>cat /var/run/$NAME.pid</code>
    	xsp4_ps=<code>ps -p $xsp4_pid | wc -l</code>
    	if [ "$xsp4_ps" != "1" ]; then
    	    log_action_msg "Sorry, there is already a xsp4 running, stop it first"
    	    return 1		
    	fi
        fi
        
        return 0
    	
    }
    
    case "$1" in
        start)
    	if should_start ; then
    	    log_daemon_msg "Starting $DESC" "$NAME"
    	    export MONO_SHARED_DIR
    	    start-stop-daemon --start --background --make-pidfile \
    		--quiet --pidfile /var/run/$NAME.pid \
    		--user $user --group $group --chuid $user \
    		--exec $DAEMON -- \
    		--port $port --address $address --appconfigdir \
    		$CFGDIR --nonstop
    	    log_end_msg $?
    	fi
    	;;
        stop)
    	log_daemon_msg "Stopping $DESC" "$NAME"
            for i in $(ps aux | grep -v grep | grep 'xsp4.exe' | cut -c 10-15)
            do
                    kill $i > /dev/null 2>&1
            done
    	log_end_msg $?
    	;;
        restart|force-reload)
    	$0 stop
    	$0 start
    	;;
        *)
    	N=/etc/init.d/$NAME
    	echo "Usage: $N {start|stop|restart|force-reload}" >&2
    	exit 1
    	;;
    esac
    
    exit 0

    2. Copy /etc/default/mono-xsp4 as /etc/default/scada-xsp4 and modify it:

    sudo cp /etc/default/mono-xsp4 /etc/default/scada-xsp4
    sudo nano /etc/default/scada-xsp4

    # Defaults for mono-xsp4, official version
    # sourced by /etc/init.d/scada-xsp4
    
    # Should we start it?
    start_boot=true
    
    # User and group by default
    user=www-data
    group=www-data
    
    # Default port
    port=8000
    address=0.0.0.0
    
    # Directory for config files
    config_files=/etc/scada-xsp4

    3. Copy /etc/xsp4/debian.webapp as /etc/xsp/scada.webapp and modify it:

    sudo cp /etc/xsp4/debian.webapp /etc/xsp4/scada.webapp
    sudo nano /etc/xsp4/scada.webapp

    <apps>
      <web-application>
        <name>scada</name>
        <vpath>/</vpath>
        <path>/opt/scada/ScadaWeb</path>
      </web-application>
    </apps>

    4. Activate scada-xsp4 service and start it:

    cd /etc/init.d/
    sudo chmod +x scada-xsp4
    sudo update-rc.d scada-xsp4 defaults
    sudo service scada-xsp4 start

    5. Open http://localhost:8000 on your browser for testing

    in reply to: Not Receiving Data from Request – Modbus #7801
    kumajaya
    Participant

    https://store.chipkin.com/products/tools/cas-modbus-scanner has a feature to scan available device address.

    in reply to: Not Receiving Data from Request – Modbus #7792
    kumajaya
    Participant

    Why not just set it as a virtual com port using https://www.waveshare.com/wiki/File:USR-VCOM_V3.7.1.520.7z and test the communication using a Modbus tester application first.

    in reply to: Access Rapid SCADA data from Node-RED #7780
    kumajaya
    Participant

    I just want to confirm GrafanaDataProvider works good so far. Please remember to release official build.

    in reply to: Not Receiving Data from Request – Modbus #7779
    kumajaya
    Participant

    Usually I use a Modbus tester application to confirm Modbus RTU/TCP communication. You can try https://store.chipkin.com/products/tools/cas-modbus-scanner or https://github.com/ed-chemnitz/qmodbus

    in reply to: Access Rapid SCADA data from Node-RED #7393
    kumajaya
    Participant

    Let me try it, I’ll report back later. Big thanks.

    in reply to: Access Rapid SCADA data from Node-RED #7387
    kumajaya
    Participant

    I found GrafanaDataProvider not maintain the connection to Rapid SCADA server but make a new connection in every Grafana request. Sometime fail to connect to server if request too often, for example, multiple panel in a dashboard will make a multiple requests in every Grafana refresh. Sometime no data response back because fail to connect to RS server.

    in reply to: Access Rapid SCADA data from Node-RED #7386
    kumajaya
    Participant

    Not found yet but logically incorrect.

    in reply to: Access Rapid SCADA data from Node-RED #7378
    kumajaya
    Participant
    in reply to: Access Rapid SCADA data from Node-RED #7372
    kumajaya
    Participant

    Great! Very proud if I could contribute back to Rapid SCADA. BTW, RS need a better logo 😀

    in reply to: Access Rapid SCADA data from Node-RED #7357
    kumajaya
    Participant

    I just confirmed it. Now I really got five data for last five minutes time range. Thank you.

    But I have a different experience on Linux, Ubuntu 20.04 LTS. Sometime Grafana just shown no data. I have to debug it further, installed this modul on both Windows and Linux, RS running on Linux.

    kumajaya
    Participant

    I can connect with every security level supported by the server using above official client.

    kumajaya
    Participant

    I can connect with every 7 combination supported by Node OPCUA from UaExpert dan Prosys including “None and None” but only “Sign & encrypt and Basic256Sha256” with KpOpcUa. No problem, I can connect to Node OPCUA server now without modified source code.

    kumajaya
    Participant

    Oh my bad… Sign & encrypt and Basic256Sha256 is the only security mode and policy accepted by my Node OPCUA server. Let me check further what’s exactly the problem.

    kumajaya
    Participant

    OK. I’ll check it.

Viewing 15 posts - 91 through 105 (of 144 total)