Page 2 of 7

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 09 November 2018 21:50
by misko903
ycahome wrote: Thursday 08 November 2018 14: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?

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 09 November 2018 23:33
by ycahome
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

Re: Python Plugin: MeteoAlarmEU

Posted: Saturday 10 November 2018 7:13
by manutremo
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?

Re: Python Plugin: MeteoAlarmEU

Posted: Saturday 10 November 2018 9:38
by misko903
ycahome wrote: Friday 09 November 2018 23: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?

Re: Python Plugin: MeteoAlarmEU

Posted: Saturday 10 November 2018 18:04
by ycahome
Glad to hear that this plugin worked for your.

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

Re: Python Plugin: MeteoAlarmEU

Posted: Saturday 10 November 2018 19:39
by misko903
ycahome wrote: Saturday 10 November 2018 18: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

Re: Python Plugin: MeteoAlarmEU

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

Re: Python Plugin: MeteoAlarmEU

Posted: Sunday 11 November 2018 18:39
by EdwinK
ycahome wrote: Sunday 11 November 2018 0: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 :)

Re: Python Plugin: MeteoAlarmEU

Posted: Tuesday 13 November 2018 9:57
by misko903
note to myself:
Trencin, Slovakia:
http://www.meteoalarm.eu/documents/rss/sk/SK309.rss

Re: Python Plugin: MeteoAlarmEU

Posted: Tuesday 13 November 2018 10:37
by misko903
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

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 16 November 2018 9:48
by manutremo
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?

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 16 November 2018 10:18
by ycahome
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 

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 16 November 2018 10:33
by manutremo
Thanks for checking in your own server. Any idea of what be the issue in mine from the error log?

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 16 November 2018 10:41
by ycahome
manutremo wrote: Friday 16 November 2018 10: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)

Re: Python Plugin: MeteoAlarmEU

Posted: Sunday 18 November 2018 12:13
by manutremo
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.

Re: Python Plugin: MeteoAlarmEU

Posted: Monday 19 November 2018 17:08
by ycahome
manutremo wrote: Sunday 18 November 2018 12: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'. 

Re: Python Plugin: MeteoAlarmEU

Posted: Saturday 15 December 2018 13:19
by mozo78
Hi, now works well for me too. Thank you for your work.

Hint: only works well if you exactly choose your area. In may case:

1. Not working, it is the rss for the whole country:
https://www.meteoalarm.eu/documents/rss/hu.rss

When I used this I got the same error as above declared.

2.Working, only the central area of the country:
https://www.meteoalarm.eu/documents/rss/hu/HU006.rss

Next step: try to find informative icons for dashticz. :)

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 21 December 2018 14:22
by EdwinK
Now seeing this all the time in the error-log:
2018-12-21 11:07:45.532 Error: (MeteoAlarm) 'onHeartbeat' failed 'IndexError':'list index out of range'.
2018-12-21 11:07:45.532 Error: (MeteoAlarm) ----> Line 280 in '/home/pi/domoticz/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
2018-12-21 11:07:45.532 Error: (MeteoAlarm) ----> Line 147 in '/home/pi/domoticz/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
2018-12-21 12:07:46.507 Error: (MeteoAlarm) 'onHeartbeat' failed 'IndexError':'list index out of range'.

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 04 January 2019 8:47
by EdwinK

Code: Select all

