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 40 online users.
» 0 Member(s) | 40 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: 82
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

 
  OpenVPN / PiVPN setup instruction
Posted by: Pieterke58 - 2024 Mar 10, 09:42 PM - Forum: Installation and set up questions - Replies (3)

Hi Dan, herewith a very newbie question from the Netherlands. I like to start with conveying my compliments for the SIP program and the work that you're are doing.

As mentioned I'm a newbie and glad that I have SIP now running on a Raspberry Pi 3. I'm able to control it in mine network with iPad and iMac, so far so good. Also ssh connecting to the Pi is working and so I have the ability to make changes etc.

I like to control it later on from outside my network. Therefor I did a lot of searching on this forum and the internet. Finally I installed PiVPN on the raspberry pi and used the wifi adres. Furthermore installed OpenVPN on the iPad and did some changes in the router. OpenVPN comes with an app and with the oven file created on the Pi I'm able to make the connection between the iPad and the raspberry pi.

So until here no issues although I have to admit it was a lot of reading, trying and following instruction without exactly understanding what I was doing. No worries passwords etc are secured so no open gates on router, iPad of pi.

I was wondering of there is a instruction, manual on setting this OpenVPN - PiVPN connection?
Because I'm now puzzling how to reach the SIP homepage on the raspberry pi via this connection. As mentioned I'm able to connect but I have no idea what the next step is.
Do I need to do something in the OpenVPN app on the iPad with proxy??????


best regards, Martin

Print this item

  Problem whit Paho mqtt
Posted by: DrLabel - 2024 Feb 25, 07:24 PM - Forum: Installation and set up questions - Replies (3)

after Google I get to this page :

https://stackoverflow.com/questions/7798...sion-error

I'm getting this error:
pi@sip-system:/opt/SIP $ python3 sip.py
fatal: detected dubious ownership in repository at '/opt/SIP'
To add an exception for this directory, call:

       git config --global --add safe.directory /opt/SIP
Could not use git to determine version! Command '['git', 'rev-list', '--count', 'HEAD']' returned non-zero exit status 128.
fatal: detected dubious ownership in repository at '/opt/SIP'
To add an exception for this directory, call:

       git config --global --add safe.directory /opt/SIP
Could not use git to determine date of last commit! Command '['git', 'log', '-1', '--format=%cd', '--date=short']' returned non-zero exit status 128.
MQTT publish UP
MQTT plugin couldn't initalize client: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
plugins loaded:
 mobile_app
 mqtt
 node_red
 plugin_manager
 relay_board
 system_update
 weather_level_adj
Starting timing loop

http://:::80/
Traceback (most recent call last):
 File "/opt/SIP/sip.py", line 334, in <module>
   app.run()
 File "/opt/SIP/sip.py", line 253, in run
   return web.httpserver.runsimple(func, (ip, port))
 File "/opt/SIP/web/httpserver.py", line 178, in runsimple
   server.start()
 File "/opt/SIP/cheroot/server.py", line 1849, in start
   self.prepare()
 File "/opt/SIP/cheroot/server.py", line 1804, in prepare
   raise socket.error(msg)
OSError: No socket could be created -- (('::', 80, 0, 0): [Errno 13] Permission denied)


The error form paho I fix like this:
python3 -m pip install "paho-mqtt<2.0.0"


But sip don't start

the logs at boot
Feb 25 19:43:09 sip-system sip[410]: Traceback (most recent call last):
Feb 25 19:43:09 sip-system sip[410]: File "/opt/SIP/sip.py", line 21, in <module>
Feb 25 19:43:09 sip-system sip[410]: import gv
Feb 25 19:43:09 sip-system sip[410]: File "/opt/SIP/gv.py", line 106, in <module>
Feb 25 19:43:09 sip-system sip[410]: from helpers import load_programs, station_names, days_since_epoch
Feb 25 19:43:09 sip-system sip[410]: File "/opt/SIP/helpers.py", line 21, in <module>
Feb 25 19:43:09 sip-system sip[410]: from gpio_pins import set_output
Feb 25 19:43:09 sip-system sip[410]: File "/opt/SIP/gpio_pins.py", line 36, in <module>
Feb 25 19:43:09 sip-system sip[410]: if gv.platform == "pi":
Feb 25 19:43:09 sip-system sip[410]: AttributeError: partially initialized module 'gv' has no attribute 'platform' (most likely due to a circular import)
Feb 25 19:43:09 sip-system systemd[1]: sip.service: Main process exited, code=exited, status=1/FAILURE
Feb 25 19:43:09 sip-system systemd[1]: sip.service: Failed with result 'exit-code'.
Feb 25 19:43:09 sip-system systemd[1]: sip.service: Consumed 1.363s CPU time.
---------------------------------------------

