Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python3 compatible version now available
#2
(sorry I can seem to unbold this font)….Hi Dan,I knocked up a new build SD card and gave it a go...builds as 4.0.2. Found a few relays default high. This is expected till the Relay_board plug in is installed and Hi  is set for the number of relays...Installed that plug in, but after installing and enabling (and even rebooting), the plug ins drop down only shows default 3, not Relay_Board, so I cant access the plug in to configure relays to suit as previous. I always add pulse cct as one of my default plug ins. In the drop down I can only see Manage Plugins, Pulse Cct and System Update only. I have not yet tried to add any others such as email or Monthly adjust, yet......rather not complicate this just yet. Any thoughts?Bob Wrote:dan
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:
[ul]
[li]Delete or rename any programData.json file and restart SIP[/li]
[li]From the SIP directory run [/li]
[/ul]
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:
[ul]
[li]relay_board[/li]
[li]relay_16[/li]
[li]The MQTT plugins[/li]
[li]weather_level_adj[/li]
[li]lcd_adj[/li]
[li]email_adj[/li]
[/ul]
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
Reply


Messages In This Thread
Python3 compatible version now available - by dan - 2019 Dec 01, 05:39 PM
RE: Python3 compatible version now available - by draggaj - 2019 Dec 03, 10:32 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)