Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 197 online users. » 0 Member(s) | 197 Guest(s)
|
|
|
Stopping a program |
Posted by: karlkec - 2019 Dec 23, 07:09 PM - Forum: Plugin questions
- Replies (3)
|
|
All,
Thanks for all the great software and documentation in the SIP system.
I'm working on a local control plugin using an encoder with pushbutton, and an LCD, directly connected to the RPi. So far the plugin can show station status (which stations are on and the time-to-go), turn a station on or off (manual mode), and start a program. I plan to include the ability to display station solenoid current (using a current transformer, a bit of circuitry, and an I2C-connected A-to-D converter). I know this probably wouldn't have much appeal to people due to the amount of hardware work necessary, but it serves a purpose for me.
I have things working pretty well, and am using http GET to control the SIP system from the plugin.
I have a few questions:
- Is the http GET interface the recommended way to control things from a plugin?
- Some GET commands need a password, which requires the plugin to know the password. I see the gv module contains a password hash. Is there a way to use this from the GET interface?
- I'd like my plugin to be able to stop a currently-running program, but I don't see that capability in the GET command reference. Is there a way to do this?
I also encountered an unhandled exception in sip.py when I accidentally tried to turn on the master station via the http GET api. I know this isn't a valid operation, but thought I'd report it anyway. The error was:
Code: Unhandled exception in thread started by <function timing_loop at 0x7670d7c8>
Traceback (most recent call last):
File "sip.py", line 172, in timing_loop
gv.srvals[masid] = 1
UnboundLocalError: local variable 'masid' referenced before assignment
Thanks a lot for all the work you've all put into this system. I look forward to putting it to use.
Karl
|
|
|
Adding option for manual start push button via GPIO |
Posted by: johnall203 - 2019 Dec 18, 03:33 AM - Forum: Feature requests
- Replies (2)
|
|
Hello, this might be a plugin feature request. I wish I was a programmer. I have done some basic things with Python and GPIO’s on my raspberry pi’s but when I tried to deep dive into your code I found that it was over my head. So, I have my SIP controller in my garage, and I was thinking that it would be nice to have an option to have a momentary push button assigned for each Station on a vacant GPIO pin. So each button would represent a station and if you pushed the button it would manually turn that station on for a pre-specified amount of time. If you hit that same button again then it would turn that station back off or pushing a button assigned to another station would change to the new station and turn the previous station off. Thank you for any help ! John
|
|
|
Python3 compatible version now available |
Posted by: dan - 2019 Dec 01, 05:39 PM - Forum: Announcements
- Replies (15)
|
|
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:
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
|
|
|
4.02 Missing Program Schedule |
Posted by: rimmel - 2019 Nov 30, 06:02 AM - Forum: Report a problem
- Replies (1)
|
|
A few strange issues on the upgrade journey to 4.02:
- Upgraded to 3.2.66 a few days ago - seemed to be some mid-cycle changes on the pathway to 4.x, and it wouldn't restart after the update. I had to 'sudo pip3 install future' to fix the missing dependency.
- Today, after updating to 4.02, everything restarted correctly except the programs 'tab'. When selected it would fail out to "internal error" (or some similar text). Restarting the Pi or systemctl the service etc. didnt seem to make difference. After an hour of hacking around, it suddenly came back; I had resaved lots of things, auto/manual, system on/off etc. but no real changes. I did backup my data/program*.json files straight after the upgrade, might set them back again to see if they were involved. No real concerns here, just marking it in case someone else see's the same thing.
My current problem is the station programs don't show in the day/time schedule dashboard, perhaps indicating the scheduler won't run ? I've tried to fix through deleting all programs, re-adding them and have restarted many times - just can't get them to show up. The PI date/time and all configuration looks OK. Just the scheduler appears to be broken, or something in my old settings didnt quite port across the versions ? FWIW the stations all still work manually.
BTW: Dan, thanks for all your efforts. Really appreciate your long term updates and support !
|
|
|
Update bug?? |
Posted by: 22ndst - 2019 Nov 28, 12:44 AM - Forum: Installation and set up questions
- Replies (4)
|
|
I have been running the current version of SIP for three years now. I updated to the Nov 2019 patch and now I am getting "No module named future" errors, preventing SIP to load properly.
I reloaded a fresh copy of the SIP program onto a new micro SD card and still received the same error. Any idea what's going on.
|
|
|
Weather Level plugin updatd |
Posted by: dan - 2019 Sep 20, 08:11 PM - Forum: Announcements
- No Replies
|
|
A weather_level_adj plugin update Is now available.
Click the "help" button on the plugin page to open the documentation page. It contains information about using geographic coordinates for your location. This will provide the most accurate weather data.
You can now select the type of measurement units the plugin page displays.
|
|
|
Format of MQTT Schedule plugin commands? |
Posted by: Ryan - 2019 Aug 10, 01:20 PM - Forum: Plugin questions
- Replies (12)
|
|
Hi folks,
I've had some downtime to work on my moisture monitors for my SIP system, and decided to use MQTT as a way for the monitors, which deep sleep most of the time, to send messages to SIP. I loaded up the MQTT plugins in SIP, messed around with stuff a bit to get Mosquitto working properly (apt and apt-get on Raspberry Pi don't install the latest version of Mosquitto, see https://www.switchdoc.com/2018/02/tutori...pberry-pi/ for details), and now can see messages via the MQTT Zone Broadcaster.
I then tried to send commands to the MQTT Schedule plugin via mosquitto_pub, just to play around with it. I found that "mosquitto_pub -d -h localhost -p 1883 -t sip/schedule -m {\"S01\":\"1\"}" would turn on Station 1 (S01). However, "mosquitto_pub -d -h localhost -p 1883 -t sip/schedule -m {\"S01\":\"0\"}" would not turn off Station 1. I had to manually "Stop All Stations" in the SIP web interface for that to happen.
I didn't see any documentation about the format of the JSON messages that should be sent to the MQTT Schedule plugin, so I was just sort of screwing around to get anything to happen. Is there some documentation somewhere that I'm missing? How should I be controlling the zones via MQTT?
Thanks!
Ryan
|
|
|
Weather-based Water Level plug-in Issue |
Posted by: Dave11 - 2019 Jul 21, 05:46 PM - Forum: Plugin questions
- No Replies
|
|
Getting the following error when using the Weather-based Water Level plug-in. Also using the location of 55378,US.
Any ideas?
Weather-base water level encountered error:
Traceback (most recent call last):
File "/home/pi/SIP/plugins/weather_level_adj.py", line 99, in run
history = history_info(self, today, options)
File "/home/pi/SIP/plugins/weather_level_adj.py", line 286, in history_info
thisdate_time = datetime.datetime(int(tmp[0]), int(tmp[1]), int(tmp[2]), int(tmp[3]), int(tmp[4]))
IndexError: list index out of range
|
|
|
|