Python Plugin: MeteoAlarmEU

Python and python framework
misko903
Posts: 48
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by misko903 » Friday 09 November 2018 22:50

ycahome wrote:
Thursday 08 November 2018 15:08
Then your problem is still feedparser that was not on your system.
If you have python 3.x try :

Code: Select all

sudo apt-get install python3-feedparser
tried. still does not work.

Code: Select all

2018-11-09 21:42:53.157 Error: (MeteoAlarmEU) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/MeteoAlarmEU/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2018-11-09 21:42:53.159 Error: (MeteoAlarm) Module Import failed, exception: 'ImportError'
2018-11-09 21:42:53.159 Error: (MeteoAlarm) Module Import failed: ' Name: feedparser'
2018-11-09 21:42:53.160 Error: (MeteoAlarm) Error Line details not available.
and later it repeats this:

Code: Select all

2018-11-09 21:44:21.572 Error: MeteoAlarm hardware (16) thread seems to have ended unexpectedly
to give some info:

Code: Select all

pi@raspberrypi:~ $ which python3
/usr/bin/python3
pi@raspberrypi:~ $ which python
/usr/bin/python
pi@raspberrypi:~ $ python --version
Python 3.5.3

drwxr-xrwx  4 root root 4096 okt 18 22:00 MeteoAlarmEU
is the owner ok?

User avatar
ycahome
Posts: 215
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by ycahome » Saturday 10 November 2018 0:33

Hello.

as I said, your problem is that feedparser is missing.

please post here the output of the following command

Code: Select all

 sudo apt list --installed|grep feed

manutremo
Posts: 56
Joined: Saturday 19 November 2016 18:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by manutremo » Saturday 10 November 2018 8:13

Hi,

I'm also installing the plugin into a Synology box. I managed to get it running adding the following line to plugin.py:

Code: Select all

sys.path.append('/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages')
Now I have a different errors in my domoticz log:

Code: Select all

2018-11-10 07:08:24.878 Error: (MeteoAlarm) 'onStart' failed 'KeyError'.
2018-11-10 07:08:24.878 Error: (MeteoAlarm) ----> Line 269 in '/usr/local/domoticz/var/plugins/MeteoAlarmEU/plugin.py', function onStart
2018-11-10 07:08:24.878 Error: (MeteoAlarm) ----> Line 96 in '/usr/local/domoticz/var/plugins/MeteoAlarmEU/plugin.py', function onStart

2018-11-10 07:08:35.110 Error: (MeteoAlarm) 'onHeartbeat' failed 'KeyError'.
2018-11-10 07:08:35.110 Error: (MeteoAlarm) ----> Line 281 in '/usr/local/domoticz/var/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
2018-11-10 07:08:35.110 Error: (MeteoAlarm) ----> Line 137 in '/usr/local/domoticz/var/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
Any idea?

misko903
Posts: 48
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by misko903 » Saturday 10 November 2018 10:38

ycahome wrote:
Saturday 10 November 2018 0:33
Hello.

as I said, your problem is that feedparser is missing.

please post here the output of the following command

Code: Select all

 sudo apt list --installed|grep feed
output:

Code: Select all

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

python3-feedparser/stable,now 5.1.3-3 all [installed]
looks like installed. is it the righr version?

in directory /usr/local/lib/python3.5/ i have only dist-packages, no site-packages
is it right?

EDIT:
changed the plugin.py paths like that:

Code: Select all

sys.path
#sys.path.append('/usr/lib/python/dist-packages')
sys.path.append('/usr/lib/python3/dist-packages')

import feedparser
#sys.path.append('/usr/local/lib/python3.5/site-packages')
sys.path.append('/home/pi/.local/lib/python3.5/site-packages')
after that, 2 devices were created, but
syslog wrote this:

Code: Select all

