Giter VIP home page Giter VIP logo

sip_plugins's People

Contributors

bkoblenz avatar boomesito avatar dan-in-ca avatar danielcasner avatar egisz avatar embak avatar geosot avatar imharris avatar jonathan-marsh avatar kali- avatar keepsummersaf3 avatar materdaddy avatar pedrofrcsantos avatar pelado-mat avatar seventer avatar stevejbauer avatar stifler6996 avatar tails86 avatar trevorhobson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sip_plugins's Issues

Pulse Circuit throws error

After I install the Pulse Circuit plugin, I choose Pulse Circuit from the plugins menu and the console throws this:
Traceback (most recent call last):
File "/home/pi/OSPi/web/application.py", line 239, in process
return self.handle()
File "/home/pi/OSPi/web/application.py", line 230, in handle
return self._delegate(fn, self.fvars, args)
File "/home/pi/OSPi/web/application.py", line 423, in _delegate
return handle_class(cls)
File "/home/pi/OSPi/web/application.py", line 399, in handle_class
return tocall(*args)
File "/home/pi/OSPi/plugins/pulse_cct.py", line 44, in GET
return render.pulse(pform, "Open Sprinkler")#monthly(levels)
File "/home/pi/OSPi/web/template.py", line 881, in call
return BaseTemplate.call(self, _a, *_kw)
File "/home/pi/OSPi/web/template.py", line 808, in call
return self.t(_a, *_kw)
TypeError: template() takes no arguments (2 given)

192.168.0.7:50550 - - [10/Apr/2015 22:08:36] "HTTP/1.1 GET /pls" - 500 Internal Server Error

While the browser (Safari Version 8.0.4 (10600.4.10.7)) says "internal server error"

weather_level_adj : wrong history and calculation

It seems that the plugin shortly after the rain loses count of the rain that has fallen:

  • Mar 20 04:21 'Irrigation needed:\n0.9mm'
    • Mar 20 04:21 'Total rainfall:\n2.66mm'
  • Mar 20 05:21 'Irrigation needed:\n0.0mm' <-- ok !
    • Mar 20 05:21 'Total rainfall:\n4.1mm'
  • Mar 20 06:21 'Irrigation needed:\n1.3mm' <-- ??
    • Mar 20 06:21 'Total rainfall:\n2.3mm'
  • Mar 20 07:21 'Irrigation needed:\n3.4mm' <-- ??
    • Mar 20 07:21 'Total rainfall:\n0.92mm'
  • Mar 20 08:22 'Irrigation needed:\n4.2mm' <-- ??
    • Mar 20 08:22 'Total rainfall:\n0.2mm'

In thix example if I have to start at 08 or 09 o'clock it does not consider a few hours before.

Full log:

Mar 20 03:21 'Current temperature:\n11.0deg.C'
Mar 20 03:21 '________________________________'
Mar 20 03:21 'Daily irrigation:\n4.0mm'
Mar 20 03:21 'Total rainfall:\n2.0mm'
Mar 20 03:21 'Water needed (4days):\n3.6mm'
Mar 20 03:21 '________________________________'
Mar 20 03:21 'Irrigation needed:\n1.6mm'
Mar 20 03:21 'Weather Adjustment:\n12.3%'

Mar 20 04:21 'Checking weather status...'
Mar 20 04:21 'Current temperature:\n11.1deg.C'
Mar 20 04:21 '________________________________'
Mar 20 04:21 'Daily irrigation:\n4.0mm'
Mar 20 04:21 'Total rainfall:\n2.66mm'
Mar 20 04:21 'Water needed (4days):\n3.6mm'
Mar 20 04:21 '________________________________'
Mar 20 04:21 'Irrigation needed:\n0.9mm'
Mar 20 04:21 'Weather Adjustment:\n6.9%'

Mar 20 05:21 'Checking weather status...'
Mar 20 05:21 'Current temperature:\n11.1deg.C'
Mar 20 05:21 '________________________________'
Mar 20 05:21 'Daily irrigation:\n4.0mm'
Mar 20 05:21 'Total rainfall:\n4.1mm'
Mar 20 05:21 'Water needed (4days):\n3.6mm'
Mar 20 05:21 '________________________________'
Mar 20 05:21 'Irrigation needed:\n0.0mm'
Mar 20 05:21 'Weather Adjustment:\n0.0%'

Mar 20 06:21 'Checking weather status...'
Mar 20 06:21 'Current temperature:\n11.0deg.C'
Mar 20 06:21 '________________________________'
Mar 20 06:21 'Daily irrigation:\n4.0mm'
Mar 20 06:21 'Total rainfall:\n2.3mm'
Mar 20 06:21 'Water needed (4days):\n3.6mm'
Mar 20 06:21 '________________________________'
Mar 20 06:21 'Irrigation needed:\n1.3mm'
Mar 20 06:21 'Weather Adjustment:\n10.0%'

