Comments (10)
Are you sure the value of StopTxnSampledData was applied correcly? You can verify it with a GetConfiguration command from the server. Otherwise, I would believe that the microcontroller runs out of flash memory and therefore, the creation of the StopData JSON files fails. I verified this function here and couldn't reproduce the issue.
from microocpp.
By default, the number of StopData measurements is limited to 4 which could be too restrictive in your scenario. I quickly changed the corresponding definition. To keep more than 4 elements on flash, set the build flag MO_MAX_STOPTXDATA_LEN
to a higher value.
from microocpp.
@matth-x I am bit confusion, I thought after 4 elements, code will erase the older ones and keep creating new log?
from microocpp.
@matth-x I recompiled my entire code working fine now, seems very strange. Also I don't want to create new file periodically, basically one file sd-connector_id-txNr-0 should update periodically so I can access only 1 file to know the history.
Also I checked the JSON sd-*.jsn, I was looking for JSON which has start time, end time (or duaration) and energy consumed wh till now, Arre you creating any such .jsn or any suggestion where to modify for same.
from microocpp.
The current strategy is to make a consecutive record of up to MO_MAX_STOPTXDATA_LEN -1
sd files and then to keep the most recent readings in the last sd file which gets updated afterwards. So the sd file with the highest sequence number always contains the most recent measurements.
from microocpp.
Understood, How can I access txNr so application can access the logs.
from microocpp.
The transaction store keeps track of all currently stored transactions. You can retrieve the range of corresponding txNr like that:
//necessary include
#include <MicroOcpp/Model/Transactions/TransactionStore.h>
if (auto context = getOcppContext()) {
auto& model = context->getModel();
if (auto txStore = model.getTransactionStore()) {
int txNrBegin = txStore->getTxBegin(1 /* connectorId */); //first possible txNr
unsigned int txNrCount= txStore->size(1 /* connectorId */); //number of stored transactions
//iterate through all stored transactions by txNr
for (unsigned int i = 0; i < txNrCount; i++) {
int txNr = (txNrBegin + (int)i) % MAX_TX_CNT;
//...
}
}
}
Edit: handle roll-over of txNrs, i.e. ranges like (99998, 99999, 0, 1)
from microocpp.
Thanks @matth-x , One doubt as post reboot if last state was charging, it continues the charging. I think mocpp also storing the energy consumed wh so how to fetch that number from mocpp stack so can start increasing the energy consumption from that number.
from microocpp.
@matth-x I noticed one bug related to SD files in 1.6.0 stack. Suppose StopTxnSampledData is false initially and after we do multiple transaction & enable enable StopTxnSampledData to true. It will not create the SD file for future transaction.
from microocpp.
Hi @chandan-ultraviolette, MicroOcpp does not terminate running transactions automatically when being initialized. This needs to be explicitly done by calling endTransaction()
after mocpp_initialize()
(not required to terminate it, but most chargers do it). Although the Start-/StopTx energy values are being stored by MicroOcpp once the operation has been initiated, that's not the case for the EnergyMeterInput over reboots. In general, the MeterValues, Start- and StopTx operations will always capture the original value of the EnergyMeterInput, there is no processing / correction step in between. It's the responsibility of the firmware to persist the energy register over reboots.
StopTxnSampledData should contain the measurands, like "Energy.Active.Import.Register".
from microocpp.
Related Issues (20)
- First StatusNotification 1970-01-01 timestamp HOT 3
- [Firmware Update]How Can We do The Firmware update in ESP-IDF, there is no any document available how to implement it.. HOT 1
- Unable to Remote Start Transaction strangely one day HOT 3
- Server error, data loss! HOT 2
- Error compiling for board DOIT ESP32 DEVKIT V1
- What value do I measure with "L1" compared to "L1-N" and "L1-L2", according to the protocol specifications? What value do I get via "L1"? HOT 1
- ESP32-IDF ESP32C3 : How to test all the ocpp opetrations over esp32 module HOT 3
- GetDiagnostics‘s issue HOT 2
- Offline Start transaction using local list HOT 2
- Ethernet (W5500) Support with Mongoose WebSocket Adapter on Arduino platform HOT 2
- Error compiling for board DOIT ESP32 DEVKIT V1
- How to send 'Finishing' when receive 'SoftReset' during charging. Not 'Unableable' HOT 2
- Is OCPP 1.6 security whitepaper edition 3 planned HOT 1
- How to pass the OCTT tast case 2.4.3. EV Side Disconnected HOT 4
- How to make specific feature not support HOT 1
- configuration key 'ChargingScheduleAllowedChargingRateUnit' accessibility is wrong, and some item is missing HOT 2
- AuthorizeRemoteTxRequests key functional implementation HOT 1
- Strange state transaciton handling HOT 7
- Scheduled charging on Power cut HOT 1
- Plugged connector check
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microocpp.