Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python3 compatible version now available
#1
SIP version 4 is now available.

This is a major upgrade and it is recommended to do a full install rather than upgrade an existing installation. First you may want to rename your existing SIP installation as a backup. This will preserve your settings which can be copied to the new installation. Settings are stored in the SIP/data/ folder and include the files programs.json which holds irrigation schedules, sd.json which holds a wide range of settings and snames.json which holds station names.

From the pi directory you can use the command:
Code:
mv SIP SIP-old

SIP V4 can run under both Python 2.7 and Python 3. The latest version of the Raspbian OS (Buster) still runs Python 2.7 as default as of this writing. Python2 will no longer be supported by the developers after January 1 2020 and Raspbian is expected to switch to Python3 as default in the near future. If you would prefer to run SIP under Python3 there is a file named "sip3.service" in the SIP folder which can be used to enable systemctl to run SIP under Python3

This version of SIP also has a new format for storing irrigation programs. there is a utility program that can convert from the old program format which is stored in the SIP/data/ folder as programs.json to the new format which is stored in the file programData.json.The old programs.json file is left as is as a backup. When SIP V4 is started it tries to load programData.json and if that file is not found it will run the convert_progs.py module which is in the SIP folder. If a programs.json file is not found an empty programData.json file is created ready for new irrigation programs to be defined.

If you have an existing programs.json file you wish to convert to the new format, copy it to the SIP/data folder and do one of the following:
  • Delete or rename any programData.json file and restart SIP
  • From the SIP directory run
Code:
sudo python convert_progs.py

form the command line. This will create or overwrite the programData.json file

Many of the most widely used plugins have been updated to work with SIP V4 including:
  • relay_board
  • relay_16
  • The MQTT plugins
  • weather_level_adj
  • lcd_adj
  • email_adj
These plugins will need to be re-installed in SIP V4 and no longer work with SIP V3. Other plugins are being updated as time allows. Please report any problems.

There is also code in place to allow SIP to run under HTTPS but it requires generating a private key and certificate unique to each installation. A key and certificate can generated using openssl. Changing SIP's port setting to 443 on the Options page will activate this feature after the key and certificate are in place. This is an advanced feature and using a self signed certificate will prevent the SIP UI from being accessed with the Chrome browser. You will need to use Firefox. See the code at the end of the sip.py file for locations for the key and certificate files (lines 311 and 312).

Also note that logging is enabled by default and login requiring a passphrase is disabled by default. This is intended to make it easier for new users to get started.

As always, thanks for using SIP and please report any problems.

Dan
<p><br></p>
Reply


Messages In This Thread
Python3 compatible version now available - by dan - 2019 Dec 01, 05:39 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)