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

Event does not work in EmonCMS 9 #48

Closed RDCH106 closed 4 years ago

RDCH106 commented 8 years ago

The module is recognized as extra in "Extra" area. All the functionality of the section works well to configure the events, but the events never are triggered.

elyobelyob commented 8 years ago

I have stopped supporting this long ago, after too many updates to the core system which broke it. Pretty sure there are threads where people have tinkered with it though, and it is fully open source. I really wanted it to be a core module, but now find that the addition of MQTT support is far superior for my usage. That and node-red on my server and I am far happier. The overhead that the events module created due to using the http API was never ideal anyway. The push towards MQTT is one that all should embrace.

Best of luck,

Nick

On Mon, Feb 22, 2016 at 7:03 PM, Rubén de Celis Hernández < notifications@github.com> wrote:

The module is recognized as extra in "Extra" area. All the functionality of the section works well to configure the events, but the events never are triggered.

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

RDCH106 commented 8 years ago

I am sorry to read that.

Can you recommend a solution that does the same function that do the event module?

For example, how I do now to generate temporary variables to show them in a dashboard.

Is it possible to do it with MQTT?

glynhudson commented 8 years ago

Either https://github.com/jpmens/mqttwarn

or Node-RED should do the job

On 22 February 2016 at 16:58, Rubén de Celis Hernández < notifications@github.com> wrote:

I am sorry to read that.

Can you recommend a solution that does the same function that do the event module?

For example, how I do now to generate temporary variables to show them in a dashboard.

Is it possible to do it with MQTT?

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187266391.

Glyn Hudson

http://megni.co.uk http://adventuresplusnorthwales.blogspot.com

elyobelyob commented 8 years ago

Definitely go down the route of MQTT. You'll be able to do such much more bespoke stuff, you'll soon forget about the event module.

On Tue, Feb 23, 2016 at 12:12 AM, Glyn Hudson notifications@github.com wrote:

Either https://github.com/jpmens/mqttwarn

or Node-RED should do the job

On 22 February 2016 at 16:58, Rubén de Celis Hernández < notifications@github.com> wrote:

I am sorry to read that.

Can you recommend a solution that does the same function that do the event module?

For example, how I do now to generate temporary variables to show them in a dashboard.

Is it possible to do it with MQTT?

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187266391.

Glyn Hudson

http://megni.co.uk http://adventuresplusnorthwales.blogspot.com

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187273417.

elyobelyob commented 8 years ago

Not sure how that'll work if you have clients or users, but as a stand alone system for me, it's perfect.

On Tue, Feb 23, 2016 at 1:23 AM, Nick Boyle nick@elyob.com wrote:

Definitely go down the route of MQTT. You'll be able to do such much more bespoke stuff, you'll soon forget about the event module.

On Tue, Feb 23, 2016 at 12:12 AM, Glyn Hudson notifications@github.com wrote:

Either https://github.com/jpmens/mqttwarn

or Node-RED should do the job

On 22 February 2016 at 16:58, Rubén de Celis Hernández < notifications@github.com> wrote:

I am sorry to read that.

Can you recommend a solution that does the same function that do the event module?

For example, how I do now to generate temporary variables to show them in a dashboard.

Is it possible to do it with MQTT?

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187266391.

Glyn Hudson

http://megni.co.uk http://adventuresplusnorthwales.blogspot.com

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187273417.

Bra1nK commented 8 years ago

Anything you could do with the events module you can do that and more with Node-Red and MQTT, I’m very much a convert.

