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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 761
» Latest member: Blade
» Forum threads: 296
» Forum posts: 1,660

Full Statistics

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

Latest Threads
Allow plugins ability to ...
Forum: Feature requests
Last Post: jonathan
2024 Aug 11, 10:56 PM
» Replies: 11
» Views: 318
Tank Fill Function
Forum: Feature requests
Last Post: dan
2024 Jul 12, 03:07 PM
» Replies: 3
» Views: 218
Curl Method Menu
Forum: Installation and set up questions
Last Post: astrogerard
2024 Jun 22, 03:15 PM
» Replies: 4
» Views: 286
Module i2c relay.
Forum: Feature requests
Last Post: litronas
2024 Jun 22, 12:45 PM
» Replies: 5
» Views: 302
problem after upgrade to ...
Forum: Installation and set up questions
Last Post: Darek
2024 May 19, 08:54 PM
» Replies: 2
» Views: 215
SIP Stopped Working After...
Forum: Report a problem
Last Post: dan
2024 May 16, 02:20 PM
» Replies: 1
» Views: 109
Monthly Adjust per Statio...
Forum: Writing plugins
Last Post: cdesouza
2024 Apr 18, 06:33 AM
» Replies: 17
» Views: 698
MQTT Plugin initialised b...
Forum: Report a problem
Last Post: cdesouza
2024 Mar 25, 03:56 PM
» Replies: 2
» Views: 177
Update to a new plugin ve...
Forum: Installation and set up questions
Last Post: cdesouza
2024 Mar 20, 09:12 PM
» Replies: 2
» Views: 212
Using moisture sensors to...
Forum: Writing plugins
Last Post: dan
2024 Mar 15, 02:55 PM
» Replies: 29
» Views: 1,419

 
  Allow plugins ability to augment the html displays?
Posted by: jonathan - 2024 Jul 09, 12:29 AM - Forum: Feature requests - Replies (11)

Hi Dan,

I've written a plugin that logs the water pressure for the system, and displays a graph of that on the home page, so it's easy to correlate with the history.  It seems to be working pretty well, but I needed more access to the home page html than seems to be offered by the plugin architecture.

I believe the limits of the plugin architecture WRT the display, are adding completely new pages, adding a bit of text to the footer, or adding to the status text on the timeline.  Did I miss something or is this really the limit?

In order to display the graph I want to insert and populate an additional table row in the schedule table, aligned with the program display for system maintenance purposes.  Right now I manually add a <script src="..."> tag to home.html, and use this to attach events to generate the UI changes (jQuery listeners and DOM MutationObservers).

Maintaining even this single line of code different from the trunk isn't ideal, so I started thinking about a more general way to accomplish this.  For instance adding a global variable which would contain a list of scripts to inject, something like:

gv.plugin_scripts = [];

Each plugin could augment register the need to inject scripts into the home page by populating this variable:

gv.plugin.append(["home", "pressure_monitor.js"]);

When any UI page is loaded, it would check for any relevant script injection requests and process them.  The result in this case would be to generate a <script src="static/scripts/pressure_monitor.js"></script> tag in the home page.

WDYT?  Would this be granting too much power to plugin developers?

- Jonathan

Print this item

  Tank Fill Function
Posted by: Staticxsoil - 2024 Jul 07, 02:41 PM - Forum: Feature requests - Replies (3)

I have rainwater collection at my house with tanks at the downspouts and 150 gallons of storage located in a greenhouse in my garden. I would like to be able to use float switches that in the greenhouse tanks to fill the greenhouse tanks automatically each day with the float ensuring that I don't lose water due to overflow since my greenhouse is downhill from the house. additionally I would like to prevent the pump from running if the water level is too low. I believe the water level low situation can be handled by the rain sensor function but I have not found a way to automate the filling function.
 Ideally the logic behind this function would be:
   If water level = low then run pump for 30 seconds
   if max runtime not exceeded loop.
I am not versed in python but I'm willing to try to learn

Print this item

  Module i2c relay.
Posted by: litronas - 2024 Jun 11, 06:47 AM - Forum: Feature requests - Replies (5)

Hello, the other day I found i2c relay modules, 16 relays and XL9535, in Chinese stores. And it would be great if someone wrote a complement, because it would greatly simplify the construction of projects, thank you and great job.

Print this item

  Curl Method Menu
Posted by: MRNegPants - 2024 May 22, 04:12 PM - Forum: Installation and set up questions - Replies (4)

When I use the Curl method the Navigation stated does not work it instead types characters on screen. any ideas ?

Print this item

  problem after upgrade to new verion