2018-11-10 11:24:17.179 Status: (MeteoAlarm) Entering work loop.
2018-11-10 11:24:17.179 Status: (MeteoAlarm) Initialized version 1.0.2, author 'ycahome'
2018-11-10 11:24:17.265 Status: dzVents: Error (2.4.7): Discarding device. No last update info found: {["id"]=101, ["signalLevel"]=0, ["baseType"]="device", ["switchTypeValue"]=0, ["data"]={["_state"]="No Data", ["icon"]="Alert", ["_nValue"]=0, ["hardwareType"]="Meteo Alarm EU RSS Reader", ["protected"]=false, ["unit"]=1, ["hardwareTypeValue"]=94, ["hardwareName"]="MeteoAlarm", ["hardwareID"]=16}, ["changed"]=true, ["switchType"]="On/Off", ["lastLevel"]=255, ["rawData"]={"No Data"}, ["timedOut"]=true, ["description"]="", ["batteryLevel"]=0, ["deviceID"]="", ["subType"]="Alert", ["lastUpdate"]="", ["deviceType"]="General", ["name"]="MeteoAlarm - Today"}
2018-11-10 11:24:17.465 Status: dzVents: Error (2.4.7): Discarding device. No last update info found: {["id"]=102, ["signalLevel"]=0, ["baseType"]="device", ["switchTypeValue"]=0, ["data"]={["_state"]="No Data", ["icon"]="Alert", ["_nValue"]=0, ["hardwareType"]="Meteo Alarm EU RSS Reader", ["protected"]=false, ["unit"]=2, ["hardwareTypeValue"]=94, ["hardwareName"]="MeteoAlarm", ["hardwareID"]=16}, ["changed"]=true, ["switchType"]="On/Off", ["lastLevel"]=255, ["rawData"]={"No Data"}, ["timedOut"]=false, ["description"]="", ["batteryLevel"]=0, ["deviceID"]="", ["subType"]="Alert", ["lastUpdate"]="", ["deviceType"]="General", ["name"]="MeteoAlarm - Tomorrow"}
2018-11-10 11:24:25.061 (Xiaomi Gateway) Light/Switch (Obývačka Pohyb)
2018-11-10 11:24:27.181 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:24:27.182 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:24:27.184 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:24:27.463 (MeteoAlarm) Gathering Data for:Attiki
2018-11-10 11:24:27.463 (MeteoAlarm) Alarm(s) for Today: No special awareness required.
2018-11-10 11:24:27.464 (MeteoAlarm) Type Of Warning:-1
2018-11-10 11:24:27.464 (MeteoAlarm) Data:-tr>TODAY -/th>-/tr>-tr>-td width="28">-img alt="awt:3 level:1" border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l1-t3.jpg" />-/td>-/tr>-tr>-td width="28">-/td>-td>No special awareness required-/td>-/tr>-tr>-th align="left" colspan="3">-br />
2018-11-10 11:24:27.464 (MeteoAlarm) Current Awareness Status:No Data with Level 0
2018-11-10 11:24:27.464 (MeteoAlarm) Awareness for Today Updated to:No special awareness required
2018-11-10 11:24:27.464 (MeteoAlarm - Today) Updating device from 0:'No Data' to have values 1:'No special awareness required'.
2018-11-10 11:24:27.470 (MeteoAlarm) Alarm(s) for Tomorrow: No special awareness required
2018-11-10 11:24:27.470 (MeteoAlarm) Type Of Warning:-1
2018-11-10 11:24:27.470 (MeteoAlarm) Current Awareness Status:No Data with Level 0
2018-11-10 11:24:27.470 (MeteoAlarm) Awareness for Tomorrow Updated to:No special awareness required
2018-11-10 11:24:27.470 (MeteoAlarm - Tomorrow) Updating device from 0:'No Data' to have values 1:'No special awareness required'.
2018-11-10 11:24:37.183 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:24:37.211 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:24:37.211 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:24:44.030 Error: Python Plugins hardware (15) thread seems to have ended unexpectedly
2018-11-10 11:24:44.031 Error: Python Plugins hardware (18) thread seems to have ended unexpectedly
2018-11-10 11:24:47.185 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:24:47.230 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:24:47.230 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:24:57.187 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:24:57.199 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:24:57.199 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:25:00.515 Status: LUA: Domoticz alive !
2018-11-10 11:25:07.189 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:25:07.222 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:25:07.222 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:25:17.192 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:25:17.241 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:25:17.241 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:25:27.194 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:25:27.209 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:25:27.209 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:25:37.196 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:25:37.227 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:25:37.227 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:25:47.198 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:25:47.246 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:25:47.246 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:25:57.200 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:25:57.214 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:25:57.214 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:26:00.466 Status: LUA: Domoticz alive !
2018-11-10 11:26:07.202 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:26:07.241 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:26:07.241 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:26:17.204 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:26:17.209 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:26:17.209 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:26:24.767 (Xiaomi Gateway) Light/Switch (Obývačka Pohyb)
2018-11-10 11:26:27.206 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:26:27.227 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:26:27.227 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:26:37.207 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:26:37.246 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:26:37.246 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:26:47.209 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:26:47.214 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:26:47.215 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2018-11-10 11:26:57.211 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2018-11-10 11:26:57.233 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2018-11-10 11:26:57.233 (MeteoAlarm) Calling message handler 'onHeartbeat'.
looks like it works now, but every second calling is maybe too often?

