Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 762
» Latest member: johnsonfe
» Forum threads: 298
» Forum posts: 1,683

Full Statistics

Online Users
There are currently 46 online users.
» 0 Member(s) | 46 Guest(s)

Latest Threads
SIP Stopped Working After...
Forum: Report a problem
Last Post: dan
2024 Dec 16, 04:19 PM
» Replies: 6
» Views: 214
Master keeps resetting to...
Forum: Report a problem
Last Post: DavidCNZ
2024 Dec 04, 08:57 PM
» Replies: 12
» Views: 228
installation fails
Forum: Installation and set up questions
Last Post: dan
2024 Nov 20, 06:52 PM
» Replies: 4
» Views: 81
Allow plugins ability to ...
Forum: Feature requests
Last Post: jonathan
2024 Aug 11, 10:56 PM
» Replies: 11
» Views: 474
Tank Fill Function
Forum: Feature requests
Last Post: dan
2024 Jul 12, 03:07 PM
» Replies: 3
» Views: 262
Curl Method Menu
Forum: Installation and set up questions
Last Post: astrogerard
2024 Jun 22, 03:15 PM
» Replies: 4
» Views: 326
Module i2c relay.
Forum: Feature requests
Last Post: litronas
2024 Jun 22, 12:45 PM
» Replies: 5
» Views: 375
problem after upgrade to ...
Forum: Installation and set up questions
Last Post: Darek
2024 May 19, 08:54 PM
» Replies: 2
» Views: 251
Monthly Adjust per Statio...
Forum: Writing plugins
Last Post: cdesouza
2024 Apr 18, 06:33 AM
» Replies: 17
» Views: 848
MQTT Plugin initialised b...
Forum: Report a problem
Last Post: cdesouza
2024 Mar 25, 03:56 PM
» Replies: 2
» Views: 228

 
  Getting double plugin in plugin list and LOADING.... on homepage
Posted by: tutqiunnh - 2023 Aug 30, 11:58 PM - Forum: Plugin questions - Replies (4)

Dan,
 
    I'm writing a plugin that uses weewx weather station to emulate the rain sensor function. With a bit of mods to helpers, gpio_pins, and sip I can pass the output of the plugin to the "rain_sensor" value in helpers, no tracebacks. However, when I print out the plugins.__all__ variable it only shows 1 instance of my plugin in the list. But on the homepage dropdown there are 2 in the list and the stations all show "LOADING......"  I'm using version 4.1.51.

   I  disable my plugin and just let the fake_gpio library control the rain_sensor it randomly changes between 1 and 0, stations, all load and homepage functions as expected. I'm sure I'm creating some kind of loop. in sip.py the tweak I made was to assign plugins.__all__ to a global that I could pass to helpers.py so that I can see if the plugin is loaded to ensure that the rain_sensor variable is being set in the check_rain() subroutine. That all seems to work fine. Just don't understand the problem I've created with the plugin to cause the problem.

Thanks,

  Bryan

Update: Nevermind. Just had to use a gv.sd and add an new global value for the wx_rain_sensor value to pass between plugin and helpers and issue went away.

Print this item

  Node-red http input
Posted by: greenembrace - 2023 Aug 27, 03:07 AM - Forum: Installation and set up questions - Replies (1)

Hi

I'm playing with node-red and have tried the examples supplied. Thanks for doing those.

All work except I'm not sure what the URL in the HTTP get node should be. 
The post from node-red to SIP works as expected.
SIP and node-red are on two different Rpi's.

The reason i'm asking is that nothing comes in through those nodes

kind regards
daniel

Print this item

  installation issues
Posted by: greenembrace - 2023 Aug 26, 05:50 AM - Forum: Installation and set up questions - Replies (16)

I must be pretty stupid Undecided 

I used the curl installation method on a freshly minted rpi os 64-bit lite. I did install python 11.4. also no issues.

SIP seem to install OK. but the service is not starting with the following output:

