• E
    etantonio

    OK, thanks,
    I'll try to backup on a remote server but I don't think I can do this here:
    0_1560281583976_ee85a2c0-913e-4c2f-9674-cc229e53b9b6-immagine.png

    Maybe I've to create a chron script that daily rsync backup directory on a remote server.

    I'll try also to switch off swap.
    Thanks, Antonio

    posted in Mango Automation general Discussion read more
  • E
    etantonio

    Hi,
    i wnat to speed up Mango as much as possible on Raspberry and I want to know whick keys I can use.
    For example, I'm not interested to the GUI so I choosed

    0_1560250328160_230bed23-00af-4439-8365-46acbe17efec-immagine.png

    concerning the thread I've the following default configuration

    0_1560250385796_2ccd9b80-275e-4d39-8b3f-814370b47dbd-immagine.png

    but I've no idea if it is better to change something on it.
    this is thye htop response on normal operation.

    0_1560250982650_58c101b8-5237-4416-91e8-bd82ce572d22-immagine.png

    And also, I read somewhere that it is not a good idea to have a database (mysql) over an SD card due to limited number or read/write, is it something you tested?

    Thanks,
    Antonio

    posted in Mango Automation general Discussion read more
  • E
    etantonio

    Hy,
    I'm using publisher in a client/server environment on mango 2.8.8,
    during boot I've a lot of this row

    DEBUG 2019-05-31 12:38:44,061 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:44,061 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:43,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:43,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:43,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:42,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:42,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:42,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:41,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:41,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:41,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:40,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:40,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:40,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:39,062 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:39,062 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:39,062 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:38,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 50 to 44 bytes. Compression: 12.0%
    DEBUG 2019-05-31 12:38:37,972 (com.serotonin.m2m2.persistent.pub.TimedOutputStream$CheckTask.run:131) - 1 (PersistentSenderRT.SendThread): not in a write operation
    DEBUG 2019-05-31 12:38:38,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 50 to 44 bytes. Compression: 12.0%
    DEBUG 2019-05-31 12:38:37,972 (com.serotonin.m2m2.persistent.pub.TimedOutputStream$CheckTask.run:131) - 1 (PersistentSenderRT.SendThread): not in a write operation
    DEBUG 2019-05-31 12:38:38,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 50 to 44 bytes. Compression: 12.0%
    DEBUG 2019-05-31 12:38:37,972 (com.serotonin.m2m2.persistent.pub.TimedOutputStream$CheckTask.run:131) - 1 (PersistentSenderRT.SendThread): not in a write operation
    DEBUG 2019-05-31 12:38:37,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 50 to 44 bytes. Compression: 12.0%
    DEBUG 2019-05-31 12:38:37,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 50 to 44 bytes. Compression: 12.0%
    DEBUG 2019-05-31 12:38:37,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 50 to 44 bytes. Compression: 12.0%
    DEBUG 2019-05-31 12:38:36,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:36,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    DEBUG 2019-05-31 12:38:36,059 (com.serotonin.m2m2.persistent.common.Packet.compressByteQueue:696) - Compressed from 69 to 47 bytes. Compression: 31.88405797101449%
    
    

    is it normal, how I can speed-up the boot?

    posted in Mango Automation general Discussion read more
  • E
    etantonio

    Thanks,
    MA_HOME is defined but not the value of MA_HOME,

    0_1559133855652_0af6bfaa-360e-4c40-a505-04857b6310b8-immagine.png
    path: undefined

    I follow this during installation:
    https://help.infiniteautomation.com/linux-installation
    and it is not mentioned

    MA_HOME is a simple environment variable?

    Thanks,
    Antonio

    posted in Scripting general Discussion read more
  • E
    etantonio

    Thanks,
    JsonEmport seems to be not available in mango 2.8.8
    0_1558952168134_3c092431-87ce-4570-99b6-4013e76efce4-immagine.png

    but it is not a problem because instead is available the following:

    var hostIP = (com.serotonin.m2m2.db.dao.DataSourceDao.instance.getByXid("FML01-main")).host
    

    Concerning instead MA_HOME seems to be undefined,

    In your documentation is stated somewhere that it is necessary to create this environment variable?
    Actually is not defined in my system but it seems it is not a problem, everything else seems ok.
    Thanks

    posted in Scripting general Discussion read more
  • E
    etantonio

    Hy, I've several modbus datasources each one with the target host ip

    0_1558694934866_35dd0bc7-46bc-4a4f-94e7-5849419d5597-immagine.png

    it is possible to assign this IP to a virtual datapoint like this:
    0_1558695249968_042b273d-4a26-44b0-aa9a-3db3eba22877-immagine.png

    and use it to select the host in the modbus datasource definition?

    0_1558701416036_4da1174f-1109-4320-9ce6-e1c0c1da21c7-immagine.png

    instead seems to be possible to use it directly in a scripting data source?

        var response = com.serotonin.m2m2.rt.maint.work.ProcessWorkItem.executeProcessCommand("/home/solergy/./tracker_upgrade_IP.sh S07E-MCU-3AX.bin upload " + STM32_IP.value , 300);
    

    and also,
    there's a way to know the MANGO path inside a script?

    Thanks,
    Antonio

    posted in Scripting general Discussion read more
  • E
    etantonio

    @etantonio said in Angular question in a master slave Mango publisher environment:

    The architecture seems to be ok in this way but my problem is on master side, I've no idea about how to use the returning masterControlEnabled=0 from the slave to the master in order to switch off the upgrade request from the master to the slave.

    this is my solution to this:

          <md-button ng-if="TRK_9_1_master_control_enabled.value==1" ng-init="TRK_9_1_upgrade.setValue(0)"  ng-click="TRK_9_1_upgrade.setValue(1)" class="md-raised" title="Upgrade">Upgrade</md-button>
            <md-button ng-if="TRK_9_1_master_control_enabled.value==0 && TRK_9_1_upgrade.value==1" class="md-raised md-pressed" title="Upgrading">Upgrading</md-button>
    

    posted in Scripting general Discussion read more
  • E
    etantonio

    I think that the best solution is is to use latest Mango version where publisher give opportunity to the master to set value back but actually I can't follow it.
    Thanks anyway,
    Antonio

    posted in Scripting general Discussion read more
  • E
    etantonio

    Hy,
    I'm creating an architecture with one "Mango master" v2.8.8 and several "Mango slaves" v.2.8.8.
    I've a persistent publisher from each slave to the "Mango master" and a persistent publisher from the "Mango master" to each slave.

    I need to drive a long running scripting datasource, it starts with remoteUpgrade=1 the signal arriving from master

    if (masterControlEnabled.value === 1 && remoteUpgrade.value === 1) {
        masterControlEnabled.set(0);
    
    	... long elaboration
    	
        masterControlEnabled.set(1);
    }
    

    during the elaboration the slave inhibit other requests from the master using masterControlEnabled=0.

    The architecture seems to be ok in this way but my problem is on master side, I've no idea about how to use the returning masterControlEnabled=0 from the slave to the master in order to switch off the upgrade request from the master to the slave.

    I've tried with the following code where:
    TRK_9_1_upgrade --> upgrade request from master to slave
    TRK_9_1_master_control_enabled --> from slave to master inhibit other request

          <ma-switch-img point="TRK_9_1_upgrade" ng-mousedown="TRK_9_1_upgrade.setValue(!TRK_9_1_upgrade.value)" ng-mouseup="TRK_9_1_upgrade.setValue(TRK_9_1_master_control_enabled.value && TRK_9_1_upgrade.value)"   default-src="./img/emergency-tiny.png" src-map="{'0': './img/off-tiny.png','1': './img/on-tiny.png'}">  
        
    
    

    but the value of TRK_9_1_upgrade remain fixed to 1,
    any idea about how to use
    TRK_9_1_master_control_enabled = 0
    to switch
    TRK_9_1_upgrade = 0 ?

    I've no idea about which event to use, and how, to catch updated value of TRK_9_1_master_control_enabled.

    This is the definition of TRK_9_1_upgrade in the virtual datasource published from the master to the slave

    0_1558445527984_ae8ed703-de7d-4915-bbeb-86eebd7dee4d-immagine.png

    Thanks for your help,
    Antonio

    posted in Scripting general Discussion read more