Print this item

  Moisture Sensor Chart
Posted by: cdesouza - 2024 Feb 16, 01:06 PM - Forum: Writing plugins - Replies (4)

The purpose of this plugin is to display charts for the following data

  • moisture sensor data collected by the moisture_sensor_data_mqtt plugin
  • watering time (accumulated per day)

Sometime in the future I would also like to display charts for
  • temperature of my overwintering tent
  • water level in the water butt

I have played around with chart.js and have a rudimentary framework setup to configure and display charts:

   
   

I do however have some questions:
  1. I required chart.js and d2.js to be installed. I guess they should be installed under ./static/scripts. How will they be installed, via plugin manifest or will they come with the SIP installation?
  2. As far as I understand the chart.js documentation if I work with milliseconds I do not required a data adapter, however I could not get this to work so I would also required luxon.js and chartjs-adaptor-luxon. Again both in ./static/scripts. So the same question as for 1. applies.
  3. The moisture sensor data that I want to display is under ./data/moisture_sensor_data. This cannot be loaded via d3.js as it does not see this directory. Can this be changed or should the data be stored somewhere else?
  4. For the accumulated watering time I had planned to listen for the schedule completed signal and sum the schedule time for each station or is this information already available somewhere?  

I'm playing with the idea of turning this into a chart plugin that takes a sets of datasource/configuration and displays a chart for each.

Print this item

  Monthly Adjust per Station
Posted by: cdesouza - 2024 Jan 31, 10:42 AM - Forum: Writing plugins - Replies (17)

Hi,

I have more or less completed the third of the 4 plugins I had planned - as the name suggests it allows altering the water amount per station and per month.

   


I have a couple of issues though:

1. The value of the "station" argument does not seem to be correct for the signal "stations_scheduled" as it has the value "SIP" instead of the station number n:

Code:
def notify_station_completed(station, **kw):
    print(f"Station {station} run completd")

completed_signal = signal("station_completed")
completed_signal.connect(notify_station_completed)


def notify_stations_scheduled(station, **kw):
    print(f"Station {station} run scheduled")

scheduled_signal = signal("stations_scheduled")
scheduled_signal.connect(notify_stations_scheduled)


Output:
Station SIP run scheduled
Station 1 run completd


2. The plugin should not affect "Run Now" schedules i.e. schedule started due to manual actions. As is the case with the Moisture Sensor Control plugin however, there is no easy way to identify theses schedules

3. Not really a problem but an inconsistency. The duration for "Run Now" schedules is a float as opposed to an int for a schedule for automatically started programs
Code:
Run Now == Before [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [1706559510, 1706559540, 30.0, 3], [0, 0, 0, 0], [0, 0, 0, 0]]

Schedules === Before [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [1706559600, 1706559630, 30, 3], [0, 0, 0, 0], [0, 0, 0, 0]]

Print this item

  Problem with Run Once and Concurrent mode
Posted by: cdesouza - 2024 Jan 21, 07:07 PM - Forum: Report a problem - No Replies

Hi,

if there is a program running on station S1 and a Run Once is triggered on station S2 then the program on station S1 is terminated by the Run Once on station S2.

While this makes sense for sequential mode, it does not seem to make sense for concurrent mode as the stations should be able to run in parallel.

Print this item

  Problem with concurrent mode and overlapping programs
Posted by: cdesouza - 2024 Jan 21, 01:39 PM - Forum: Report a problem - Replies (1)

Hi,

I was experimenting with concurrent and sequential mode and work out that

  • for sequential mode the running program has precedence and will stop other programs from starting
  • for concurrent mode a scheduled program has precedence and will stop a running program, well sort of, see below

If this is the case then it would be good if it were documented in the Wiki.