Mar 20 07:21 'Checking weather status...'
Mar 20 07:21 'Current temperature:\n11.1deg.C'
Mar 20 07:21 '________________________________'
Mar 20 07:21 'Daily irrigation:\n4.0mm'
Mar 20 07:21 'Total rainfall:\n0.92mm'
Mar 20 07:21 'Water needed (4days):\n4.3mm'
Mar 20 07:21 '________________________________'
Mar 20 07:21 'Irrigation needed:\n3.4mm'
Mar 20 07:21 'Weather Adjustment:\n26.2%'

Mar 20 08:22 'Checking weather status...'
Mar 20 08:22 'Current temperature:\n11.3deg.C'
Mar 20 08:22 '________________________________'
Mar 20 08:22 'Daily irrigation:\n4.0mm'
Mar 20 08:22 'Total rainfall:\n0.2mm'
Mar 20 08:22 'Water needed (4days):\n4.4mm'
Mar 20 08:22 '________________________________'
Mar 20 08:22 'Irrigation needed:\n4.2mm'
Mar 20 08:22 'Weather Adjustment:\n32.3%'

I also don't understand where the data for 3 days before and 3 days of forecasts are saved (as per setting)

Current Mar 28 15:00:

34015 Mar 28 12:38 'forecast5day_lat=43.9575&lon=12.7376-20230328_12.json'
34100 Mar 28 13:38 'forecast5day_lat=43.9575&lon=12.7376-20230328_13.json'
34159 Mar 28 14:38 'forecast5day_lat=43.9575&lon=12.7376-20230328_14.json'
  475 Mar 27 16:36  history_2023_03_27-16_36_37.json
  480 Mar 27 17:36  history_2023_03_27-17_36_42.json
  479 Mar 27 18:36  history_2023_03_27-18_36_47.json

Why only Mar 27 at 16.36, 17.36 and 18.36?

Here another example at Mar 19 23:45:

'forecast5day_lat=43.9575&lon=12.7376-20230319_21.json'
'forecast5day_lat=43.9575&lon=12.7376-20230319_22.json'
'forecast5day_lat=43.9575&lon=12.7376-20230319_23.json'
 history_2023_03_18-16_18_36.json
 history_2023_03_18-17_18_41.json
 history_2023_03_18-18_18_46.json

Always only 3 history in one day at same time (16.xx, 17.xx and 18.xx)

Weather-based Water Level: Skipped wundergound data because of a parsing error for today

Weather-based Water Level:

Error:"Skipped wundergound data because of a parsing error for today"

3.1.27. Raspbian - entirely up to date.
Plugins updated by a p
Updated the plugins and weather level not calculated based upon history (2mm rainfall a day after .71 inch by Wunderground history)

Uninstall/reinstall and historical showing now 10mm instead of 2mm (which is still far short of the history showing in Wunderground direct) but receive the error:"Skipped wundergound data because of a parsing error for today"

Disabling plugin - how can I catch that event?

I'm not really sure how to be handling when a plugin is disabled. My plugin spawns a separate thread, so I need to be signaled when the plugin should be shut down so I can exit my thread. How should I be handling that? Is that in a value changed signal?

Plugin crashes Thread when using Master Station

