On a restart of the program, the program will fail with a number of rather confusing errors:
Error in MyConfig:init: While reading from '/home/pi/Pi-Somfy/operateShutters.conf' [line 130]: option '0x27962c' in section 'ShutterRollingCodes' al\
ready exists : myconfig.py:38
Error in MyConfig:ReadValue: Latitude: float() argument must be a string or a number, not 'list' : myconfig.py:159
Error in MyConfig:ReadValue: Longitude: float() argument must be a string or a number, not 'list' : myconfig.py:159
Error in MyConfig:ReadValue: SendRepeat: int() argument must be a string, a bytes-like object or a number, not 'list' : myconfig.py:164
Error in MyConfig:ReadValue: UseHttps: 'list' object has no attribute 'lower' : myconfig.py:157
Error in MyConfig:ReadValue: HTTPPort: int() argument must be a string, a bytes-like object or a number, not 'list' : myconfig.py:164
Error in MyConfig:ReadValue: HTTPSPort: int() argument must be a string, a bytes-like object or a number, not 'list' : myconfig.py:164
Error in MyConfig:ReadValue: TXGPIO: int() argument must be a string, a bytes-like object or a number, not 'list' : myconfig.py:164
Error in MyConfig:ReadValue: MQTT_Port: int() argument must be a string, a bytes-like object or a number, not 'list' : myconfig.py:164
Error in MyConfig:ReadValue: EnableDiscovery: 'list' object has no attribute 'lower' : myconfig.py:157
Missing config file or config file entries in Section Shutters for key 0x279621: 'list' object has no attribute 'split' : myconfig.py:79
Failure to load configuration parameters
Problem:
The shutters are registered as an uppercase hexadecimal number.
[Shutters]
0x27962C = c,True,2
However, on writing the rolling code back to the config file, the uppercase hexadecimal shutter id is written as a lowercase hexadecimal number.
On registering a shutter, the shutter id is formatted with the following line (mywebserver.py:188):
This will format the id as a Uppercase hexadecimal number. Probably, this should be changed into
FIX
Besides fixing the formatting in nywebserver.py, for existing shutter ids, edit the operateShutters.conf file and make the shutter ids lowercase in the sections [Shutters], [ShutterRollingCodes] and [ShutterIntermediatePositions] and restart.
On a restart of the program, the program will fail with a number of rather confusing errors:
Problem:
The shutters are registered as an uppercase hexadecimal number.
However, on writing the rolling code back to the config file, the uppercase hexadecimal shutter id is written as a lowercase hexadecimal number.
On registering a shutter, the shutter id is formatted with the following line (
mywebserver.py:188):This will format the id as a Uppercase hexadecimal number. Probably, this should be changed into
FIX
Besides fixing the formatting in
nywebserver.py, for existing shutter ids, edit theoperateShutters.conffile and make the shutter ids lowercase in the sections[Shutters], [ShutterRollingCodes]and[ShutterIntermediatePositions]and restart.