Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weather
#11
(2019 May 07, 03:45 PM)dan Wrote:
(2019 May 07, 03:09 PM)dan Wrote:
(2019 May 07, 04:31 AM)esawyja Wrote:
(2019 May 06, 02:55 PM)dan Wrote:
(2019 May 06, 05:21 AM)esawyja Wrote: Thanks Dan, when I fill in all the details AppID etc from yahoo, I get internal server error when I submit. How would I check to see if it is working? Under options I set the location, does it use that to get the weather? If I run it manually I get

pi@SIP:~/SIP/plugins $ sudo python weather_adj.py
Traceback (most recent call last):
  File "weather_adj.py", line 17, in <module>
    from urls import urls  # Get access to SIP's URLs
ImportError: No module named urls
pi@SIP:~/SIP/plugins $

It looks like you are running SIP from the plugins directory. That is why it can't find the urls module (urls.py).
Try running SIP from the SIP directory.
Hi Dan,

Still the same
pi@PI:~/SIP $ sudo python plugins/weather_adj.py
Traceback (most recent call last):
  File "plugins/weather_adj.py", line 17, in <module>
    from urls import urls  # Get access to SIP's URLs
ImportError: No module named urls
pi@PI:~/SIP $ ls -ltr
total 240
-rw-r--r--  1 pi   pi    1339 May  4 12:18 ReverseProxied.py
-rw-r--r--  1 pi   pi   16259 May  4 12:18 README.md
-rwxr-xr-x  1 pi   pi    6974 May  4 12:18 gpio_pins.py
-rw-r--r--  1 pi   pi    1243 May  4 12:18 i18n.py
-rw-r--r--  1 pi   pi   17517 May  4 12:18 helpers.py
-rw-r--r--  1 pi   pi    3631 May  4 12:18 gv_reference.txt
-rw-r--r--  1 pi   pi    6828 May  4 12:18 gv.py
-rw-r--r--  1 pi   pi    4415 May  4 12:18 pigpiod.sh
lrwxrwxrwx  1 pi   pi       6 May  4 12:18 ospi.py -> sip.py
drwxr-xr-x 14 pi   pi    4096 May  4 12:18 i18n
-rwxr-xr-x  1 pi   pi   11492 May  4 12:18 sip.py
-rw-r--r--  1 pi   pi     652 May  4 12:18 rtcdev.sh
-rwxr-xr-x  1 pi   pi    4637 May  4 12:18 sip.sh
-rw-r--r--  1 pi   pi     317 May  4 12:18 sip.service
drwxr-xr-x  8 pi   pi    4096 May  4 12:18 static
-rw-r--r--  1 pi   pi    1135 May  4 12:18 urls.py
-rw-r--r--  1 pi   pi   21943 May  4 12:18 webpages.py
-rw-r--r--  1 root root  1476 May  4 12:18 i18n.pyc
drwxr-xr-x  4 pi   pi    4096 May  4 12:18 web
-rw-r--r--  1 root root  5973 May  4 12:18 gv.pyc
-rw-r--r--  1 root root 18260 May  4 12:18 helpers.pyc
drwxr-xr-x  2 pi   pi    4096 May  4 12:18 blinker
-rw-r--r--  1 root root  5350 May  4 12:18 gpio_pins.pyc
-rw-r--r--  1 root root  1260 May  4 12:18 urls.pyc
-rw-r--r--  1 root root  1804 May  4 12:18 ReverseProxied.pyc
-rw-r--r--  1 root root  6570 May  4 12:18 sip.pyc
-rw-r--r--  1 root root 23269 May  4 12:18 webpages.pyc
drwxr-xr-x  2 pi   pi    4096 May  6 07:17 templates
drwxr-xr-x  3 pi   pi    4096 May  6 07:18 plugins
drwxr-xr-x  2 pi   pi    4096 May  6 07:19 data
drwxr-xr-x  2 root root  4096 May  7 05:29 sessions
pi@PI:~/SIP $ cat urls.py
# !/usr/bin/env python
# -*- coding: utf-8 -*-

 #### urls is used by web.py. When a GET request is received, the corresponding class is executed.
urls = [
    '/',  'webpages.home',
    '/cv', 'webpages.change_values',
    '/vo', 'webpages.view_options',
    '/co', 'webpages.change_options',
    '/vs', 'webpages.view_stations',
    '/cs', 'webpages.change_stations',
    '/sn', 'webpages.get_set_station',
    '/vr', 'webpages.view_runonce',
    '/cr', 'webpages.change_runonce',
    '/vp', 'webpages.view_programs',
    '/mp', 'webpages.modify_program',
    '/cp', 'webpages.change_program',
    '/dp', 'webpages.delete_program',
    '/ep', 'webpages.enable_program',
    '/vl', 'webpages.view_log',
    '/cl', 'webpages.clear_log',
    '/lo', 'webpages.log_options',
    '/rp', 'webpages.run_now',
    '/ttu', 'webpages.toggle_temp',
    '/rev', 'webpages.show_revision',
    '/wl', 'webpages.water_log',
    '/api/status', 'webpages.api_status',
    '/api/log', 'webpages.api_log',
    '/login', 'webpages.login',
    '/logout', 'webpages.logout',
    '/restart', 'webpages.sw_restart',
    '/rss', 'webpages.rain_sensor_state'
]pi@PI:~/SIP $

I just cannot get this to work.....
Regards

The plugin will not run as a stand alone program. You would need to run SIP and then try to access the plugin from within SIP to get the error from the plugin.

I will try to do some testing here and let you know the result.

After looking at the privacy statement on the Oath/yahoo sign up page I prefer not to sign up for an account. They apparently give themselves the right to read your email, track you location and more.

I am thinking of rolling back the update for the weather_adj plugin.

I did not even read the Oath, just accepted, It would be a shame not to have a weather plugin, what about Open Weather, like what OpenSprinkler uses? Is there no plugin for that please
Reply


Messages In This Thread
Weather - by esawyja - 2019 May 05, 07:55 AM
RE: Weather - by dan - 2019 May 05, 03:46 PM
RE: Weather - by esawyja - 2019 May 06, 05:21 AM
RE: Weather - by dan - 2019 May 06, 02:55 PM
RE: Weather - by esawyja - 2019 May 07, 04:31 AM
RE: Weather - by dan - 2019 May 07, 03:09 PM
RE: Weather - by dan - 2019 May 07, 03:45 PM
RE: Weather - by esawyja - 2019 May 08, 03:13 AM
RE: Weather - by marcusp - 2019 May 06, 12:35 PM
RE: Weather - by dan - 2019 May 06, 03:05 PM
RE: Weather - by marcusp - 2019 May 06, 08:43 PM
RE: Weather - by dan - 2019 May 08, 03:04 PM
RE: Weather - by dan - 2019 May 08, 05:08 PM
RE: Weather - by esawyja - 2019 May 09, 04:24 AM
RE: Weather - by dan - 2019 May 09, 02:48 PM
RE: Weather - by esawyja - 2019 May 10, 05:19 AM
RE: Weather - by esawyja - 2019 May 14, 10:28 AM
RE: Weather - by dan - 2019 May 14, 02:35 PM
RE: Weather - by esawyja - 2019 May 15, 04:25 AM
RE: Weather - by dan - 2019 May 22, 06:12 PM
RE: Weather - by marcusp - 2019 May 25, 09:36 AM
RE: Weather - by dan - 2019 May 25, 02:54 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)