I'm making an AXIS PTZ module and everything is working like a charm.
But 1 small issue i solved but dont understand why it happend.
in the python file i have this part:
The problem is that ptz was a number before but i needed to convert it to a string to apply it in the url.
So in python i did this:
Which worked when tested in python (i replaced the self. part with a variable, so ptznummer = '5' ptz = str(ptznummer))
But when i uploaded the logic module it would not work (no errors)
I "fixed" it by changing the PTZNUMMER to a string instead of a number.
But that also means i have to change the number to a string in my logic at a point and it seems a step to much.
Anyone here know why it wouldnt convert to a string when uploaded?
But 1 small issue i solved but dont understand why it happend.
in the python file i have this part:
Code:
#ophalen variabelen ipadr = (self._get_input_value(self.PIN_I_IP_ADRES)) ptz = (self._get_input_value(self.PIN_I_PTZNUMMER)) user = (self._get_input_value(self.PIN_I_USERNAME)) password = (self._get_input_value(self.PIN_I_PASSWORD)) #url creeeren ptz_url = ('http://'+ipadr+'/axis-cgi/com/ptz.cgi?gotoserverpresetno='+ptz)
So in python i did this:
Code:
ptz = str(self._get_input_value(self.PIN_I_PTZNUMMER))
But when i uploaded the logic module it would not work (no errors)
I "fixed" it by changing the PTZNUMMER to a string instead of a number.
But that also means i have to change the number to a string in my logic at a point and it seems a step to much.
Anyone here know why it wouldnt convert to a string when uploaded?