Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
issues activing plugings
#1
I have the following plug-ins activated:


mqtt
mqtt schedule
mqtt slave
mqtt zone broadcaster
weather_level_ad

when I activate the last plug-in, all the other plug-ins seem to stop working. here log with error:




Code:
user@server-sip:~/SIP$ sudo python sip.py
Ignoring exception while loading the mqtt_zones plug-in.
from __future__ imports must occur at the beginning of the file (mqtt_zones.py, line 8)
MQTT publish UP
Ignoring exception while loading the mqtt_schedule plug-in.
from __future__ imports must occur at the beginning of the file (mqtt_schedule.py, line 8)
Ignoring exception while loading the mqtt_slave plug-in.
from __future__ imports must occur at the beginning of the file (mqtt_slave.py, line 8)
plugins loaded:
  mobile_app
  mqtt
  plugin_manager
  relay_board
  system_update
  weather_level_adj
Starting timing loop

Checking weather status...
http://:::80/
HTTP Error 400: Bad Request Retrying.
Weather-based water level encountered error:
Traceback (most recent call last):
  File "/home/user/SIP/plugins/weather_level_adj.py", line 123, in run
    today = today_info(self, options)
  File "/home/user/SIP/plugins/weather_level_adj.py", line 602, in today_info
    data = get_data(name, request, u"weather", options)
  File "/home/user/SIP/plugins/weather_level_adj.py", line 490, in get_data
    req = urlopen(url + u"&appid=" + options[u"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 400: Bad Request

into pluging weather_level_ad i have added location with this format:

lat=30.535105_lon1.1101715

and i got this error:

Code:
Weather-based water level encountered error:
Traceback (most recent call last):
  File "/home/user/SIP/plugins/weather_level_adj.py", line 123, in run
    today = today_info(self, options)
  File "/home/user/SIP/plugins/weather_level_adj.py", line 602, in today_info
    data = get_data(name, request, u"weather", options)
  File "/home/user/SIP/plugins/weather_level_adj.py", line 490, in get_data
    req = urlopen(url + u"&appid=" + options[u"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 400: Bad Request


any idea?


thnaks for the support!
Reply
#2
(2020 May 10, 10:10 AM)takezo Wrote: I have the following plug-ins activated:


mqtt
mqtt schedule
mqtt slave
mqtt zone broadcaster
weather_level_ad

when I activate the last plug-in, all the other plug-ins seem to stop working. here log with error:




Code:
user@server-sip:~/SIP$ sudo python sip.py
Ignoring exception while loading the mqtt_zones plug-in.
from __future__ imports must occur at the beginning of the file (mqtt_zones.py, line 8)
MQTT publish UP
Ignoring exception while loading the mqtt_schedule plug-in.
from __future__ imports must occur at the beginning of the file (mqtt_schedule.py, line 8)
Ignoring exception while loading the mqtt_slave plug-in.
from __future__ imports must occur at the beginning of the file (mqtt_slave.py, line 8)
plugins loaded:
  mobile_app
  mqtt
  plugin_manager
  relay_board
  system_update
  weather_level_adj
Starting timing loop

Checking weather status...
http://:::80/
HTTP Error 400: Bad Request Retrying.
Weather-based water level encountered error:
Traceback (most recent call last):
  File "/home/user/SIP/plugins/weather_level_adj.py", line 123, in run
    today = today_info(self, options)
  File "/home/user/SIP/plugins/weather_level_adj.py", line 602, in today_info
    data = get_data(name, request, u"weather", options)
  File "/home/user/SIP/plugins/weather_level_adj.py", line 490, in get_data
    req = urlopen(url + u"&appid=" + options[u"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 400: Bad Request

into pluging weather_level_ad i have added location with this format:

lat=30.535105_lon1.1101715

and i got this error:

Code:
Weather-based water level encountered error:
Traceback (most recent call last):
  File "/home/user/SIP/plugins/weather_level_adj.py", line 123, in run
    today = today_info(self, options)
  File "/home/user/SIP/plugins/weather_level_adj.py", line 602, in today_info
    data = get_data(name, request, u"weather", options)
  File "/home/user/SIP/plugins/weather_level_adj.py", line 490, in get_data
    req = urlopen(url + u"&appid=" + options[u"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 400: Bad Request


any idea?


thnaks for the support!
There is an error in the documentation page.
The location should have "=" in both the lat and lon parts like so:
lat=30.535105_lon=1.1101715

Dan
<p><br></p>
Reply
#3
Hi Dan,



thanks for your answer. I have modified value location adding "=" in both , lat and lon ,now it seems works but there are other errors:


For the MQTT plugins:



I was having problems with mqtt plugins but I have reinstalled the plugins and now seems that are working excluding plugging mqtt slave , I have this error:

Code:
Traceback (most recent call last):
  File "/home/user/SIP/web/application.py", line 289, in process
    return self.handle()
  File "/home/user/SIP/web/application.py", line 280, in handle
    return self._delegate(fn, self.fvars, args)
  File "/home/user/SIP/web/application.py", line 530, in _delegate
    return handle_class(cls)
  File "/home/user/SIP/web/application.py", line 508, in handle_class
    return tocall(*args)
  File "/home/user/SIP/plugins/mqtt_slave.py", line 44, in GET
    return template_render.mqtt_slave(settings, "")  # open settings page
  File "/home/user/SIP/web/template.py", line 1139, in template
    return self._base(t(*a, **kw))
  File "/home/user/SIP/web/template.py", line 986, in __call__
    return BaseTemplate.__call__(self, *a, **kw)
  File "/home/user/SIP/web/template.py", line 897, in __call__
    return self.t(*a, **kw)
  File "templates/mqtt_slave.html", line 46, in __template__
    <td style='text-transform: none;'>$_(u'First station number'):</td>
KeyError: 'control_topic'
any idea?



---



For plugin weather level:



I'm getting the following error:


Code:
Weather-based water level encountered error:

Traceback (most recent call last):

  File "/home/user/SIP/plugins/weather_level_adj.py", line 124, in run

    forecast = forecast_info(self, options, today)

  File "/home/user/SIP/plugins/weather_level_adj.py", line 679, in forecast_info

    data = get_data(name, request, u"forecast", options)

  File "/home/user/SIP/plugins/weather_level_adj.py", line 490, in get_data

    req = urlopen(url + u"&appid=" + options[u"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 429, in open

    response = self._open(req, data)

  File "/usr/lib/python2.7/urllib2.py", line 447, in _open

    '_open', req)

  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain

    result = func(*args)

  File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open

    context=self._context)

  File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open

    raise URLError(err)

URLError: <urlopen error [Errno 0] Error>




--



the error doesn't always appear but the plugin seems to stop working when this error is triggered
Reply
#4
The problem with the mqtt_slave plugin is fixed.
re-install and it should be working.

I am working on the weather plugin but that one may take a while.

Dan
<p><br></p>
Reply
#5
(2020 May 12, 04:02 PM)dan Wrote: The problem with the mqtt_slave plugin is fixed.
re-install and it should be working.

I am working on the weather plugin but that one may take a while.

Dan

Thank you very much Dan!

It's more than I expected!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)