Posted by: Darek - 2024 May 16, 08:15 PM - Forum: Installation and set up questions - Replies (2)

Hi,
I've just upgraded to the newest SIP version and I have the following problem:

Traceback (most recent call last):
  File "sip.py", line 334, in <module>
    app.run()
  File "sip.py", line 253, in run
    return web.httpserver.runsimple(func, (ip, port))
  File "/home/pi/SIP/web/httpserver.py", line 167, in runsimple
    server = WSGIServer(server_address, func)
  File "/home/pi/SIP/web/httpserver.py", line 188, in WSGIServer
    from cheroot import wsgi
  File "/home/pi/SIP/cheroot/wsgi.py", line 33, in <module>
    import six
ImportError: bad magic number in 'six': b'\x03\xf3\r\n'
SSD1306 plugin: active

Any Help ?

Print this item

  SIP Stopped Working After Update
Posted by: AndreSmith76 - 2024 May 14, 03:12 PM - Forum: Report a problem - Replies (1)

After attempting to update SIP software from my Pi's SIP page, SIP no longer functions and shows the following error when attempting to run sudo python sip.py:

Trackback (most recent call last):
File "sip.py", line 21, in <module>
import gv
File "/home/pi/SIP/gv.py", line 22
ver_str = f"{major_ver}.{minor_ver}.{revision - old_count}"

SyntaxError: invalid syntax

I was hoping to please get some help or feedback making my system work again? This system was running fine for 3 years until I attempted this update.

Andre'

Print this item

  MQTT Plugin initialised before network
Posted by: cdesouza - 2024 Mar 20, 09:20 PM - Forum: Report a problem - Replies (2)

After a reboot the MQTT plugin is intialised before the network is up, more specifically before dhcp has assigned an address


Code:
Mar 20 22:09:04 sip dhcpcd[364]: wlan0: rebinding lease of xxx.xxx.xxx.xxx
Mar 20 22:09:04 sip dhcpcd[364]: wlan0: probing address xxx.xxx.xxx.xxx/24
Mar 20 22:09:04 sip sip[456]: MQTT plugin couldn't initalize client: [Errno 101] Network is unreachable
Mar 20 22:09:04 sip sip[456]: Ignoring exception while loading the telegramBot plug-in.
Mar 20 22:09:04 sip sip[456]: No module named 'telegram'
Mar 20 22:09:05 sip sip[456]: plugins loaded:
Mar 20 22:09:05 sip sip[456]:  advance_control
Mar 20 22:09:05 sip sip[456]:  backup_settings
Mar 20 22:09:05 sip sip[456]:  mobile_app
Mar 20 22:09:05 sip sip[456]:  moisture_sensor_control
Mar 20 22:09:05 sip sip[456]:  moisture_sensor_data_mqtt
Mar 20 22:09:05 sip sip[456]:  mqtt
Mar 20 22:09:05 sip sip[456]:  plugin_manager
Mar 20 22:09:05 sip sip[456]:  relay_board
Mar 20 22:09:05 sip sip[456]:  schedule_data_collector
Mar 20 22:09:05 sip sip[456]:  shutdown_button
Mar 20 22:09:05 sip sip[456]:  simple_chart
Mar 20 22:09:05 sip sip[456]:  system_update
Mar 20 22:09:05 sip sip[456]: Starting timing loop
Mar 20 22:09:05 sip dhcpcd[364]: wlan0: Router Advertisement from xxxx::xxxx:xxxx:xxxx:xxxx
Mar 20 22:09:05 sip dhcpcd[364]: wlan0: adding address xxxx::xxxx:xxxx:xxxx:xxxx /64
Mar 20 22:09:05 sip kernel: ICMPv6: process `dhcpcd' is using deprecated sysctl (syscall) net.ipv6.neigh.wlan0.retrans_time - use net.ipv6.neigh.wlan0.retrans_time_ms inste>
Mar 20 22:09:05 sip dhcpcd[364]: wlan0: adding route to xxxx::xxxx:xxxx:xxxx:xxxx ::/64
Mar 20 22:09:05 sip dhcpcd[364]: wlan0: requesting DHCPv6 information

Print this item

  Update to a new plugin version
Posted by: cdesouza - 2024 Mar 15, 01:40 PM - Forum: Installation and set up questions - Replies (2)

If there is a newer version of a plugin available how do I install it?

As far as I can see UPDATE ENABLED only enables/disables plugins by changing the .py file permissions. So the only way is to uninstall the plugin and reinstall it, losing the setting in the process.

In plugin_manager.py should update_plugins() not call install_plugins() one way or another?

Another option might be to have three separate functions Enable/Disable, Update and Uninstall

Print this item

  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