Parenthesis

Hi,

Sorry but I’m newbie with emoncms, I have some inputs taht are generating some feeds and are working correctly, but now I need to create some additional feeds as a result of other feed with some calculs,for example one of them " Exchanger Power = 1.163 * V1 * (tV1 - tR1)"

My question i how to do this, my question is realted with parenthesis and also how to create a new feed with this output

Thanks

Reverse the order of the calculations, so the subtraction is done first:

For example, as a virtual feed:

  • Source feed: tV1
  • subtract feed: tR1
  • multiply feed: V1
  • multiply factor: 1.163

You could also do this with inputs if you want to create an actual feed of results.

Hi, first of all thanks for your answer

the problem is that I need this

Exchanger Power = 1.163 * (V1*0.001 ) * (tV1 - tR1)"

0.001 is a unit conversion, I have tried changing order but no sucess, what is wrong

Other question is how can I make a newfeed with this result to be available to be used in any option emoncms

Otherissue is this virtual feed is not available to be used, any requirements to be used forexampel on a graph orother emoncms option?

Thanks

Welcome, @klxout , to the OEM forum.

In emonCMS, a Feed is the database. Values sent to a Feed are stored for ever. This is what you need if you want to see the data in a graph tomorrow, next week or next year.

This might help you with understanding Virtual Feeds:
https://openenergymonitor.github.io/forum-archive/node/10977.html
The important part is in the second line: “no disc space is used.” This means data is stored only for a limited time.

To send data to a (real) Feed, use Log to Feed.

Hi, great! thanks for this information

One additonal question I’m trying to use a conditional to reocver some values only if mode is =1, I’m trying this but is not working, how can I dothis?

if mode is =! 1 then absolute value 0,andwhen 1calculate from 5 to steps 7, how cna Ido this?

Thanks

You need one more GOTO as step 5.
What comes after step 9 (now step 10)? if it is Log to feed then the new GOTO is to step 11: Log to Feed, so you record a Zero value if you came via the GOTO, else you record the result after × 0.001 (step 10).

Hi,

not sure ifthisiscorrect, always reutnrs 0,andnow for exampel I have mode =1 and in this case I expect a value != 0,
in thiscase 6/7/8 are really executed on any case? about log to feed hwo can I do this I can find this options

using this seems that returns values

i sthis correct?

How can I save to disk with log to feedor similar this virtual feed?

Thanks

Step 3 should be GOTO 6. When you inserted a step, all those below moved down one step.

If you need to save the data in a Feed, my understanding is you should be doing this as part of the processing for one of your Inputs on an Input page, not in a Virtual Feed.

Choose the last input that appears on the Inputs page for Node hpsu508. When the last input is processed, all the others will have the latest value - if you use the first, all those down the page will not yet be processed and some data could be 10 s or more old.

Do Reset to ZERO, then use + Input to read again the input in whose process list you are working on and those you have not logged to a Feed, and + Feed to read all the others that have already been processed and logged to a Feed.

Then at the end, you can Log to Feed and create a new Feed with the result.

Hi,

Great, Ihave added some new feeds generated from 1 unused input and it works! thank you!

Myquestion isif it is possible to make an input for every feed, nowfor example using 1 input I’m generating more thant 5 new feeds from same input,andnot sure if forbetter perofrmance or to have a more clear enfironment thisis possible…

Where can I read informatin about emoncms to understand how all emoncms works?

and last, to monitor power consumtpionfromsome devide, aht is the recommended tool to monitor fromcable power usage,for example my pumpdoesn’t report power cosnumption electric, and I like to monitor tocalculate real COP/EER

Thanks!

Try the ‘Docs’ section here, but read to the end here before you go to the ‘Docs’ links. Start with emonHub emonHub user guide — OpenEnergyMonitor 0.0.1 documentation because this is where the data first arrives from the energy monitor part of your emonPi. This then passes the data to emonCMS, where it joins the data arriving via your LAN emonCMS user guide — OpenEnergyMonitor 0.0.1 documentation

