Hi Guys, i'm configuring a windows domain to manage all my rigs. These are mine configurations:
Server OS: Windows Server 2012 R2
Client OS: Windows 10
These the group policy:
- Disable windows firewall
- Disable windows update
- Disalbe windows defender
- Disable error gui (
This is important for the miners auto-restart)
- Disable energy saver
- Autologon
- Screensaver after 60sec
- Paging File to 16384 Mb
Next step is try to install Nvidia driver with GPO. This seems impossible, probably this is the way:
Link. Ok, it's works, you can install and update the driver. The admin user must be local rig admin too.
Now i'm managing the miner with resiliosync, but i'm planning to install awesomeminer to manage miner ad GPUs settings.
To reset rig i use a raspberry
Link with a relay card
Link, really simple to do with cayenne. This is fine up to 16 rigs.
Now i'm configuring this expansion card
Link to connect to the raspberry multiple relay boards.
this is the python program i am testing:
# importazione librerie
from Tkinter import *
import tkFont
import time
import os
from IOPi import IOPi
#download library
#git clone https://github.com/abelectronicsuk/ABElectronics_Python_Libraries.git
#install
#sudo python setup.py install
# Impostazione N° RIG
N_RIG =21
# Impostazione tempi
Reset=6.1 # durata impulso
Spegni=0.5 # durata impulso
# Configurazione BUS
bus1 = IOPi(0x20)
bus2 = IOPi(0x21)
# Impostazione finestra di dialogo
win = Tk()
win.title("Gestione RIG")
win.geometry('1200x720')
Font0 = tkFont.Font(family = 'Helvetica', size = 30, weight = 'bold')
Font1 = tkFont.Font(family = 'Helvetica', size = 14, weight = 'bold')
Font2 = tkFont.Font(family = 'Helvetica', size = 10, weight = 'bold')
ditta = "Company name"
Height_frame = 100
Width_frame = 230
Height_button = 2
Width_button = 8
Posx_button1 = 10
Posx_button2 = 117
Posy_button = 5
Posx_framecol1 = 7
Posx_framecol2 = 247
Posx_framecol3 = 487
Posx_framecol4 = 727
Posx_framecol5 = 967
Posy_framerow1 = 60
Posy_framerow2 = 170
Posy_framerow3 = 280
Posy_framerow4 = 390
Posy_framerow5 = 500
Posy_framerow6 = 610
Posx_exit = 1100
Posy_exit = 640
# Definizione uscite digitali
bus1.set_port_direction(0, 0x00)
bus1.set_port_direction(1, 0x00)
bus2.set_port_direction(0, 0x00)
bus2.set_port_direction(1, 0x00)
# Settaggio uscite digitali di default
for i in range(1,17):
bus1.write_pin(i, 1)
bus2.write_pin(i, 1)
# Comandi
def ResetR1():
bus1.write_pin(1, 0)
time.sleep(Reset)
bus1.write_pin(1, 1)
def SpegniR1():
bus1.write_pin(1, 0)
time.sleep(Spegni)
bus1.write_pin(1, 1)
if N_RIG > 1 :
def ResetR2():
bus1.write_pin(2, 0)
time.sleep(Reset)
bus1.write_pin(2, 1)
def SpegniR2():
bus1.write_pin(2, 0)
time.sleep(Spegni)
bus1.write_pin(2, 1)
if N_RIG > 2 :
def ResetR3():
bus1.write_pin(3, 0)
time.sleep(Reset)
bus1.write_pin(3, 1)
def SpegniR3():
bus1.write_pin(3, 0)
time.sleep(Spegni)
bus1.write_pin(3, 1)
if N_RIG > 3 :
def ResetR4():
bus1.write_pin(4, 0)
time.sleep(Reset)
bus1.write_pin(4, 1)
def SpegniR4():
bus1.write_pin(4, 0)
time.sleep(Spegni)
bus1.write_pin(4, 1)
if N_RIG > 4 :
def ResetR5():
bus1.write_pin(5, 0)
time.sleep(Reset)
bus1.write_pin(5, 1)
def SpegniR5():
bus1.write_pin(5, 0)
time.sleep(Spegni)
bus1.write_pin(5, 1)
if N_RIG > 5 :
def ResetR6():
bus1.write_pin(6, 0)
time.sleep(Reset)
bus1.write_pin(6, 1)
def SpegniR6():
bus1.write_pin(6, 0)
time.sleep(Spegni)
bus1.write_pin(6, 1)
if N_RIG > 6 :
def ResetR7():
bus1.write_pin(7, 0)
time.sleep(Reset)
bus1.write_pin(7, 1)
def SpegniR7():
bus1.write_pin(7, 0)
time.sleep(Spegni)
bus1.write_pin(7, 1)
if N_RIG > 7 :
def ResetR8():
bus1.write_pin(8, 0)
time.sleep(Reset)
bus1.write_pin(8, 1)
def SpegniR8():
bus1.write_pin(8, 0)
time.sleep(Spegni)
bus1.write_pin(8, 1)
if N_RIG > 8 :
def ResetR9():
bus1.write_pin(9, 0)
time.sleep(Reset)
bus1.write_pin(9, 1)
def SpegniR9():
bus1.write_pin(9, 0)
time.sleep(Spegni)
bus1.write_pin(9, 1)
if N_RIG > 9 :
def ResetR10():
bus1.write_pin(10, 0)
time.sleep(Reset)
bus1.write_pin(10, 1)
def SpegniR10():
bus1.write_pin(10, 0)
time.sleep(Spegni)
bus1.write_pin(10, 1)
if N_RIG > 10 :
def ResetR11():
bus1.write_pin(11, 0)
time.sleep(Reset)
bus1.write_pin(11, 1)
def SpegniR11():
bus1.write_pin(11, 0)
time.sleep(Spegni)
bus1.write_pin(11, 1)
if N_RIG > 11 :
def ResetR12():
bus1.write_pin(12, 0)
time.sleep(Reset)
bus1.write_pin(12, 1)
def SpegniR12():
bus1.write_pin(12, 0)
time.sleep(Spegni)
bus1.write_pin(12, 1)
if N_RIG > 12 :
def ResetR13():
bus1.write_pin(13, 0)
time.sleep(Reset)
bus1.write_pin(13, 1)
def SpegniR13():
bus1.write_pin(13, 0)
time.sleep(Spegni)
bus1.write_pin(13, 1)
if N_RIG > 13 :
def ResetR14():
bus1.write_pin(14, 0)
time.sleep(Reset)
bus1.write_pin(14, 1)
def SpegniR14():
bus1.write_pin(14, 0)
time.sleep(Spegni)
bus1.write_pin(14, 1)
if N_RIG > 14 :
def ResetR15():
bus1.write_pin(15, 0)
time.sleep(Reset)
bus1.write_pin(15, 1)
def SpegniR15():
bus1.write_pin(15, 0)
time.sleep(Spegni)
bus1.write_pin(15, 1)
if N_RIG > 15 :
def ResetR16():
bus1.write_pin(16, 0)
time.sleep(Reset)
bus1.write_pin(16, 1)
def SpegniR16():
bus1.write_pin(16, 0)
time.sleep(Spegni)
bus1.write_pin(16, 1)
if N_RIG > 16 :
def ResetR17():
bus2.write_pin(1, 0)
time.sleep(Reset)
bus2.write_pin(1, 1)
def SpegniR17():
bus2.write_pin(1, 0)
time.sleep(Spegni)
bus2.write_pin(1, 1)
if N_RIG > 17 :
def ResetR18():
bus2.write_pin(2, 0)
time.sleep(Reset)
bus2.write_pin(2, 1)
def SpegniR18():
bus2.write_pin(2, 0)
time.sleep(Spegni)
bus2.write_pin(2, 1)
if N_RIG > 18 :
def ResetR19():
bus2.write_pin(3, 0)
time.sleep(Reset)
bus2.write_pin(3, 1)
def SpegniR19():
bus2.write_pin(3, 0)
time.sleep(Spegni)
bus2.write_pin(3, 1)
if N_RIG > 19 :
def ResetR20():
bus2.write_pin(4, 0)
time.sleep(Reset)
bus2.write_pin(4, 1)
def SpegniR20():
bus2.write_pin(4, 0)
time.sleep(Spegni)
bus2.write_pin(4, 1)
if N_RIG > 20 :
def ResetR21():
bus2.write_pin(5, 0)
time.sleep(Reset)
bus2.write_pin(5, 1)
def SpegniR21():
bus2.write_pin(5, 0)
time.sleep(Spegni)
bus2.write_pin(5, 1)
if N_RIG > 21 :
def ResetR22():
bus2.write_pin(6, 0)
time.sleep(Reset)
bus2.write_pin(6, 1)
def SpegniR22():
bus2.write_pin(6, 0)
time.sleep(Spegni)
bus2.write_pin(6, 1)
if N_RIG > 22 :
def ResetR23():
bus2.write_pin(7, 0)
time.sleep(Reset)
bus2.write_pin(7, 1)
def SpegniR23():
bus2.write_pin(7, 0)
time.sleep(Spegni)
bus2.write_pin(7, 1)
if N_RIG > 23 :
def ResetR24():
bus2.write_pin(8, 0)
time.sleep(Reset)
bus2.write_pin(8, 1)
def SpegniR24():
bus2.write_pin(8, 0)
time.sleep(Spegni)
bus2.write_pin(8, 1)
if N_RIG > 24 :
def ResetR25():
bus2.write_pin(9, 0)
time.sleep(Reset)
bus2.write_pin(9, 1)
def SpegniR25():
bus2.write_pin(9, 0)
time.sleep(Spegni)
bus2.write_pin(9, 1)
def ResetRAll():
bus1.write_pin(1, 0)
if N_RIG > 1 :
bus1.write_pin(2, 0)
if N_RIG > 2 :
bus1.write_pin(3, 0)
if N_RIG > 3 :
bus1.write_pin(4, 0)
if N_RIG > 4 :
bus1.write_pin(5, 0)
if N_RIG > 5 :
bus1.write_pin(6, 0)
if N_RIG > 6 :
bus1.write_pin(7, 0)
if N_RIG > 7 :
bus1.write_pin(8, 0)
if N_RIG > 8 :
bus1.write_pin(9, 0)
if N_RIG > 9 :
bus1.write_pin(10, 0)
if N_RIG > 10 :
bus1.write_pin(11, 0)
if N_RIG > 11 :
bus1.write_pin(12, 0)
if N_RIG > 12 :
bus1.write_pin(13, 0)
if N_RIG > 13 :
bus1.write_pin(14, 0)
if N_RIG > 14 :
bus1.write_pin(15, 0)
if N_RIG > 15 :
bus1.write_pin(16, 0)
if N_RIG > 16 :
bus2.write_pin(1, 0)
if N_RIG > 17 :
bus2.write_pin(2, 0)
if N_RIG > 18 :
bus2.write_pin(3, 0)
if N_RIG > 19 :
bus2.write_pin(4, 0)
if N_RIG > 20 :
bus2.write_pin(5, 0)
if N_RIG > 21 :
bus2.write_pin(6, 0)
if N_RIG > 22 :
bus2.write_pin(7, 0)
if N_RIG > 23 :
bus2.write_pin(8, 0)
if N_RIG > 24 :
bus2.write_pin(9, 0)
time.sleep(Reset)
bus1.write_pin(1, 1)
if N_RIG > 1 :
bus1.write_pin(2, 1)
if N_RIG > 2 :
bus1.write_pin(3, 1)
if N_RIG > 3 :
bus1.write_pin(4, 1)
if N_RIG > 4 :
bus1.write_pin(5, 1)
if N_RIG > 5 :
bus1.write_pin(6, 1)
if N_RIG > 6 :
bus1.write_pin(7, 1)
if N_RIG > 7 :
bus1.write_pin(8, 1)
if N_RIG > 8 :
bus1.write_pin(9, 1)
if N_RIG > 9 :
bus1.write_pin(10, 1)
if N_RIG > 10 :
bus1.write_pin(11, 1)
if N_RIG > 11 :
bus1.write_pin(12, 1)
if N_RIG > 12 :
bus1.write_pin(13, 1)
if N_RIG > 13 :
bus1.write_pin(14, 1)
if N_RIG > 14 :
bus1.write_pin(15, 1)
if N_RIG > 15 :
bus1.write_pin(16, 1)
if N_RIG > 16 :
bus2.write_pin(1, 1)
if N_RIG > 17 :
bus2.write_pin(2, 1)
if N_RIG > 18 :
bus2.write_pin(3, 1)
if N_RIG > 19 :
bus2.write_pin(4, 1)
if N_RIG > 20 :
bus2.write_pin(5, 1)
if N_RIG > 21 :
bus2.write_pin(6, 1)
if N_RIG > 22 :
bus2.write_pin(7, 1)
if N_RIG > 23 :
bus2.write_pin(8, 1)
if N_RIG > 24 :
bus2.write_pin(9, 1)
def SpegniRAll():
bus1.write_pin(1, 0)
if N_RIG > 1 :
bus1.write_pin(2, 0)
if N_RIG > 2 :
bus1.write_pin(3, 0)
if N_RIG > 3 :
bus1.write_pin(4, 0)
if N_RIG > 4 :
bus1.write_pin(5, 0)
if N_RIG > 5 :
bus1.write_pin(6, 0)
if N_RIG > 6 :
bus1.write_pin(7, 0)
if N_RIG > 7 :
bus1.write_pin(8, 0)
if N_RIG > 8 :
bus1.write_pin(9, 0)
if N_RIG > 9 :
bus1.write_pin(10, 0)
if N_RIG > 10 :
bus1.write_pin(11, 0)
if N_RIG > 11 :
bus1.write_pin(12, 0)
if N_RIG > 12 :
bus1.write_pin(13, 0)
if N_RIG > 13 :
bus1.write_pin(14, 0)
if N_RIG > 14 :
bus1.write_pin(15, 0)
if N_RIG > 15 :
bus1.write_pin(16, 0)
if N_RIG > 16 :
bus2.write_pin(1, 0)
if N_RIG > 17 :
bus2.write_pin(2, 0)
if N_RIG > 18 :
bus2.write_pin(3, 0)
if N_RIG > 19 :
bus2.write_pin(4, 0)
if N_RIG > 20 :
bus2.write_pin(5, 0)
if N_RIG > 21 :
bus2.write_pin(6, 0)
if N_RIG > 22 :
bus2.write_pin(7, 0)
if N_RIG > 23 :
bus2.write_pin(8, 0)
if N_RIG > 24 :
bus2.write_pin(9, 0)
time.sleep(Spegni)
bus1.write_pin(1, 1)
if N_RIG > 1 :
bus1.write_pin(2, 1)
if N_RIG > 2 :
bus1.write_pin(3, 1)
if N_RIG > 3 :
bus1.write_pin(4, 1)
if N_RIG > 4 :
bus1.write_pin(5, 1)
if N_RIG > 5 :
bus1.write_pin(6, 1)
if N_RIG > 6 :
bus1.write_pin(7, 1)
if N_RIG > 7 :
bus1.write_pin(8, 1)
if N_RIG > 8 :
bus1.write_pin(9, 1)
if N_RIG > 9 :
bus1.write_pin(10, 1)
if N_RIG > 10 :
bus1.write_pin(11, 1)
if N_RIG > 11 :
bus1.write_pin(12, 1)
if N_RIG > 12 :
bus1.write_pin(13, 1)
if N_RIG > 13 :
bus1.write_pin(14, 1)
if N_RIG > 14 :
bus1.write_pin(15, 1)
if N_RIG > 15 :
bus1.write_pin(16, 1)
if N_RIG > 16 :
bus2.write_pin(1, 1)
if N_RIG > 17 :
bus2.write_pin(2, 1)
if N_RIG > 18 :
bus2.write_pin(3, 1)
if N_RIG > 19 :
bus2.write_pin(4, 1)
if N_RIG > 20 :
bus2.write_pin(5, 1)
if N_RIG > 21 :
bus2.write_pin(6, 1)
if N_RIG > 22 :
bus2.write_pin(7, 1)
if N_RIG > 23 :
bus2.write_pin(8, 1)
if N_RIG > 24 :
bus2.write_pin(9, 1)
def exitProgram():
exit()
# Gestione grafica
Label_Main = Label(win, text = ditta, font = Font0 )
Label_Main.pack()
Label1 = LabelFrame(win, text = "RIG 1", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label1.place(x = Posx_framecol1, y = Posy_framerow1)
ButtonR1 = Button(Label1, text = "Reset", font = Font2, bg="red", command = ResetR1, height = Height_button, width = Width_button )
ButtonR1.place(x = Posx_button1, y = Posy_button)
ButtonS1 = Button(Label1, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR1, height = Height_button, width = Width_button )
ButtonS1.place(x = Posx_button2, y = Posy_button)
if N_RIG > 1 :
Label2 = LabelFrame(win, text = "RIG 2", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label2.place(x = Posx_framecol2, y = Posy_framerow1)
ButtonR2 = Button(Label2, text = "Reset", font = Font2, bg="red", command = ResetR2, height = Height_button, width = Width_button )
ButtonR2.place(x = Posx_button1, y = Posy_button)
ButtonS2 = Button(Label2, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR2, height = Height_button, width = Width_button )
ButtonS2.place(x = Posx_button2, y = Posy_button)
if N_RIG > 2 :
Label3 = LabelFrame(win, text = "RIG 3", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label3.place(x = Posx_framecol3, y = Posy_framerow1)
ButtonR3 = Button(Label3, text = "Reset", font = Font2, bg="red", command = ResetR3, height = Height_button, width = Width_button )
ButtonR3.place(x = Posx_button1, y = Posy_button)
ButtonS3 = Button(Label3, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR3, height = Height_button, width = Width_button )
ButtonS3.place(x = Posx_button2, y = Posy_button)
if N_RIG > 3 :
Label4 = LabelFrame(win, text = "RIG 4", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label4.place(x = Posx_framecol4, y = Posy_framerow1)
ButtonR4 = Button(Label4, text = "Reset", font = Font2, bg="red", command = ResetR4, height = Height_button, width = Width_button )
ButtonR4.place(x = Posx_button1, y = Posy_button)
ButtonS4 = Button(Label4, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR4, height = Height_button, width = Width_button )
ButtonS4.place(x = Posx_button2, y = Posy_button)
if N_RIG > 4 :
Label5 = LabelFrame(win, text = "RIG 5", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label5.place(x = Posx_framecol5, y = Posy_framerow1)
ButtonR5 = Button(Label5, text = "Reset", font = Font2, bg="red", command = ResetR5, height = Height_button, width = Width_button )
ButtonR5.place(x = Posx_button1, y = Posy_button)
ButtonS5 = Button(Label5, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR5, height = Height_button, width = Width_button )
ButtonS5.place(x = Posx_button2, y = Posy_button)
if N_RIG > 5 :
Label6 = LabelFrame(win, text = "RIG 6", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label6.place(x = Posx_framecol1, y = Posy_framerow2)
ButtonR6 = Button(Label6, text = "Reset", font = Font2, bg="red", command = ResetR6, height = Height_button, width = Width_button )
ButtonR6.place(x = Posx_button1, y = Posy_button)
ButtonS6 = Button(Label6, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR6, height = Height_button, width = Width_button )
ButtonS6.place(x = Posx_button2, y = Posy_button)
if N_RIG > 6 :
Label7 = LabelFrame(win, text = "RIG 7", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label7.place(x = Posx_framecol2, y = Posy_framerow2)
ButtonR7 = Button(Label7, text = "Reset", font = Font2, bg="red", command = ResetR7, height = Height_button, width = Width_button )
ButtonR7.place(x = Posx_button1, y = Posy_button)
ButtonS7 = Button(Label7, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR7, height = Height_button, width = Width_button )
ButtonS7.place(x = Posx_button2, y = Posy_button)
if N_RIG > 7 :
Label8 = LabelFrame(win, text = "RIG 8", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label8.place(x = Posx_framecol3, y = Posy_framerow2)
ButtonR8 = Button(Label8, text = "Reset", font = Font2, bg="red", command = ResetR8, height = Height_button, width = Width_button )
ButtonR8.place(x = Posx_button1, y = Posy_button)
ButtonS8 = Button(Label8, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR8, height = Height_button, width = Width_button )
ButtonS8.place(x = Posx_button2, y = Posy_button)
if N_RIG > 8 :
Label9 = LabelFrame(win, text = "RIG 9", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label9.place(x = Posx_framecol4, y = Posy_framerow2)
ButtonR9 = Button(Label9, text = "Reset", font = Font2, bg="red", command = ResetR9, height = Height_button, width = Width_button )
ButtonR9.place(x = Posx_button1, y = Posy_button)
ButtonS9 = Button(Label9, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR9, height = Height_button, width = Width_button )
ButtonS9.place(x = Posx_button2, y = Posy_button)
if N_RIG > 9 :
Label10 = LabelFrame(win, text = "RIG 10", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label10.place(x = Posx_framecol5, y = Posy_framerow2)
ButtonR10 = Button(Label10, text = "Reset", font = Font2, bg="red", command = ResetR10, height = Height_button, width = Width_button )
ButtonR10.place(x = Posx_button1, y = Posy_button)
ButtonS10 = Button(Label10, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR10, height = Height_button, width = Width_button )
ButtonS10.place(x = Posx_button2, y = Posy_button)
if N_RIG > 10 :
Label11 = LabelFrame(win, text = "RIG 11", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label11.place(x = Posx_framecol1, y = Posy_framerow3)
ButtonR11 = Button(Label11, text = "Reset", font = Font2, bg="red", command = ResetR11, height = Height_button, width = Width_button )
ButtonR11.place(x = Posx_button1, y = Posy_button)
ButtonS11 = Button(Label11, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR11, height = Height_button, width = Width_button )
ButtonS11.place(x = Posx_button2, y = Posy_button)
if N_RIG > 11 :
Label12 = LabelFrame(win, text = "RIG 12", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label12.place(x = Posx_framecol2, y = Posy_framerow3)
ButtonR12 = Button(Label12, text = "Reset", font = Font2, bg="red", command = ResetR12, height = Height_button, width = Width_button )
ButtonR12.place(x = Posx_button1, y = Posy_button)
ButtonS12 = Button(Label12, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR12, height = Height_button, width = Width_button )
ButtonS12.place(x = Posx_button2, y = Posy_button)
if N_RIG > 12 :
Label13 = LabelFrame(win, text = "RIG 13", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label13.place(x = Posx_framecol3, y = Posy_framerow3)
ButtonR13 = Button(Label13, text = "Reset", font = Font2, bg="red", command = ResetR13, height = Height_button, width = Width_button )
ButtonR13.place(x = Posx_button1, y = Posy_button)
ButtonS13 = Button(Label13, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR13, height = Height_button, width = Width_button )
ButtonS13.place(x = Posx_button2, y = Posy_button)
if N_RIG > 13 :
Label14 = LabelFrame(win, text = "RIG 14", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label14.place(x = Posx_framecol4, y = Posy_framerow3)
ButtonR14 = Button(Label14, text = "Reset", font = Font2, bg="red", command = ResetR14, height = Height_button, width = Width_button )
ButtonR14.place(x = Posx_button1, y = Posy_button)
ButtonS14 = Button(Label14, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR14, height = Height_button, width = Width_button )
ButtonS14.place(x = Posx_button2, y = Posy_button)
if N_RIG > 14 :
Label15 = LabelFrame(win, text = "RIG 15", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label15.place(x = Posx_framecol5, y = Posy_framerow3)
ButtonR15 = Button(Label15, text = "Reset", font = Font2, bg="red", command = ResetR15, height = Height_button, width = Width_button )
ButtonR15.place(x = Posx_button1, y = Posy_button)
ButtonS15 = Button(Label15, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR15, height = Height_button, width = Width_button )
ButtonS15.place(x = Posx_button2, y = Posy_button)
if N_RIG > 15 :
Label16 = LabelFrame(win, text = "RIG 16", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label16.place(x = Posx_framecol1, y = Posy_framerow4)
ButtonR16 = Button(Label16, text = "Reset", font = Font2, bg="red", command = ResetR16, height = Height_button, width = Width_button )
ButtonR16.place(x = Posx_button1, y = Posy_button)
ButtonS16 = Button(Label16, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR16, height = Height_button, width = Width_button )
ButtonS16.place(x = Posx_button2, y = Posy_button)
if N_RIG > 16 :
Label17 = LabelFrame(win, text = "RIG 17", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label17.place(x = Posx_framecol2, y = Posy_framerow4)
ButtonR17 = Button(Label17, text = "Reset", font = Font2, bg="red", command = ResetR17, height = Height_button, width = Width_button )
ButtonR17.place(x = Posx_button1, y = Posy_button)
ButtonS17 = Button(Label17, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR17, height = Height_button, width = Width_button )
ButtonS17.place(x = Posx_button2, y = Posy_button)
if N_RIG > 17 :
Label18 = LabelFrame(win, text = "RIG 18", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label18.place(x = Posx_framecol3, y = Posy_framerow4)
ButtonR18 = Button(Label18, text = "Reset", font = Font2, bg="red", command = ResetR18, height = Height_button, width = Width_button )
ButtonR18.place(x = Posx_button1, y = Posy_button)
ButtonS18 = Button(Label18, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR18, height = Height_button, width = Width_button )
ButtonS18.place(x = Posx_button2, y = Posy_button)
if N_RIG > 18 :
Label19 = LabelFrame(win, text = "RIG 19", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label19.place(x = Posx_framecol4, y = Posy_framerow4)
ButtonR19 = Button(Label19, text = "Reset", font = Font2, bg="red", command = ResetR19, height = Height_button, width = Width_button )
ButtonR19.place(x = Posx_button1, y = Posy_button)
ButtonS19 = Button(Label19, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR19, height = Height_button, width = Width_button )
ButtonS19.place(x = Posx_button2, y = Posy_button)
if N_RIG > 19 :
Label20 = LabelFrame(win, text = "RIG 20", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label20.place(x = Posx_framecol5, y = Posy_framerow4)
ButtonR20 = Button(Label20, text = "Reset", font = Font2, bg="red", command = ResetR20, height = Height_button, width = Width_button )
ButtonR20.place(x = Posx_button1, y = Posy_button)
ButtonS20 = Button(Label20, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR20, height = Height_button, width = Width_button )
ButtonS20.place(x = Posx_button2, y = Posy_button)
if N_RIG > 20 :
Label21 = LabelFrame(win, text = "RIG 21", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label21.place(x = Posx_framecol1, y = Posy_framerow5)
ButtonR21 = Button(Label21, text = "Reset", font = Font2, bg="red", command = ResetR21, height = Height_button, width = Width_button )
ButtonR21.place(x = Posx_button1, y = Posy_button)
ButtonS21 = Button(Label21, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR21, height = Height_button, width = Width_button )
ButtonS21.place(x = Posx_button2, y = Posy_button)
if N_RIG > 21 :
Label22 = LabelFrame(win, text = "RIG 22", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label22.place(x = Posx_framecol2, y = Posy_framerow5)
ButtonR22 = Button(Label22, text = "Reset", font = Font2, bg="red", command = ResetR22, height = Height_button, width = Width_button )
ButtonR22.place(x = Posx_button1, y = Posy_button)
ButtonS22 = Button(Label22, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR22, height = Height_button, width = Width_button )
ButtonS22.place(x = Posx_button2, y = Posy_button)
if N_RIG > 22 :
Label23 = LabelFrame(win, text = "RIG 23", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label23.place(x = Posx_framecol3, y = Posy_framerow5)
ButtonR23 = Button(Label23, text = "Reset", font = Font2, bg="red", command = ResetR23, height = Height_button, width = Width_button )
ButtonR23.place(x = Posx_button1, y = Posy_button)
ButtonS23 = Button(Label23, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR23, height = Height_button, width = Width_button )
ButtonS23.place(x = Posx_button2, y = Posy_button)
if N_RIG > 23 :
Label23 = LabelFrame(win, text = "RIG 24", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label23.place(x = Posx_framecol4, y = Posy_framerow5)
ButtonR23 = Button(Label24, text = "Reset", font = Font2, bg="red", command = ResetR24, height = Height_button, width = Width_button )
ButtonR23.place(x = Posx_button1, y = Posy_button)
ButtonS23 = Button(Label24, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR24, height = Height_button, width = Width_button )
ButtonS23.place(x = Posx_button2, y = Posy_button)
if N_RIG > 24 :
Label23 = LabelFrame(win, text = "RIG 25", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
Label23.place(x = Posx_framecol5, y = Posy_framerow5)
ButtonR23 = Button(Label25, text = "Reset", font = Font2, bg="red", command = ResetR25, height = Height_button, width = Width_button )
ButtonR23.place(x = Posx_button1, y = Posy_button)
ButtonS23 = Button(Label25, text = "On/Off", font = Font2, bg="lightgreen", command = SpegniR25, height = Height_button, width = Width_button )
ButtonS23.place(x = Posx_button2, y = Posy_button)
LabelAll = LabelFrame(win, text = "All RIG", font = Font1, borderwidth = 5, height = Height_frame, width = Width_frame)
LabelAll.place(x = Posx_framecol1, y = Posy_framerow6)
ButtonRAll = Button(LabelAll, text = "Reset", font = Font2, bg="pink", command = ResetRAll, height = Height_button, width = Width_button )
ButtonRAll.place(x = Posx_button1, y = Posy_button)
ButtonSAll = Button(LabelAll, text = "On/Off", font = Font2, bg="green", command = SpegniRAll, height = Height_button, width = Width_button )
ButtonSAll.place(x = Posx_button2, y = Posy_button)
exitButton = Button(win, text = "Exit", font = Font2, bg="orange", command = exitProgram, height = Height_button , width = Width_button )
exitButton.place(x = Posx_exit, y = Posy_exit)
win.mainloop()
Any idea is appreciate and i hope these little information is useful to someone.