And now to the well sort of bit, which I think is a bug. With the following setup:
  • SIP Version: 5.1.19
  • Mode: Concurrent
  • Prog1: S1, 09:00, 4 mins
  • Prog2: S1, 09:02, 6 mins 

I get the following results
  1. 09:00 Prog1 will start (as expected)
  2. 09:02 Prog2 will start, terminating Prog1 (as expected)
  3. 09:04 Prog2 will terminate (this is not expected)

The log entry is as follows: 
  • S1 04:00 67 % Prog2

I would have expected Prog2 to run until 09:08 and the following log entries
  • S1 02:00 50% Prog1
  • S1 06:00 100% Prog2

--Edit --
On a similar note with the following setup
  • Prog1: S1, 09:00, 6 mins
  • Prog2: S1, 09:02, 2 mins
Prog1 is terminated by Prog2 (09:02) and when Prog 2 ends (09:04) the UI show 00:00 until Prog 1 would have terminated (09:06)

Print this item

  Using moisture sensors to control programs
Posted by: cdesouza - 2023 Dec 28, 11:15 PM - Forum: Writing plugins - Replies (29)

Hi,

I have some Zigbee moisture sensors that I connect to my MQTT server using Zigbee2MQTT.

I would like to try and write a plugin that

  • Assigns a sensor to a station (via an MQTT topic?)
  • Allows the setting of a threshold moisture value per station
  • Suppresses any program from running for a station if the reported moisture value is higher than the threshold value
  • Shows if a program has been suppressed
  • Shows a graph of the moisture sensor values

Can someone please give me any pointers as to how to best to go about writing such a plugin?

Thanks in advance.

Print this item

  How to 'announce' a new plugin?
Posted by: I M - 2023 Dec 15, 09:59 PM - Forum: Writing plugins - Replies (3)

A couple of years ago a friend asked me to sort out a control system for his well; it would run dry under heavy use and require a trip out in order to reset once it had returned to normal levels - typically after an hour or so.

More recently a 'roundtuit' happened and I wrote a simple web-based control program for a Pi that would auto-reset the well controller via a relay after a user-specified period and display the pump status etc onscreen from opto-coupled inputs. The software also allowed for remote manual control of the well pump, all of which meant that the trek to the pumphouse would become a simple glance at a screen from wherever. A simpler and cheaper way to do it would have been to use an Arduino but I was thinking of the future as they have an elderly irrigation system...

After some trawling around the 'net for ideas on improving the latter I came across SIP and liked what I saw, not in the least that you're receptive to contributions, are maintaining the project well, and have developed quite a good ecosystem.

To that end I've written a plugin, presently entitled 'well' that displays the well pump motor status on the front page, along with timer detail (countdown of minutes) for controller reset if the well pump controller has shut off due to the well running dry. The time to reset is adjustable via the plugin menu, as are a couple of other parameters that should also allow the plugin to completely take over the task of well control should one wish to entrust it with your expensive well motor and pump...

It's working fine on the bench presently, and will hopefully be installed onsite within the next week or so. Following some insitu testing and cleanup of the code, and assuming it works as intended, I'd be happy to make the plugin available to anyone that might find it useful.

As such I've registered here so I could let you know about this and enquire as to whether this would fit within your vision for SIP? If so, and when I'm satisfied it's ok for release, I'd have thought the 'Announcement' section the right place to post a notice, however it didn't look as if one could start a new thread there? I guess that's by design, and clearly I'd go through the requisite protocol etc around reviewing the plugin first, but perhaps you could let me know where/how to make it public whenever it's ready?

Thanks.

Print this item

  Plugin that adds water tank info to the home page
Posted by: ahat - 2023 Oct 25, 03:51 PM - Forum: Writing plugins - Replies (11)

I am writing a plugin that collects water tank info via mqtt. I need to display that info using a progressbar-like icon on the homepage. Is there a way a plugin can inject html to the homepage?

Print this item

  passphrase
Posted by: ZioMauri - 2023 Sep 05, 11:19 PM - Forum: Installation and set up questions - Replies (2)

SIP updated to latest version.
Python 3.
I activated passphrase, I restarted but even entering the correct password it does not log in.
Can I reset or disable passphrase ?
Thank you

Print this item