2019-01-04 08:44:07.651 (MeteoAlarm) 'HardwareID':'14'
2019-01-04 08:44:07.651 (MeteoAlarm) 'Port':'0'
2019-01-04 08:44:07.651 (MeteoAlarm) 'Key':'MeteoAlarmEU'
2019-01-04 08:44:07.651 (MeteoAlarm) 'DomoticzVersion':'4.10311'
2019-01-04 08:44:07.651 (MeteoAlarm) 'DomoticzHash':'e588266e'
2019-01-04 08:44:07.651 (MeteoAlarm) 'Name':'MeteoAlarm'
2019-01-04 08:44:07.651 (MeteoAlarm) 'HomeFolder':'/home/pi/domoticz/plugins/MeteoAlarmEU/'
2019-01-04 08:44:07.651 (MeteoAlarm) 'Mode4':'Debug'
2019-01-04 08:44:07.651 (MeteoAlarm) Device count: 2
2019-01-04 08:44:07.652 (MeteoAlarm) Device: 1 - ID: 137, Name: 'MeteoAlarm - Today', nValue: 0, sValue: 'No Data'
2019-01-04 08:44:07.652 (MeteoAlarm) Device ID: '137'
2019-01-04 08:44:07.652 (MeteoAlarm) Device Name: 'MeteoAlarm - Today'
2019-01-04 08:44:07.652 (MeteoAlarm) Device nValue: 0
2019-01-04 08:44:07.652 (MeteoAlarm) Device sValue: 'No Data'
2019-01-04 08:44:07.652 (MeteoAlarm) Device LastLevel: 0
2019-01-04 08:44:07.652 (MeteoAlarm) Device: 2 - ID: 138, Name: 'MeteoAlarm - Tomorrow', nValue: 0, sValue: 'No Data'
2019-01-04 08:44:07.652 (MeteoAlarm) Device ID: '138'
2019-01-04 08:44:07.652 (MeteoAlarm) Device Name: 'MeteoAlarm - Tomorrow'
2019-01-04 08:44:07.652 (MeteoAlarm) Device nValue: 0
2019-01-04 08:44:07.652 (MeteoAlarm) Device sValue: 'No Data'
2019-01-04 08:44:07.652 (MeteoAlarm) Device LastLevel: 0
2019-01-04 08:44:07.652 (MeteoAlarm - Today) Updating device from 0:'No Data' to have values 0:'No Data'.
2019-01-04 08:44:07.657 (MeteoAlarm - Tomorrow) Updating device from 0:'No Data' to have values 0:'No Data'.
2019-01-04 08:44:07.047 Status: (MeteoAlarm) Stopping threads.
2019-01-04 08:44:07.047 Status: (MeteoAlarm) Stopped.
2019-01-04 08:44:07.047 Status: (MeteoAlarm) Started.
2019-01-04 08:44:07.646 Status: (MeteoAlarm) Entering work loop.
2019-01-04 08:44:07.646 Status: (MeteoAlarm) Initialized version 1.0.2, author 'ycahome'
2019-01-04 08:44:17.648 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:44:17.694 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:44:17.694 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:44:18.226 (MeteoAlarm) Gathering Data for:Netherlands
2019-01-04 08:44:18.226 (MeteoAlarm) ------FEEDPARSER OUTPUT for TODAY:------------------
2019-01-04 08:44:18.226 Error: (MeteoAlarm) 'onHeartbeat' failed 'IndexError':'list index out of range'.
2019-01-04 08:44:18.226 Error: (MeteoAlarm) ----> Line 280 in '/home/pi/domoticz/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
2019-01-04 08:44:18.226 Error: (MeteoAlarm) ----> Line 147 in '/home/pi/domoticz/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
2019-01-04 08:44:27.728 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:44:27.760 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:44:27.760 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:44:37.730 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:44:37.782 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:44:37.782 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:44:47.734 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:44:47.760 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:44:47.763 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:44:57.735 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:44:57.739 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:44:57.739 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:45:07.737 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:45:07.762 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:45:07.762 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:45:17.739 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:45:17.744 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:45:17.746 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:45:27.743 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:45:27.765 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:45:27.765 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:45:37.745 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:45:37.749 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:45:37.751 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:45:47.752 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:45:47.783 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:45:47.783 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:45:57.754 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:45:57.807 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:45:57.807 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:46:07.758 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:46:07.803 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:46:07.804 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:46:17.761 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:46:17.777 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:46:17.779 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:46:27.763 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:46:27.771 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:46:27.771 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:46:37.765 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:46:37.798 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:46:37.798 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:46:47.767 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:46:47.783 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:46:47.783 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:46:57.769 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:46:57.805 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:46:57.805 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:47:07.775 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:47:07.799 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:47:07.799 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:47:17.779 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:47:17.787 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:47:17.787 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:47:27.789 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:47:27.814 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:47:27.814 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:47:37.794 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:47:37.798 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:47:37.798 (MeteoAlarm) Calling message handler 'onHeartbeat'.
2019-01-04 08:47:47.798 (MeteoAlarm) Pushing 'onHeartbeatCallback' on to queue
2019-01-04 08:47:47.818 (MeteoAlarm) Processing 'onHeartbeatCallback' message
2019-01-04 08:47:47.819 (MeteoAlarm) Calling message handler 'onHeartbeat'.
© 2012-2019 Domoticz | WWW: Domoticz.com
MY debug log

Re: Python Plugin: MeteoAlarmEU

Posted: Friday 04 January 2019 9:50
by ycahome
EdwinK wrote: Friday 04 January 2019 8:47

Code: Select all

.....
2019-01-04 08:44:18.226 (MeteoAlarm) Gathering Data for:Netherlands
2019-01-04 08:44:18.226 (MeteoAlarm) ------FEEDPARSER OUTPUT for TODAY:------------------
2019-01-04 08:44:18.226 Error: (MeteoAlarm) 'onHeartbeat' failed 'IndexError':'list index out of range'.
2019-01-04 08:44:18.226 Error: (MeteoAlarm) ----> Line 280 in '/home/pi/domoticz/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
2019-01-04 08:44:18.226 Error: (MeteoAlarm) ----> Line 147 in '/home/pi/domoticz/plugins/MeteoAlarmEU/plugin.py', function onHeartbeat
.........
MY debug log
I can't see which RSS feed you are using but from "2019-01-04 08:44:18.226 (MeteoAlarm) Gathering Data for:Netherlands"
i suppose that you use the one of the country (Netherlands) instead of your county (Specific region of Netherlands).

Based on your profile location i propose to use "Zuid-Holland" RSS feed instead which is

Code: Select all

https://www.meteoalarm.eu/documents/rss/nl/NL009.rss
.

Let me now if this worked for you.