diff --git a/.gitignore b/.gitignore index c125c47d..2dec300a 100644 --- a/.gitignore +++ b/.gitignore @@ -338,3 +338,8 @@ IOB-WIN-PSER/logs/*/*.txt IOB-WIN-PSER/dist/CONF/*.cfg IOB-WIN-PSER/dist/logs/*/*.txt IOB-WIN-PSER/dist/*.exe +IOB-WIN-PSER/dist-nuitka/*.exe +IOB-WIN-PSER.build/ +IOB-WIN-PSER.dist/ +IOB-WIN-PSER.onefile-build/ + diff --git a/IOB-WIN-PSER/IOB-WIN-PSER.py b/IOB-WIN-PSER/IOB-WIN-PSER.py index 961d2402..2676da8b 100644 --- a/IOB-WIN-PSER/IOB-WIN-PSER.py +++ b/IOB-WIN-PSER/IOB-WIN-PSER.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # -*- coding: utf-8 -*- # IOB-WIN-PSER v. 2.7 # - porting versione interpretata su Python2 + XP a Python3 diff --git a/IOB-WIN-PSER/NuitkacreateExe.bat b/IOB-WIN-PSER/NuitkacreateExe.bat new file mode 100644 index 00000000..96d54e55 --- /dev/null +++ b/IOB-WIN-PSER/NuitkacreateExe.bat @@ -0,0 +1,17 @@ +REM script creazione EXE da python con Nuitka +REM https://nuitka.net/ +REM https://nuitka.net/doc/user-manual.html + +RMDIR /S /Q dist-nuitka +MKDIR dist-nuitka + +@REM python -m nuitka --standalone IOB-WIN-PSER.py +@REM python -m nuitka --onefile IOB-WIN-PSER.py +@REM python -m nuitka --standalone --windows-icon-from-ico=SteamWare.ico IOB-WIN-PSER.py +python -m nuitka --onefile --windows-icon-from-ico=SteamWare.ico IOB-WIN-PSER.py + +REM sposto in folder dist +move IOB-WIN-PSER.exe dist-nuitka/IOB-WIN-PSER.exe + +REM effettua copia delle conf x poter avviare... +xcopy CONF\*.cfg dist-nuitka\CONF\ diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/IOB.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/IOB.cfg new file mode 100644 index 00000000..d2e5fdd4 --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/IOB.cfg @@ -0,0 +1,65 @@ +[comm] +port = COM5 + + +[id] +idxMacchina = L003 + +[web] +URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +URLALIVE = http://192.168.111.104/MP/IO/IOB +URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 102400 +NUM_LOG_RETAIN = 10 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/L001.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/L001.cfg new file mode 100644 index 00000000..afbc71d2 --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/L001.cfg @@ -0,0 +1,71 @@ +[comm] +port = COM4 + + +[id] +idxMacchina = L001 + +[web] +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= + +; URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +; URLALIVE = http://192.168.111.104/MP/IO/IOB +; URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +; URLADV1 = ?valore= +; URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 1048576 +NUM_LOG_RETAIN = 30 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/L003.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/L003.cfg new file mode 100644 index 00000000..75d5e75f --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/L003.cfg @@ -0,0 +1,71 @@ +[comm] +port = COM21 + +[id] +idxMacchina = L003 + +#[web] +#URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +#URLALIVE = http://192.168.111.104/MP/IO/IOB +#URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +#URLADV1 = ?valore= +#URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[web] +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 1048576 +NUM_LOG_RETAIN = 30 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/L004.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/L004.cfg new file mode 100644 index 00000000..0467c40f --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/L004.cfg @@ -0,0 +1,71 @@ +[comm] +port = COM22 + +[id] +idxMacchina = L004 + +#[web] +#URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +#URLALIVE = http://192.168.111.104/MP/IO/IOB +#URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +#URLADV1 = ?valore= +#URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[web] +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 1048576 +NUM_LOG_RETAIN = 30 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/L005.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/L005.cfg new file mode 100644 index 00000000..23492f1d --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/L005.cfg @@ -0,0 +1,71 @@ +[comm] +port = COM23 + +[id] +idxMacchina = L005 + +#[web] +#URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +#URLALIVE = http://192.168.111.104/MP/IO/IOB +#URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +#URLADV1 = ?valore= +#URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[web] +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 1048576 +NUM_LOG_RETAIN = 30 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/L006.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/L006.cfg new file mode 100644 index 00000000..bc218f6e --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/L006.cfg @@ -0,0 +1,71 @@ +[comm] +port = COM24 + +[id] +idxMacchina = L006 + +#[web] +#URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +#URLALIVE = http://192.168.111.104/MP/IO/IOB +#URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +#URLADV1 = ?valore= +#URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[web] +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 1048576 +NUM_LOG_RETAIN = 30 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/L007.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/L007.cfg new file mode 100644 index 00000000..d49dc2df --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/L007.cfg @@ -0,0 +1,71 @@ +[comm] +port = COM25 + +[id] +idxMacchina = L007 + +#[web] +#URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +#URLALIVE = http://192.168.111.104/MP/IO/IOB +#URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +#URLADV1 = ?valore= +#URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[web] +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 1048576 +NUM_LOG_RETAIN = 30 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/L008.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/L008.cfg new file mode 100644 index 00000000..1224694e --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/L008.cfg @@ -0,0 +1,71 @@ +[comm] +port = COM26 + +[id] +idxMacchina = L008 + +#[web] +#URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +#URLALIVE = http://192.168.111.104/MP/IO/IOB +#URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +#URLADV1 = ?valore= +#URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[web] +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 1048576 +NUM_LOG_RETAIN = 30 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-WIN-PSER/dist-nuitka/CONF/L012.cfg b/IOB-WIN-PSER/dist-nuitka/CONF/L012.cfg new file mode 100644 index 00000000..6dee57fc --- /dev/null +++ b/IOB-WIN-PSER/dist-nuitka/CONF/L012.cfg @@ -0,0 +1,71 @@ +[comm] +port = COM28 + +[id] +idxMacchina = L012 + +#[web] +#URLBASE = http://192.168.111.104/MP/IO/IOB/input/ +#URLALIVE = http://192.168.111.104/MP/IO/IOB +#URLENABLED = http://192.168.111.104/MP/IO/IOB/enabled/ +#URLADV1 = ?valore= +#URLREBO = http://192.168.111.104/MP/IO/sendReboot.aspx?idxMacchina= + +[web] +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 +WAIT_RECONN = 2 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt +MAX_LOG_SIZE = 1048576 +NUM_LOG_RETAIN = 30 + +[redis] +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 +REDIS_DB=10 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 5 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0