User avatar
ycahome
Posts: 215
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by ycahome » Saturday 10 November 2018 19:04

Glad to hear that this plugin worked for your.

As forthe Log Messages, are you sure that you don't have "Debug=True"?

misko903
Posts: 48
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by misko903 » Saturday 10 November 2018 20:39

ycahome wrote:
Saturday 10 November 2018 19:04
Glad to hear that this plugin worked for your.

As forthe Log Messages, are you sure that you don't have "Debug=True"?
You are right, it was turned on. Thanks for help and for the plugin :) Looking forward to first alert :P

User avatar
ycahome
Posts: 215
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by ycahome » Sunday 11 November 2018 1:39

Make sure that you have set your country's/city RSS Feed,otherwise it will report Athens's alerts.

User avatar
EdwinK
Posts: 1382
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by EdwinK » Sunday 11 November 2018 19:39

ycahome wrote:
Sunday 11 November 2018 1:39
Make sure that you have set your country's/city RSS Feed,otherwise it will report Athens's alerts.

Yes... Well... I forgot that, and I was wondering about the things it showed, later I realized you needed to add the right RSS in it :)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | RFxcom | Dashticz V2

misko903
Posts: 48
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by misko903 » Tuesday 13 November 2018 10:57

note to myself:
Trencin, Slovakia:
http://www.meteoalarm.eu/documents/rss/sk/SK309.rss

misko903
Posts: 48
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by misko903 » Tuesday 13 November 2018 11:37

Idea for upgrade:
- show icons of warnings
- after click - display the meteoalarm webpage, for example: https://www.meteoalarm.eu/sl_SK/0/0/SK309.html

manutremo
Posts: 56
Joined: Saturday 19 November 2016 18:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by manutremo » Friday 16 November 2018 10:48

Hi, today I noticed that the plug-in was reporting no alerts even though we actually have a rain alert in my area. I checked the log and found the following:

Code: Select all

2018-11-16 09:43:42.622 (MeteoAlarm) Gathering Data for:Barcelona
2018-11-16 09:43:42.622 (MeteoAlarm) Awareness for Today Updated to:Rain(2>-/td>-td>-b>From: -/b>-i>16.11.2018 00:00 CET-/i>-b> Until: -/b>-i>16.11.2018 09:59 CET-/i>-/td>-/tr>-tr>-td width=28>-/td>-td>-/td>-/tr>-tr>-th colspan=3 align=left>-br />)
2018-11-16 09:43:42.622 Error: (MeteoAlarm) 'onHeartbeat' failed 'ValueError':'invalid literal for int() with base 10: '2>-/td>-td>-b>From: -/b>-i>16.11.2018 00:00 CET-/i>-b> Until: -/b>-i>16.11.2018 09:59 CET-/i>-/td>-/tr>-tr>-td width=28>-/td>-td>-/td>-/tr>-tr>-th colspan=3 align=left>-br />''.
2018-11-16 09:43:42.623 Error: (MeteoAlarm) ----> Line 281 in '/usr/local/domoticz/var/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
2018-11-16 09:43:42.623 Error: (MeteoAlarm) ----> Line 190 in '/usr/local/domoticz/var/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
Do I need to check something?

User avatar
ycahome
Posts: 215
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by ycahome » Friday 16 November 2018 11:18

Checked on my test server with the following RSS feed:

Code: Select all

