Python scripts updated

I’ve just updated some of my data logging python scripts. The 1.5.0 version is still the most recommended version for beginners. In this version, I removed the dependency of cURL and replaced it with the builtin module urllib. This way you will be able to upload data without installing cURL. I also updated the API address of thingspeak.com. Although the old API address from a few years ago still works, having the new address helps. I also enabled fields 7 and 8. This means each channel can record up to 8 values instead of 6. If you have more than 8, you still need additional channels.

I also released version 1.5.7. This version is based on 1.5.0 but has better error handling and also has a config file. Only during the first execution, you will be greeted by interactive questions such as which serial port, SDI-12 sensor addresses etc. It then saves the config to a Liudrlogger.conf and will load the config from this file when it is executed next time, so no questions will be asked anymore. This helps auto run the script at boot. Also it remembers the exact SDI-12 adapter by serial number, in case you have multiple serial ports and are using Linux or RPI and these ports tend to change order on every reboot (unless you bind the hardware to a port number).

I have not updated 1.6.0 BP since not many people use multiple SDI-12 USB adapter on the same computer. If you wish, you can change max_upload_values = 6 to max_upload_values = 8 to take advantage of the up to 8 fields per channel capacity of thingspeak.com and update http_request_url_format = ‘https://api.thingspeak.com/update/?api_key=%s%s’ to http_request_url_format = ‘https://api.thingspeak.com/update.json?api_key=%s%s’

Documentation and scripts: