emoncms / event_archived

Setup actions to occur when a feed goes above, below or is equal a set value. Set another feed or send an email
8 stars 25 forks source link

Fatal error: Call to a member function fetch_array() on a non-object in /var/www_emon/emoncms/Modules/event/event_model.php on line 212 #47

Closed malyjaponec closed 4 years ago

malyjaponec commented 8 years ago

When I setup some Event type "increases by" for feed "foliak_sensor_failed" the device reporting data by this url:

emon.jiffaco.cz/emoncms/input/post.json?node=3&json={"foliak_teplota":10.3,"foliak_sensor_failed":0,"foliak_heap":25096,"foliak_baterie_min":3.861,"foliak_vlhkost":99.3,"foliak_light":645,"foliak_baterie_max":3.97332}&apikey=

gets this response instead of "ok":

Fatal error: Call to a member function fetch_array() on a non-object in /var/www_emon/emoncms/Modules/event/event_model.php on line 212

Configuration of input:

"foliak_sensor_failed":{"id":"89","processList":"2:10,1:103"} feed config

{"id":"103","userid":"1","name":"foliak_sensor_failed","datatype":"1","tag":"Node 3","public":"1","size":"7938","engine":"2","time":"1445937942","value":"0"}

The input processing is set this way

Event was set "increases by 1" to send email in moment when sensor fails and not any more. I forgot that I multiplied the input when I set the notification, but it is not a problem. I think that it would also raise notification if it is increased more then by 1. The problem is that it stops feeding feeds from this device at all because of empty array that appears in notification plugin.

SERVER info: Emoncms Version 9 RC2 | 2015.09.15 Server OS Linux 3.5.0-51-generic Host bottle bottle (192.168.129.3) Date 2015-10-27 10:34:12 CET Uptime 10:34:12 up 24 min, 0 users, load average: 0.35, 0.38, 0.32 HTTP Server Apache/2.2.22 (Ubuntu) HTTP/1.1 CGI/1.1 80 Database Version MySQL 5.5.44-0ubuntu0.12.04.1 Host localhost (127.0.0.1) Date 2015-10-27 10:34:12 (UTC 01:00‌​) Stats Uptime: 1449 Threads: 1 Questions: 14873 Slow queries: 1 Opens: 234 Flush tables: 1 Open tables: 227 Queries per second avg: 10.264 Redis Version 2.4.15 Host localhost:6379 (127.0.0.1) Size 253 keys (574.88K) Uptime 0 days PHP Version 5.4.6-1ubuntu1.8 (Zend Version 2.4.0) Modules Core date ereg libxml openssl pcre zlib bcmath bz2 calendar ctype dba dom hash fileinfo filter ftp gettext SPL iconv json mbstring session posix Reflection standard shmop SimpleXML soap sockets Phar exif sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip apache2handler PDO curl dio gd intl ldap mysql mysqli pdo_mysql pdo_pgsql pdo_sqlite pgsql redis sqlite3 imagick mcrypt wikidiff2 mhash

I'm not sure if it is enough for reporting issue. This is my first report of this kind. If any more information needed let me know.

elyobelyob commented 8 years ago

Is event fixed now?

On Tue, Oct 27, 2015 at 9:41 AM, malyjaponec notifications@github.com wrote:

When I setup some Event type "increases by" for feed "foliak_sensor_failed" the device reporting data by this url:

emon.jiffaco.cz/emoncms/input/post.json?node=3&json={ http://emon.jiffaco.cz/emoncms/input/post.json?node=3&json=%7B "foliak_teplota":10.3,"foliak_sensor_failed":0,"foliak_heap":25096,"foliak_baterie_min":3.861,"foliak_vlhkost":99.3,"foliak_light":645,"foliak_baterie_max":3.97332}&apikey=

gets this response instead of "ok":

Fatal error: Call to a member function fetch_array() on a non-object in /var/www_emon/emoncms/Modules/event/event_model.php on line 212

Configuration of input:

"foliak_sensor_failed":{"id":"89","processList":"2:10,1:103"} feed config

{"id":"103","userid":"1","name":"foliak_sensor_failed","datatype":"1","tag":"Node 3","public":"1","size":"7938","engine":"2","time":"1445937942","value":"0"}

The input processing is set this way

  • 10 (simple multiplication by 10 to better visibility on graph, device returns 0 or 1) log to feed type PHPTIMESERIES

Event was set "increases by 1" to send email in moment when sensor fails and not any more. I forgot that I multiplied the input when I set the notification, but it is not a problem. I think that it would also raise notification if it is increased more then by 1. The problem is that it stops feeding feeds from this device at all because of empty array that appears in notification plugin.

SERVER info: Emoncms Version 9 RC2 | 2015.09.15 Server OS Linux 3.5.0-51-generic Host bottle bottle (192.168.129.3) Date 2015-10-27 10:34:12 CET Uptime 10:34:12 up 24 min, 0 users, load average: 0.35, 0.38, 0.32 HTTP Server Apache/2.2.22 (Ubuntu) HTTP/1.1 CGI/1.1 80 Database Version MySQL 5.5.44-0ubuntu0.12.04.1 Host localhost (127.0.0.1) Date 2015-10-27 10:34:12 (UTC 01:00‌​) Stats Uptime: 1449 Threads: 1 Questions: 14873 Slow queries: 1 Opens: 234 Flush tables: 1 Open tables: 227 Queries per second avg: 10.264 Redis Version 2.4.15 Host localhost:6379 (127.0.0.1) Size 253 keys (574.88K) Uptime 0 days PHP Version 5.4.6-1ubuntu1.8 (Zend Version 2.4.0) Modules Core date ereg libxml openssl pcre zlib bcmath bz2 calendar ctype dba dom hash fileinfo filter ftp gettext SPL iconv json mbstring session posix Reflection standard shmop SimpleXML soap sockets Phar exif sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip apache2handler PDO curl dio gd intl ldap mysql mysqli pdo_mysql pdo_pgsql pdo_sqlite pgsql redis sqlite3 imagick mcrypt wikidiff2 mhash

I'm not sure if it is enough for reporting issue. This is my first report of this kind. If any more information needed let me know.

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/47.

malyjaponec commented 8 years ago

What version/branche should I use for testing. I have not updated it since reporting issue. And Issue is simply replicable. Anytime I use condition "increases by" than it fails. I had to stop using this condition. Without it works ok.

TrystanLea commented 4 years ago

Im closing this issue as this module is now archived.