I am having some issues getting the continuous kWh totals noeeprom sketch setup with emoncms v8.03 deb as follows:
The emontx sketch says it's for 2 phase on header text , has sketch been changed to single phase?
The grid kWh input goes down/ backwards when PV starts exporting.
Emoncms nodes page not working. Feeds can be created but they don't update, yet they do update if created from inputs page.
emoncms/node/set.json?nodeid=10&data=20,20,20,20 gives......
Notice: Undefined offset: 11 in /usr/share/emoncms/www/Modules/node/node_model.php on line 148
Notice: Undefined offset: 12 in /usr/share/emoncms/www/Modules/node/node_model.php on line 157
kWh to kWh/d feed only updates at midnight. Is it possible to have feed constantly updating throughout day the same as the kWh input from the emontx does?
Is there an option to choose realtime graph as well as bar graph for kWh/d. It's useful for pv to show daily energy production in relation to seasonal calculated expected daily output.
Re: Emoncms v8.03 debian with emontxV3 continuous kwhtotals noeeprom.ino issues
great to hear your trying it, yes its been changed to single phase, adapted from Robin's 2 phase sketch. I made it possible for the kwh to go down if the direction of energy flow changed, thinking that this could be useful. I guess another option would be to record, imported exported wh total separately.. wouldnt be too hard to do.
Which decoder did you add to nodeid&data=20,20,20,20? Each csv value is a byte value, which can be combined to produce ints (2 bytes) or longs (4 bytes) It may be that you selected a decoder that is larger than the number of byte values your posting?
kwh to kwh/d - need to look into that.
realtime graphs, although technically possible it may need some coding to enable this.
Re: Emoncms v8.03 debian with emontxV3 continuous kwhtotals noeeprom.ino issues
Recording the imported and exported Wh totals separately would be great. At present I can't see a use for the grid Wh input figure if you have a grid connected PV system. On Tuesday when I first started using the sketch I produced about 20 kWh of PV electric but still imported about 8 kWh from the grid for the day. The emontX recorded -12 kWh of grid useage for the day.
The decoder I have used is EmontxV3 (continuous sampling with Wh totals). The decoder has the Wh values as 'unsigned long' but the sketch has them as 'long' in the typedef struct section. Would this be a problem?
kWh to kWh/d is behaving very strangely. I set up kWh to kWh/d on CT2 PV and CT3 immersion diverter this morning and they are incrementing fine. I then went back to CT1 grid, which has sat frozen since midnight, and deleted it. I then set it up again the same as I did for CT2 and 3 but it still doesn't work. It's sat frozen on 0.00 now.
Edit: recreating the Ct1 kWh to kWh/d feed now seems to have worked. It's now incrementing properly though probably decreases when exporting which I can't check just yet due to lack of sun.
I thought the realtime graphs for kWh/d might be an easy mod. I was hoping it would be as simple as changing 'DataType::DAILY' to 'DataType::REALTIME' for the kWh/d feed in process_model.php.
Re: Emoncms v8.03 debian with emontxV3 continuous kwhtotals noeeprom.ino issues
Thanks, for the comments Trystan.
I've had a go at splitting the import and export Wh for CT1 grid and CT2 PV in the emontx v3 sketch. This should stop the Wh's see-sawing up and down and allow me to calculate on the emontx grid import, PV produced, PV exported and PV used in house.
The sketch seems to be working ok so far but I'm not sure I've got the calculation part right. This is a Wh calculation part of the sketch, does it look ok?
joules_CT2 += tx_data.realPower_CT2 * 2; // Joules elapsed in 100 cycles @ 50Hz is power J.s x 2 seconds
if (joules_CT2>=0) {
tx_data.expwh_CT2 += joules_CT2 / 3600;
joules_CT2 = joules_CT2 % 3600;
}
if (joules_CT2<0) {
tx_data.impwh_CT2 += joules_CT2 / 3600;
joules_CT2 = joules_CT2 % 3600;
}
Re: Emoncms v8.03 debian with emontxV3 continuous kwhtotals noeeprom.ino issues
After leaving the code above run over night it looks as though the Wh figures are double what they should be so now I'm trying the following code which I've adapted from the current emonTxV3_continuous_kwhtotals_eeprom.ino sketch.
joules_CT2 += tx_data.realPower_CT2 * 2; // Joules elapsed in 100 cycles @ 50Hz is power J.s x 2 seconds
if (joules_CT2>=3600) {
tx_data.expwh_CT2 ++;
joules_CT2 = joules_CT2 - 3600;
}
if (joules_CT2<=-3600) {
tx_data.impwh_CT2 --;
joules_CT2 = joules_CT2 + 3600;
}
Time will tell if this produces valid readings.
Are the >=3600 and <=-3600 parts designed to give a +-1 Wh dead band around zero to account for noise or am I interpreting this wrong?