http://www.meteoalarm.eu/documents/rss/es/ES001.rss
and everything seems ok:

Code: Select all

 2018-11-16 11:15:24.846 (MeteoAlarmEU) Gathering Data for:Barcelona
2018-11-16 11:15:24.846 (MeteoAlarmEU) Awareness for Today Updated to:Rain(2)
2018-11-16 11:15:24.847 (MeteoAlarmEU) Awareness for Tomorrow Updated to:No special awareness required 

manutremo
Posts: 56
Joined: Saturday 19 November 2016 18:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by manutremo » Friday 16 November 2018 11:33

Thanks for checking in your own server. Any idea of what be the issue in mine from the error log?

User avatar
ycahome
Posts: 215
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by ycahome » Friday 16 November 2018 11:41

manutremo wrote:
Friday 16 November 2018 11:33
Thanks for checking in your own server. Any idea of what be the issue in mine from the error log?
I don't have a clue.
So, in order to have chance to help you, should be aware of your environment's details (python, domoticz, plugin version etc)

manutremo
Posts: 56
Joined: Saturday 19 November 2016 18:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by manutremo » Sunday 18 November 2018 13:13

Looking at the error I posted it is clear that the int() function is expecting a "2" string and not the long string shown in the error. Therefore something is not right in the logic that partitions the strings from the feed. I'm not familiar with python at all but have tried to trace back the code.

As of now, the feed I use is:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://meteoalarm.eu/documents/rss/es/ES001.rss" rel="self" type="application/rss+xml"/>
		<title>Meteoalarm Spain, Barcelona</title>
		<link>https://www.meteoalarm.eu/es_ES/0/0/ES001.html</link>
		<description>Metoalarm actual warnings from Spain, Barcelona</description>
		<ttl>10</ttl>
		<language>eng</language>
		<item>
			<title>Barcelona</title>
			<link>https://www.meteoalarm.eu/es_ES/0/0/ES001.html</link>
			<description><![CDATA[<table border="0" cellspacing="0" cellpadding="3"><tr><th colspan="3" align="left">Today</th></tr><tr><td width="28"><img border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l2-t10.jpg" alt="awt:10 level:2"></td><td><b>From: </b><i>18.11.2018 09:00 CET</i><b> Until: </b><i>18.11.2018 20:59 CET</i></td></tr><tr><td width="28"></td><td></td></tr><tr><th colspan="3" align="left"><br />Tomorrow</th></tr><tr><td width="28"><img border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l1-t4.jpg" alt="awt:4 level:1"></td></tr><tr><td width="28"></td><td>No special awareness required</td></tr></table>]]></description>
			<pubDate>Sun, 18 Nov 2018 08:59:12 +0100</pubDate>
			<guid isPermaLink="false">d31bb52bb3b94d8322370ae3b3f15c2c</guid>
		</item>
	</channel>
</rss>
Looking through the code I found that that string is LEVELValue, which is partitioned in lines 156-160.

In line 158, the string AWTPossitions[1] is:

Code: Select all

10 level:2">-/td>-td>-b>From: -/b>-i>18.11.2018 09:00 CET-/i>-b> Until: -/b>-i>18.11.2018 20:59 CET-/i>-/td>-/tr>-tr>-td width="28">-/td>-td>-/td>-/tr>-tr>-th colspan="3" align="left">-br />
This line correctly extracts value 10 for AWTvalue.

However line 160:

Code: Select all

LEVELvalue = AWTPossitions[AWTPos].split('level:')[1].split('border')[0].replace('"','').strip()
tries to split the string using "border", which is not present, therefore it delivers a wrong result for LEVELvalue.

In turn, the list AWTPossitions comes from FeedValueFTd, which is:

Code: Select all

<tr>TODAY </th></tr><tr><td width="28"><img border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l2-t10.jpg" alt="awt:10 level:2"></td><td><b>From: </b><i>18.11.2018 11:00 CET</i><b> Until: </b><i>18.11.2018 20:59 CET</i></td></tr><tr><td width="28"></td><td></td></tr><tr><th colspan="3" align="left"><br />
In line 152 this is split using string "awt:" and "<" are replaced by "-", so:

Code: Select all

