I have an update. I re-installed all the programs: INDI and pyindi and now its working !
For the records, the name of the camera that one have to write in line 12 of the script can be found in ekos. Also, in the same place it can be found the drivers which that camera use, in order to use them when start the INDI server in the console (i.e. indiserver indi_sbig_ccd.
I dont know where the problem was.
Thank you very much
One last thing. Now, when you call the script, it enters in an endless loop and so, the command line is blocked. Can you guess some way to do that the script only take a photo and release the command line in order to wait for others instructions?
When you start the Python script there should be a list of camera properties (new Property XXX) in your log. There should be the property CCD_BINNING or something similar. Just set a new value the same way you start a new exposure:
def newProperty(self, p):
if p.getName() == "CCD_BINNING":
bin = self.device.getNumber("CCD_BINNING")
bin[0].value = 5
self.sendNewNumber(bin)