You have it the wrong way round. YOU cannot create an Input. An Input is created automatically when data arrives in emonCMS. The Input page is the first stage where an incoming value is converted into the form you need - for example watts to kW, or three phases summed into a combined total. You then send the processed value to a Feed, where it is stored.

So, if you wish, You can have a Feed for every Input, and you can have several Feeds from one input. If an input does not send data to a Feed, that data is never saved. Let us say you are processing the Exchanger voltage, and the voltage is read every 10 s and sent to emonCMS. The very first time the voltage value arrives, it creates the Input page. You can then add the process steps. The steps on the Input page are processed as soon as the number for the voltage arrives in emonCMS, and, unless you do a Log to feed, it vanishes when it falls off the bottom of the list of process steps.

When you do Log to feed, the data is stored. How and when this happens depends on the type of feed. If it is a Variable Interval, the data is sent to the feed immediately. If it is a Fixed Interval, it happens at the time intervals you choose when you create the Feed, and most importantly, if there is no new data when the data is due to be stored, a NULL value is recorded in the Feed - so you can have gaps if the data does not arrive on time.

hi Thanks! Great information!

I’mtrying to get export and imporet energy but I can obtain if <0 then export value and improt =0 and thhen if >0 import = value and export =0 it is possible?

I have tried:

but seems taht if to check if is negative value never is executed, it is possible?

thanks

Thanks

Yes - the principle is you will need Allow positive then Log to feed - Import, Reset to original then Log to Feed - Export.

Thanks, I’m trying this without success, where can be the issue to return >0 as import and <0 as export ?

my need it to take if positive on one feed and if negative onother feed, it is possible?

What is all this? :anguished:
Look again at what I told you. Where did I write GOTO? Where did I write Reset to ZERO?
You do not need these.

Read the text in the blue section where you choose Allow positive:
" Negative values are zeroed for further processing by the next processor in the processing list.
Output: Modified value passed onto next process step."
Therefore, if the next step is Log to Feed, there is your positive (Imported) power.
Then Reset to original and do it again, this time choosing Allow negative. If you want your Exported power to be a positive value, multiply here by -1 and then Log to Feed.

If you want accumulated energy (Power to kWh) as well, you can do this after you logged the power: twice - once for the imported energy and again for the exported energy.

Hi,

Sorry I think that haven’t detailed correctly environment, I’m not trying to accumulate energy to power to kWh
I have n input from solar inverter that can return positives values (when is importing W from Grid) and negatives values (when is exporting power to grid)

Tried with

but without success…

I like to have two feedsone for every situation + when is importing to grid, and other when is - and is exporting to Grid

It is possible? How?

But you wrote earlier this is what you wanted:

Power is in kW. Energy is in kWh. They are different quantities. It is like asking how many cm of water makes 1 litre :exploding_head:

OK, if you do not want this, do not do it. I was suggesting that this is the place for more processing steps if you need them.

I understood you when you asked this here:

and

And I think I answered it here:

Do you understand how a step in the processing works?

For example, the ‘multiply’ process ×

"Multiplies current value by given constant. This can be useful for calibrating a particular variable on the web rather than by reprogramming hardware.
Output: Modified value passed onto next process step.

The Input is multiplied by a number you specify (it can be greater that 1 or smaller), and the result is passed to the next step down the list. (The word `current’ does not mean amperes, it means the number from the input that has come down the list.)

If the next step is ‘power to kWh’:

Power to kWh: Convert a power value in Watts to a cumulative kWh feed.
Visualisation tip: Feeds created with this input processor can be used to generate daily kWh data using the BarGraph visualisation with the delta property set to 1. See Guide: Daily kWh
Output: Does NOT modify value passed onto next process step.

It uses the time interval from when the last value arrived to convert the power (W) to energy (kWh) and sends the result to a Feed you define. BUT it passes the original power to the next step in the list.

Or it can do both, like Wh Accumulator

And so on until the bottom of the list is reached, where the number disappears forever.

Thank you for your help, now it works!