AWTpossitions[0] = -tr>TODAY -/th>-/tr>-tr>-td width="28">-img border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l2-t10.jpg" alt="

AWTPossitions[1] = 10 level:2">-/td>-td>-b>From: -/b>-i>18.11.2018 11:00 CET-/i>-b> Until: -/b>-i>18.11.2018 20:59 CET-/i>-/td>-/tr>-tr>-td width="28">-/td>-td>-/td>-/tr>-tr>-th colspan="3" align="left">-br />
Unless I have missed something, at this points it seems pretty obvious that the code is expecting a different format to that the feed is using. I checked other feeds containing alerts and they seem to use that "border" tag as the code expects, but apparently some do not; it looks like it depends on there actually being an alert or not, or maybe on there being one or more. You may want to give it a quick review. I hope this helps.

User avatar
ycahome
Posts: 215
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: MeteoAlarmEU

Post by ycahome » Monday 19 November 2018 18:08

manutremo wrote:
Sunday 18 November 2018 13:13
Looking at the error .................. I hope this helps.
Nice analysis.All those you mention seem correct.
What you don;t explain is why works on my system and not to yours.

Do you have version 1.0.2 of this plugin?

Can you enable "Debig Mode", flter by "meteoalarm" and compare with my output bellow:

Code: Select all

 2018-11-19 17:52:05.322 (MeteoAlarmEU) Started.