Code:
daniel@unode-irrigation:~ $ systemctl status sip
● sip.service - SIP for Python3
    Loaded: loaded (/etc/systemd/system/sip.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2023-08-26 15:24:39 AEST; 1min 6s ago
    Process: 492 ExecStart=/usr/bin/python3 -u /home/daniel/SIP/sip.py (code=exited, status=1/FAILURE)
  Main PID: 492 (code=exited, status=1/FAILURE)
        CPU: 1.274s

Aug 26 15:24:39 unode-irrigation sip[492]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 26 15:24:39 unode-irrigation sip[492]:  File "/home/daniel/SIP/web/httpserver.py", line 167, in runsimple
Aug 26 15:24:39 unode-irrigation sip[492]:    server = WSGIServer(server_address, func)
Aug 26 15:24:39 unode-irrigation sip[492]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 26 15:24:39 unode-irrigation sip[492]:  File "/home/daniel/SIP/web/httpserver.py", line 188, in WSGIServer
Aug 26 15:24:39 unode-irrigation sip[492]:    from cheroot import wsgi
Aug 26 15:24:39 unode-irrigation sip[492]: ImportError: cannot import name 'wsgi' from 'cheroot' (unknown location)
Aug 26 15:24:39 unode-irrigation systemd[1]: sip.service: Main process exited, code=exited, status=1/FAILURE
Aug 26 15:24:39 unode-irrigation systemd[1]: sip.service: Failed with result 'exit-code'.
Aug 26 15:24:39 unode-irrigation systemd[1]: sip.service: Consumed 1.274s CPU time.

I has ssh access without issue.
sorry to waste your time
daniel

Print this item

  I2C LCD not work
Posted by: ZioMauri - 2023 Aug 23, 10:13 PM - Forum: Plugin questions - Replies (10)

lcd_adj plugin returns blank page with "internal server error"
I started SIP manually with these commands:
sudo systemctl stop sip
cd SIP
sudo python sip.py

When I select the SETTING LCD button it returns blank page with "internal server error"
This is the error it gives me:


File "/home/mauri/SIP/web/template.py", line 1130, in _template
    self._cache[name] = self._load_template(name)
  File "/home/mauri/SIP/web/template.py", line 1108, in _load_template
    return Template(
  File "/home/mauri/SIP/web/template.py", line 943, in __init__
    code = self.compile_template(text, filename)
  File "/home/mauri/SIP/web/template.py", line 1020, in compile_template
    compiled_code = compile(code, filename, "exec")
  File "templates/lcd_adj.html", line 7
    // Initialize behaviors
                          ^
SyntaxError: invalid syntax

Template traceback:
    File 'templates/lcd_adj.html', line 7
            // Initialize behaviors

::ffff:192.168.10.103:53596 - - [23/Aug/2023 23:47:55] "HTTP/1.1 GET /lcd" - 500 Internal Server Error

Print this item

  SIP version 5.0.0 released (Python 3 only)
Posted by: dan - 2023 Aug 19, 05:02 PM - Forum: Announcements - Replies (10)

8-19-2023

With the release of version 5.0.0 SIP will run under Python 3 only. Support for Python 2.x has been removed.

The latest Raspberry pi OS uses Python 3.9.2 as default.

If you are running an older version of Raspbian such as Buster it would be a good idea to upgrade to the latest Raspberry Pi OS

This release also includes a new Polish language translation.

A new node-red plugin is included by default but is not yet activated. It is usable but is still a work in progress. The documentation has not been finalized and the SIP irrigation nodes need to be published to the node-red library. This should happen within the next few days. 

8-23-2023
The SIP irrigation nodes can now be installed from the node-red library.
Open "Manage palette" (Alt Shift P) and search for "sip" or "irrigation". You should see a module named
" @sip-irrigation/node-red-sip-irrigation-nodes"

Dan

Print this item

Photo versioning weirdness 4.1.54 changes to 4.1.999
Posted by: draggaj - 2023 Aug 15, 06:58 AM - Forum: Installation and set up questions - Replies (1)

Hi Dan, Hi all,
Hope you've all been safe and well.....

Noticing general weirdness after install fresh build fresh RPi and SD...
RPi 4, latest Raspian (as of 10/8/2023) and took the python3 path for SIP.

Once installed and started, but prior to reboot, the version and date shows as 4.1.54 (2023-03-25)
After reboot and then make first change, e.g. change Default Language to English and save, (which then restarts SIP) then UI reports 4.1.999 (2015-01-09). 

Also seeing popup message "SIP could not restart.Please restart the program from the command line". This occurs, for example, even after name change when I can hear (default ON relays open and close) and see UI restart SIP.

Once fully configured as I need, it appears to work as previous SIPs I have built, apart from the cosmetic versioning issue and the restart alert popup.

Anyone else?

Print this item

  help clarify web / mobile API
Posted by: msambol - 2023 Jun 30, 01:33 PM - Forum: Report a problem - Replies (3)

Hi, I've been using SIP for years but recently having some problems with reliability. This is likely not SIP's fault, I have semi-regular power outs and network outages. I have some alerts set up to let me know if SIP is unavailable for a long time, but it turns out they're not enough. I'd like to add an alert if for whatever reason the sprinklers haven't been active in several days.

I thought of doing this by checking the sip log / history for latest run date. The documentation around the API and the fields it returns is ... not entirely clear to me.

I found info here: https://nosack.com/sipforum/showthread.php?tid=156
cross-referencing that with https://github.com/Dan-in-CA/SIP/blob/ma...erence.txt
I thought I could use the /jc command's lrun section. 
"last run, used to display log line on home page (list [station index, program number, duration, end time])"

While the first two numbers change, I'm always getting the same value for the last two:
  "lrun": [
    0,
    3,
    1200,
    0
  ]

this is the result shortly after one of the stations was open for 20 minutes in the middle of the afternoon.

The date and time are set correctly on the machine where SIP runs.

I also tried the /jl command. I'm getting an empty array, despite the fact that I enabled logs, see the latest run in the web UI and the /wl command downloads a CSV which includes the latest run.

Am I doing something wrong, or can you help me understand the right way to programmatically pull the latest run?

I'm running version: 4.1.53 (2022-12-04).

Print this item

  Home page Hourly Display
Posted by: tutqiunnh - 2023 Jun 13, 07:02 PM - Forum: Report a problem - Replies (4)

Dan,

      As I have been hacking away on my weewx plugin. I noticed something with hourly display on the homepage that I have not been able to chase down the cause. If I open the homepage during the time window when programs are scheduled and the system enable is off, the hourly window shows programs scheduled to run/or could have been in an ~1nr window around the current time indicator bar (they are hashed, I think indicating they are not being run). The color/name legend at the bottom shows up but the name portion is not the station name from the programData.json as it would be in for a program that has been or is being run. Instead the name is "PROGRAM #" where, # is the pid of the program. Is that intended?
I have the 24hr-clock option off.

Thanks,

Print this item

  enable/disable programs via a plugin
Posted by: tutqiunnh - 2023 Jun 11, 02:25 AM - Forum: Plugin questions - Replies (1)

Dan,

    Still hacking away on my weewx weather station plug in prototype.
    I've been scanning the code to understand how the enable/disable program works. The HTTP method is useful and SF for my shell script implementation. However, as I'm implementing the plugin I can't see a variable or list that handles program enables. I see that urls.py and webpages.py is the way the the HTTP method accesses the programData.json file to handle enable/disable.
    Also I see that gv.pd is the load of program data into sip.py for use executing programs.
    Here is my higher level reasoning, I have programs setup to handle my lawn sections, and programs for my veggy garden drip and another program for shrub drips. I use a monthly data json file to enable watering for the three program types. I use lawn as the system enable/disable and programs are always enabled since lawn has the largest window in months (system off in the cold/rainy months). Once system enabled for lawn, I  want to enable/disable veggy garden and shrubs programs based on the growing/hot dry months of the year (May,Jun,July,Aug...)

Any thoughts on the best way for a plugin to modify the programData.json?
   Should I use:  u"/ep" variable to "fake" a GET request via the plugin?
   or
   just use:
        gv.pd[pid]["enabled"] = int(["1/0"])
        jsave(gv.pd, "programData")
   in the plugin?

I have messed around a bit and programData seems to be a dict, which I have not handled yet in python. Seems that a for loop can find the index of an item in the dict and then I can change then enabled entry in that item.

Thanks,
Bryan

Print this item

  GV SD definitions
Posted by: RandyBryant - 2023 Jun 08, 10:38 PM - Forum: Installation and set up questions - Replies (3)

I thought I found this info once, but cannot find it again. Are there any docs for the abbreviations used for the global variables in gv.sd?

Print this item