From: elyobelyob Sent: Monday, February 22, 2016 6:25 PM To: emoncms/event Subject: Re: [event] Event does not work in EmonCMS 9 (#48)

Not sure how that'll work if you have clients or users, but as a stand alone system for me, it's perfect.

On Tue, Feb 23, 2016 at 1:23 AM, Nick Boyle nick@elyob.com wrote:

Definitely go down the route of MQTT. You'll be able to do such much more bespoke stuff, you'll soon forget about the event module.

On Tue, Feb 23, 2016 at 12:12 AM, Glyn Hudson notifications@github.com wrote:

Either https://github.com/jpmens/mqttwarn

or Node-RED should do the job

On 22 February 2016 at 16:58, Rubén de Celis Hernández < notifications@github.com> wrote:

I am sorry to read that.

Can you recommend a solution that does the same function that do the event module?

For example, how I do now to generate temporary variables to show them in a dashboard.

Is it possible to do it with MQTT?

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187266391.

Glyn Hudson

http://megni.co.uk http://adventuresplusnorthwales.blogspot.com

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187273417.

— Reply to this email directly or view it on GitHub.

RDCH106 commented 8 years ago

Thank you for your suggestions. I am going to investigate both projects, searching what fit better my needs.

In the specific case of use where I have a feed value and I need to check if the feed value is more/less than x value to set other virtual feed to true/false value, is is it possible to do that with the Emoncms internal tools in the version 9? Or the only possibility is to use mqttwarn or node-red?

The most valuable feature of event module was the conditional "set feed value" to manage internal temporary variables that they can be showed in a dashboard. In this case, all the information (input and output) is inside of EmonCMS, not in a external service or platform.

elyobelyob commented 8 years ago

Node-red has an emoncms plugin. Worth investigating.

On Tuesday, 23 February 2016, Rubén de Celis Hernández < notifications@github.com> wrote:

Thank you for your suggestions. I am going to investigate both projects, searching what fit better my needs.

In the specific case of use where I have a feed value and I need to check if the feed value is more/less than x value to set other virtual feed to true/false value, is is it possible to do that with the Emoncms internal tools in the version 9? Or the only possibility is to use mqttwarn or node-red?

The most valuable feature of event module was the conditional "set feed value" to manage internal temporary variables that they can be showed in a dashboard. In this case, all the information (input and output) is inside of EmonCMS, not in a external service or platform.

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187648141.

Bra1nK commented 8 years ago

Yes it would seem to be possible with creative use of ‘If <, skip next’ (or ‘If >, skip next’), ‘GOTO’, ‘Reset to ZERO’, ‘Reset to Original’ etc. but using 1 or 0 rather than true or false.

From: Rubén de Celis Hernández Sent: Tuesday, February 23, 2016 10:45 AM To: emoncms/event Cc: Brian Kelly Subject: Re: [event] Event does not work in EmonCMS 9 (#48)

Thank you for your suggestions. I am going to investigate both projects, searching what fit better my needs.

In the specific case of use where I have a feed value and I need to check if the feed value is more/less than x value to set other virtual feed to true/false value, is is it possible to do that with the Emoncms internal tools in the version 9? Or the only possibility is to use mqttwarn or node-red?

The most valuable feature of event module was the conditional "set feed value" to manage internal temporary variables that they can be showed in a dashboard. In this case, all the information (input and output) is inside of EmonCMS, not in a external service or platform.

— Reply to this email directly or view it on GitHub.

RDCH106 commented 8 years ago

Bra1nK thank you for your answer. I have created new process 'Reset to ONE' to set binary state 0 and 1. And it works!

Also I will investigate Node-Red for more complex event management with other services and platforms.

Thank you everybody for your tips and advices.

malyjaponec commented 8 years ago

I have been using this module for a year for sending emails. Now after updating to 9.2 and 9.3 it does not work. Is there any replacement for email? Or is there any chance that someone fix it?

glynhudson commented 8 years ago

Latest version of pre built Raspberry Pi sd card has emoncms, mqtt, nodeRed and openHAB all setup and pre configured. NodeRed is ready setup to send trigger emails with an example flow pulling data from mqtt.

http://openenergymonitor.org/emon/node/12212

I think you will find using Node-RED for notifications and triggers much more flexible. I use the Pushover node on node red to send notification to my smartphone.

I have been using this module for a year for sending emails. Now after updating to 9.2 and 9.3 it does not work. Is there any replacement for email? Or is there any chance that someone fix it?

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-187986095.

RDCH106 commented 8 years ago

Internally EmonCMS has an email sender using SwiftMailer.

If you would use it, you need to download the latest available release of SwiftMailer and unzip in Lib folder. After that, go to email.php (emoncms/Lib) at line 19 and update the path:

if (!$this->have_swift) {
           $this->have_swift = include_once ("Lib/swiftmailer-5.4.1/lib/swift_required.php");
 }

The smtp configuration is in settings.php:

$smtp_email_settings = array(
      'host'=>"smtp.gmail.com",
      'port'=>"465",  // 25, 465, 587
      'from'=>array('noreply@emoncms.org' => 'EmonCMS'),
      // comment lines below that dont apply
      'encryption'=>"ssl", // ssl, tls
      'username'=>"yourusername@gmail.com",
      'password'=>"yourpassword"
    );

But the default functionality is a little bit limited. You can re-implement it or use Node-RED as says glynhudson.

malyjaponec commented 8 years ago

"Event" was not ideal but it was a part of one system. To maintain more systems and keep them all running makes always more probability of problems. I will install mode-red. I am running emon on normal ubuntu server so I can install whatever. I found that emon is only data harvesting oriented. Any reporting like "you have to big temperature in greenhouse..." that will go only once a day is not possible implement even with emon. Same way is possibility to give some data to the device. There is no prepared gauge that I can move by hand to for example change temperature of thermostat. Yes I can easily program it but must know the objects model of whole system that is not to much documented.

EDIT: Install node-red on 2-3 years old ubuntu distribution is not possible. Incomparability everywhere and non existence of the packages for such old (???) version of OS. That is why I prefer to install less things than having for each function special program. In this situation emon is going to be unusable for me. In case I can not get report that battery is discharged I will have to look for another system completely.

elyobelyob commented 8 years ago

It was ideal at the time, I spent a whole Christmas writing that! ;) I disagree with the one system comment. It was a plug in that was hacked about with whatever seemed available to use. Being separate from the core was the ongoing issue. As the core progressed the plug in fell behind. Having MQTT as the core part of economy is where I have always seen it going good. Being able to easily add in the components you need for your system is the way forward. These components being in a better position regarding getting support, their longevity should be far better.

When you install economy and apache etc from scratch, you need to install certain things. This is no different, hence the pi image now has node-red etc as default.

Nick

On Friday, 26 February 2016, malyjaponec notifications@github.com wrote:

"Event" was not ideal but it was a part of one system. To maintain more systems and keep them all running makes always more probability of problems. I will install mode-red. I am running emon on normal ubuntu server so I can install whatever. I found that emon is only data harvesting oriented. Any reporting like "you have to big temperature in greenhouse..." that will go only once a day is not possible implement even with emon. Same way is possibility to give some data to the device. There is no prepared gauge that I can move by hand to for example change temperature of thermostat. Yes I can easily program it but must know the objects model of whole system that is not to much documented.

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-188911723.

malyjaponec commented 8 years ago

I understand you point of view. I run the server that is not just the emoncms, but several webs, gallery, mail systems and that is why I do not touch if it is possible. I have upgraded emon from 9.2 to 9.31 as it is just php application that does not need any special framework. I have tried several other things but always when someone suggest to use something new I find the problems. As it is not yesterday linux nor LTS the packages are missing. OK I try to compile but later I find that I am not able to get working devel. tools. As usual my system is already unsupported on package level. So I'm extremely allergic to someone that suggest me to use some huge system that needs several tools to install and build just for very small feature.

I'm not expert if the Event was or was not part of emonCMS. It was plugin or module. Whatever. But If I have running emon I was able to install all plugins just by one git command. That is beauty of this solution comparing setting up whole new application. Also management of the emails is inside of the emon web not as second applicaton, no more accounts and so one. So I expect that emoncms team should try to have reporting module as part of the system, not core part but plugin. But it seems they use it for different purpose than me. "I measure to act".. not play or watch. I also measure to get statistical data to know what I can do better (like insulation around pipes of solar heater, if it is effective to use different speeds of pump, or should I wash the dishes with this programm or that one and how much helps to fill the dishwasher with hot water... these are statistical tasks that does not need reporting, but some others does.

That was all I wanted to say. Now Im going to search solution with MQTT or something...

elyobelyob commented 8 years ago

If you want to fix the event module, it's on GitHub and you are free to do so.

On Monday, 29 February 2016, malyjaponec notifications@github.com wrote:

I understand you point of view. I run the server that is not just the emoncms, but several webs, gallery, mail systems and that is why I do not touch if it is possible. I have upgraded emon from 9.2 to 9.31 as it is just php application that does not need any special framework. I have tried several other things but always when someone suggest to use something new I find the problems. As it is not yesterday linux nor LTS the packages are missing. OK I try to compile but later I find that I am not able to get working devel. tools. As usual my system is already unsupported on package level. So I'm extremely allergic to someone that suggest me to use some huge system that needs several tools to install and build just for very small feature.

I'm not expert if the Event was or was not part of emonCMS. It was plugin or module. Whatever. But If I have running emon I was able to install all plugins just by one git command. That is beauty of this solution comparing setting up whole new application. Also management of the emails is inside of the emon web not as second applicaton, no more accounts and so one. So I expect that emoncms team should try to have reporting module as part of the system, not core part but plugin. But it seems they use it for different purpose than me. "I measure to act".. not play or watch. I also measure to get statistical data to know what I can do better (like insulation around pipes of solar heater, if it is effective to use different speeds of pump, or should I wash the dishes with this programm or that one and how much helps to fill the dishwasher with hot water... these are statistical tasks that does not need reporting, but some others does.

That was all I wanted to say. Now Im going to search solution with MQTT or something...

— Reply to this email directly or view it on GitHub https://github.com/emoncms/event/issues/48#issuecomment-190286795.

malyjaponec commented 8 years ago

I'm sorry, but I'm not php programmer. That is not so big issue as it is not difficult language. What is difficult for me is to get knowledge how the emoncms works inside. I think modules can program only somone knows ideas and mechanisms inside emoncms. I only suspect that "events" were triggered on some moment when the feeds or inputs are updated as when I used one type of triger the failure message was routed though whole emoncms to the source device. I will continue to try build node-red for messaging. it has bigger probability of success :) But this discussion goes off-topic so I rather not to react any more. Thanks to you all for explanations.

chaveiro commented 8 years ago

Event module was deprecated, it's functions are available since v9.3 as a new core module eventP, see https://openenergymonitor.org/emon/node/12083

TrystanLea commented 4 years ago

Im closing this issue as this module is now archived.