2018-11-19 17:52:05.639 (MeteoAlarmEU) Entering work loop.
2018-11-19 17:52:05.639 (MeteoAlarmEU) Initialized version 1.0.2, author 'ycahome'
2018-11-19 17:52:05.640 (MeteoAlarmEU) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'Version':'1.0.2'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'Mode1':'http://www.meteoalarm.eu/documents/rss/es/ES001.rss'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'Name':'MeteoAlarmEU'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'Author':'ycahome'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'DomoticzHash':'bc239243'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'HardwareID':'16'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'Mode4':'Debug'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'DomoticzVersion':'3.9443'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'Mode3':'60'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'HomeFolder':'/home/yiannis/domoticz/plugins/MeteoAlarmEU/'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'Port':'0'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'DomoticzBuildTime':'2018-05-16 09:28:53'
2018-11-19 17:52:05.640 (MeteoAlarmEU) 'Key':'MeteoAlarmEU'
2018-11-19 17:52:05.640 (MeteoAlarmEU) Device count: 2
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device: 1 - ID: 64, Name: 'MeteoAlarmEU - Today', nValue: 1, sValue: 'No special awareness required'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device ID: '64'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device Name: 'MeteoAlarmEU - Today'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device nValue: 1
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device sValue: 'No special awareness required'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device LastLevel: 0
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device: 2 - ID: 65, Name: 'MeteoAlarmEU - Tomorrow', nValue: 1, sValue: 'No special awareness required'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device ID: '65'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device Name: 'MeteoAlarmEU - Tomorrow'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device nValue: 1
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device sValue: 'No special awareness required'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device LastLevel: 0
2018-11-19 17:52:05.724 (MeteoAlarmEU) onStart called
2018-11-19 17:52:05.724 (MeteoAlarmEU) Using polling interval of 3600 seconds
2018-11-19 17:52:05.724 (MeteoAlarmEU) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'Version':'1.0.2'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'Mode1':'http://www.meteoalarm.eu/documents/rss/es/ES001.rss'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'Name':'MeteoAlarmEU'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'Author':'ycahome'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'DomoticzHash':'bc239243'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'HardwareID':'16'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'Mode4':'Debug'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'DomoticzVersion':'3.9443'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'Mode3':'60'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'HomeFolder':'/home/yiannis/domoticz/plugins/MeteoAlarmEU/'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'Port':'0'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'DomoticzBuildTime':'2018-05-16 09:28:53'
2018-11-19 17:52:05.724 (MeteoAlarmEU) 'Key':'MeteoAlarmEU'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device count: 2
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device: 1 - ID: 64, Name: 'MeteoAlarmEU - Today', nValue: 1, sValue: 'No special awareness required'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device ID: '64'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device Name: 'MeteoAlarmEU - Today'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device nValue: 1
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device sValue: 'No special awareness required'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device LastLevel: 0
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device: 2 - ID: 65, Name: 'MeteoAlarmEU - Tomorrow', nValue: 1, sValue: 'No special awareness required'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device ID: '65'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device Name: 'MeteoAlarmEU - Tomorrow'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device nValue: 1
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device sValue: 'No special awareness required'
2018-11-19 17:52:05.724 (MeteoAlarmEU) Device LastLevel: 0
2018-11-19 17:52:05.724 (MeteoAlarmEU - Today) Updating device from 1:'No special awareness required' to have values 0:'No Data'.
2018-11-19 17:52:05.726 (MeteoAlarmEU - Tomorrow) Updating device from 1:'No special awareness required' to have values 0:'No Data'.
2018-11-19 17:52:15.141 (MeteoAlarmEU) Pushing 'onHeartbeatCallback' on to queue
2018-11-19 17:52:15.152 (MeteoAlarmEU) Processing 'onHeartbeatCallback' message
2018-11-19 17:52:15.152 (MeteoAlarmEU) Calling message handler 'onHeartbeat'.
2018-11-19 17:52:15.915 (MeteoAlarmEU) Gathering Data for:Barcelona
2018-11-19 17:52:15.915 (MeteoAlarmEU) Alarm(s) for Today: No special awareness required.
2018-11-19 17:52:15.915 (MeteoAlarmEU) Type Of Warning:-1
2018-11-19 17:52:15.915 (MeteoAlarmEU) Data:-tr>TODAY -/th>-/tr>-tr>-td width="28">-img alt="awt:4 level:1" border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l1-t4.jpg" />-/td>-/tr>-tr>-td width="28">-/td>-td>No special awareness required-/td>-/tr>-tr>-th align="left" colspan="3">-br />
2018-11-19 17:52:15.915 (MeteoAlarmEU) Current Awareness Status:No Data with Level 0
2018-11-19 17:52:15.915 (MeteoAlarmEU) Awareness for Today Updated to:No special awareness required
2018-11-19 17:52:15.915 (MeteoAlarmEU - Today) Updating device from 0:'No Data' to have values 1:'No special awareness required'.
2018-11-19 17:52:15.917 (MeteoAlarmEU) Alarm(s) for Tomorrow: No special awareness required
2018-11-19 17:52:15.917 (MeteoAlarmEU) Type Of Warning:-1
2018-11-19 17:52:15.917 (MeteoAlarmEU) Current Awareness Status:No Data with Level 0
2018-11-19 17:52:15.917 (MeteoAlarmEU) Awareness for Tomorrow Updated to:No special awareness required
2018-11-19 17:52:15.917 (MeteoAlarmEU - Tomorrow) Updating device from 0:'No Data' to have values 1:'No special awareness required'.
2018-11-19 17:52:25.144 (MeteoAlarmEU) Pushing 'onHeartbeatCallback' on to queue
2018-11-19 17:52:25.193 (MeteoAlarmEU) Processing 'onHeartbeatCallback' message
2018-11-19 17:52:25.193 (MeteoAlarmEU) Calling message handler 'onHeartbeat'.
2018-11-19 17:52:35.146 (MeteoAlarmEU) Pushing 'onHeartbeatCallback' on to queue
2018-11-19 17:52:35.168 (MeteoAlarmEU) Processing 'onHeartbeatCallback' message
2018-11-19 17:52:35.168 (MeteoAlarmEU) Calling message handler 'onHeartbeat'.
2018-11-19 17:52:45.148 (MeteoAlarmEU) Pushing 'onHeartbeatCallback' on to queue
2018-11-19 17:52:45.156 (MeteoAlarmEU) Processing 'onHeartbeatCallback' message
2018-11-19 17:52:45.156 (MeteoAlarmEU) Calling message handler 'onHeartbeat'.
2018-11-19 17:52:55.151 (MeteoAlarmEU) Pushing 'onHeartbeatCallback' on to queue
2018-11-19 17:52:55.190 (MeteoAlarmEU) Processing 'onHeartbeatCallback' message
2018-11-19 17:52:55.190 (MeteoAlarmEU) Calling message handler 'onHeartbeat'. 

Post Reply

Who is online

Users browsing this forum: EdwinK and 4 guests