When using a Master Station (postive and/or negative seconds) the plugin crashes the program thread resulting in unresponsive stations.
The crashdump is:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/SIP/sip.py", line 188, in timing_loop
    report_running_program_change()
  File "/home/pi/SIP/helpers.py", line 90, in report_running_program_change
    running_program_change.send()
  File "/home/pi/SIP/blinker/base.py", line 266, in send
    return [(receiver, receiver(sender, **kwargs))
  File "/home/pi/SIP/blinker/base.py", line 266, in <listcomp>
    return [(receiver, receiver(sender, **kwargs))
  File "/home/pi/SIP/plugins/sip_email.py", line 153, in email_start_stop
    if gv.pd[p_idx]["name"]:
IndexError: list index out of range

if gv.pd[p_idx]["name"]:

Tested with a Master Station enabled and using Run Once on a single station

Starting a plugin

Hi, I am interested in writing a plugin, possibly a few depending on how well the first one goes, and was wondering how exactly I use the proto plugin to get started?

I write code poorly in about dozen languages and am adding Python to the fold. I figure this would be a good way to get started.

The first plugin is just going to be a twitterbot basically. @dfranks-house "Started watering the grass", "Stopped watering the grass", etc.
The second plugin uses SIP to open and close my chicken coop doors.
The third plugin uses SIP to trigger a zone based on a motion sensor to keep cats from pooping in my kids sand box and to keep the chickens out of the garden.

Two of those will involve relays, motors, voltage converters and whatnot but I figure other people are already doing things like that and I can adapt what had already been figured out.

Telegram plugin not showing in dropdown

I have installed the telegram plugin, but cannot access it's setup.

Also installed pip and the telegram bot with: pip install python-telegram-bot --upgrade

Python version is 3.9.2
SIP version: 4.1.53

Have tried rebooting and uninstalling and reinstalling the plugin. Same for the pup package - uninstall and install again.

image

Feature Request- MQTT for Manual Mode

First off, nice work! I am quite the noob, but everything has been going great so far...

Not sure if this is possible, but it would be handy for me to be able to use mqtt to turn on and off stations in the "manual mode".

Maybe there is a better option, but I am hoping to be able to uses this feature to control other appliances like lights, fans, and dehumidifier.

Thanks for all the hard work!

Relay plugin fails to load

On startup, I get the following:

Ignoring exception while loading the relay plug-in.
cannot import name pin_relay
plugins loaded:
lcd_adj
mobile_app
pcf_8591_adj
plugin_manager
proto
signaling_examples
system_update
Starting timing loop

I'm running 2.2.38 on a RPi.
Steve

weather_level_adj page "Status" field showing python error

I received a couple of notices of more than 500 requests to wunderground over the last couple weeks so I updated my OSPi repo the other day. Upon doing that, I had to separately enable the ospi plugins I use: weather_adj and weather_level_adj.

Now I went to configure weather_level_adj and see this in the Status text box:

Weather-base water level encountered error:
Traceback (most recent call last):
  File "/home/pi/ospi/plugins/weather_level_adj.py", line 85, in run
    history = history_info()
  File "/home/pi/ospi/plugins/weather_level_adj.py", line 320, in history_info
    'humidity': float(day_info['humidity'])
ValueError: could not convert string to float: 

MQTT Plugin - No DOWN or DIED publishing ?

Hi all,
I've installed the mqtt plugin and the mqtt zone bradcaster; configurations:
image
image

Monitoring the messages published using mqqt-spy i see that only the msg "UP" is published:
image

I've tried both:

  • restarting SIP using web interface
  • reboot the raspberry by console (sudo reboot)

A new "UP" msg is published after restart but no "DIED" (will message) nor "DOWN".
Any ideas ?
Thanks a lot

Using GPIO pins in plugin thread

I have a plugin which uses GPIO pins. It works fine on a normal boot. However, when the system restarts, it causes exceptions within my plugin when the pins are being accessed. I have to catch those exceptions and assume that the software must be restarting. Then I wait for a moment of time before trying to reinitialize pins and continue. Is there a way to synchronize with the system during restart or pin access?

Weather level adjustment not working

Hi,

I just installed the plugin for the weather level adjustment. I entered all the details like Openweather API, City etc...

I get everytime the following message:

Weather-base water level encountered error: Traceback (most recent call last): File "/home/pi/SIP/plugins/weather_level_adj.py", line 97, in run today = today_info(self, options) File "/home/pi/SIP/plugins/weather_level_adj.py", line 316, in today_info data = get_data(name, request, 'weather', options) File "/home/pi/SIP/plugins/weather_level_adj.py", line 234, in get_data req = urllib2.urlopen(url + "&appid=" + options['apikey']) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 435, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 473, in error return self._call_chain(*args) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found

Any ideas?

Internal server error for weather_adj and weather_level_adj

Hi Dan,

I installed to ospi weather_adj and weather_level_adj plugins, but I have problem with it. I get "Internal server error" in web browser and there is a trace from console:

Traceback (most recent call last):
  File "/home/pi/OSPi/web/application.py", line 239, in process
    return self.handle()
  File "/home/pi/OSPi/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/home/pi/OSPi/web/application.py", line 423, in _delegate
    return handle_class(cls)
  File "/home/pi/OSPi/web/application.py", line 399, in handle_class
    return tocall(*args)
  File "/home/pi/OSPi/plugins/weather_adj.py", line 155, in GET
    return template_render.weather_adj(get_weather_options())
  File "/home/pi/OSPi/web/template.py", line 1020, in template
    return self._base(t(*a, **kw))
  File "/home/pi/OSPi/web/template.py", line 881, in __call__
    return BaseTemplate.__call__(self, *a, **kw)
  File "/home/pi/OSPi/web/template.py", line 808, in __call__
    return self.t(*a, **kw)
  File "templates/weather_adj.html", line 37, in __template__
    <td style='text-transform: none;'>$_('Weather Provider'):</td>
KeyError: 'delay_duration'

Can you help me, where can I find a problem?
Thank you.

Typo in README.md

pfc_8591_adj => pcf_8591_adj

Otherwise, plugin won't download.

Steve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.