Wrong values and known bugs in older versions
Values or costs far too high or negative – is the unit right?
In short: Usually a unit doesn't match. The source has a different unit selected than the device delivers, the price isn't given per unit of the price definition, or a start value was entered in the wrong unit. Check these places in the source detail, then correct the values.
The most common causes
| What is wrong | What you see | Correct |
|---|---|---|
Source unit is kWh, but the device delivers Wh | All values are 1,000 times too high | The unit the device delivers |
Power and energy mixed up, for example kW instead of kWh | A meter reading is summed up over time like a power value, and the values grow far too fast | Meter reading with an energy unit (kWh), power with W or kW |
"Price per unit" in cents instead of euros, for example 28.5 instead of 0.285 | Costs 100 times too high | Price per unit of the price definition, so per kWh or per m³ |
Start value in Wh, but the price definition calculates in kWh | Consumption strongly negative | Start value in the target unit |
The terms target unit, total and start value are explained under The terms.
How to check it (from v0.7.0)
- Under "Instances", open the settings of the SourceAnalytix instance and, on the "Overview" tab, your source.
- Read "Type" at the top: it says, for example, "Meter reading · kWh" or "Power · W → kWh". That is the measurement type and the target unit. Compare the "Total" with your meter.
- Under "Settings", check the "Unit" field. It must be the unit the device delivers. After the "Price definition", its unit is shown in brackets.
- On the "Price definitions" tab, check the "Price per unit" of the selected category.
- Look at the "Problems" tab. A start value that doesn't fit appears there as "Start value does not fit".
From v0.7.0, SourceAnalytix checks start values as you enter them. If a start value only fits when divided by 1000, the field asks "Looks like Wh – did you mean … ?". For more, see What do I enter for the start values (and in which unit)?.
Repairing values
If you change the unit, SourceAnalytix doesn't correct values that are already written. Afterwards, bring the total in line with your meter using the "Align meter reading" action, and recalculate the costs with "Recalculate costs from date". For how to repair consumption in running and completed periods, see Correcting wrong values.
No folder is created at all, not even a year folder
If SourceAnalytix doesn't recognise the unit at all, it doesn't start the source and creates no states, so no year folder either. This is described under Error "unit not supported" / "No unit defined".
See also: Which unit do I set on the datapoint (kWh instead of Wh, m³ instead of liters)? · Negative values after entering start values · How is a price definition structured (categories, basic fee, decimal mark)?
After an update or restore, values are 0 or SourceAnalytix is missing
In short: After a restore, the adapter itself is often missing, because a backup saves settings and data, not the program code. In that case, reinstall SourceAnalytix from the "latest" repository. If values are 0 afterwards, or the total doesn't match your meter, align it from v0.7.0 with "Align meter reading".
SourceAnalytix is missing after the restore
If the restore reports "Unknown packetName", for example, or the instance doesn't start, the adapter isn't installed. SourceAnalytix is only available in the "latest" (beta) repository. Switch the repository and install SourceAnalytix as described under How do I update SourceAnalytix (and what is a downgrade)?. The restored instance with its data then keeps running.
Values 0 or errors after an update or restore
An update doesn't change your values. After a restore, however, the total in the cumulativeReading state and the offset in the datapoint's settings can come from different points in time. The total then no longer matches the meter.
How to check it (from v0.7.0):
- In the instance settings, open the source on the "Overview" tab and compare the "Total" with your meter. You'll find the offset under "For experts" as
valueAtDeviceReset. - If the total is wrong, choose "Align meter reading" under "Actions" and enter the reading your meter shows.
- Look at the "Problems" tab. You recover a "Period rollover missed" with "Recover".
Up to v0.6.1, a source doesn't start if the offset is larger than the total. The log then shows "Check settings for … Known valueAtDeviceReset …". From v0.6.2, it keeps running. For what to do then, see Error "Known valueAtDeviceReset > known cumulative value".
Up to v0.6.x: You can only see the offset in the datapoint's object under common.custom.sourceanalytix.0 as valueAtDeviceReset. For how to set it and the total to matching values by hand, see Correcting wrong values.
TIP
If you move to a new system, take a full backup and don't restore it around midnight. That keeps the total and the settings together.
See also: Where is the data, how do I back it up and how do I move it? · ioBroker was off over midnight
Costs stay 0 or are not calculated
In short: Costs only appear if "Costs" is ticked for the source and the price definition has a valid "Price per unit". Also check the "Cost Type" of the price definition: for "Earnings", the values are under earnings, not under costs.
Checklist (from v0.7.0)
- Is "Costs" ticked? Open the source and check the "Costs" box under "Settings". Without it, SourceAnalytix doesn't create a
costsorearningsfolder. Change it, then click "Apply". - Is a price definition selected, and does it fit? If it's missing or its unit doesn't match, the source appears on the "Problems" tab (see Error "No cost type defined").
- Is the price valid? On the "Price definitions" tab, check the "Price per unit". If it isn't a number, SourceAnalytix calculates with 0 and writes
Price definition <name> has no valid unit price <value>, using 0 to avoid invalid cost calculationsto the log. - Is the price taken from a state? If the state doesn't deliver a valid price, SourceAnalytix uses the fallback price you entered:
Price source state <state> for <name> has no valid value or tariff, using configured fallback price <price>. If that is empty, the costs are 0. - Costs or earnings? With the "Cost Type" "Earnings" (feed-in), the values are under
sourceanalytix.0.<device>.currentYear.earningsand the consumption undercurrentYear.delivered. In the source detail, the columns are called "Delivery" and "Earnings".
For costs, you don't need "Store meter readings".
If you've corrected the price or the tick, "Recalculate costs from date" on the source recalculates the costs from a date onward using the price history. The consumption stays the same.
Up to v0.6.x: The box is called "Calculate costs" in the dialog at the datapoint. Since v0.5.0, missing or invalid prices no longer lead to invalid costs, but to 0 with a warning.
See also: Assigning prices and creating your own tariffs · Are calculated costs recalculated when I change the price, and how do I change it from a certain date? · Recording PV yield and feed-in
Huge consumption on power sources after a power outage
In short: With a power source, the last value applies until a new one arrives. If the device or the network goes down without reporting 0 first, SourceAnalytix extrapolates the last power over the whole gap. From v0.7.0, the "Maximum gap between power values (minutes)" setting prevents this.
Why this happens
SourceAnalytix multiplies each power value by the time until the next value. Up to v0.6.x, there is no upper limit for this. If no value arrived for three hours, three hours count at the last power. If SourceAnalytix itself was stopped, however, the first value after startup is just the new starting point, and the gap doesn't count at all.
How to prevent it (from v0.7.0)
- In the SourceAnalytix instance settings, open the power source on the "Overview" tab.
- In the "Settings" section, enter a value for "Maximum gap between power values (minutes)" that is clearly larger than the longest normal interval between two values from your device.
- Click "⚡ Apply". A longer stretch without a value then counts as 0. The log shows
No new power value from <datapoint> for <n> min, longer than the maximum gap of <m> min; this interval is not counted.
WARNING
Leave the setting empty or at 0 if your device only sends when something changes. Otherwise, the consumption of long stretches at constant power is missing, for example a heater that runs for hours at the same power.
If a power source doesn't deliver a value for three hours, then from v0.7.0 it appears on the "Problems" tab with "Power source has not reported for a long time".
Up to v0.6.x: Make sure the device reports 0 when it's switched off, or use a meter reading (kWh) instead of the power if the device has one (see Which datapoint do I activate: meter (kWh) or power (W)?).
You repair values that are already booked as described under Correcting wrong values.
See also: How does SourceAnalytix convert watts to kWh?
Why so many decimal places?
In short: By default, SourceAnalytix rounds consumption to 3 and costs to 2 decimal places. Each source has its own setting. From v0.7.0, you change it in the source detail under "For experts". With -1, SourceAnalytix stores the value without rounding, which gives many decimal places.
Where to set the rounding
| Where | Fields | Applies to |
|---|---|---|
| Instance settings, "Main settings", "Rounding" section | "Decimals for consumption values" (default 3), "Decimals for cost values" (default 2) | only sources that are newly set up |
| Source detail, "Settings", "For experts" (from v0.7.0) | "Decimals for consumption", "Decimals for costs" | this source, after "Apply" |
Existing sources keep their rounding, even if you change the instance default. Since v0.6.0, each source stores its own value.
Why does it show 402.400?
SourceAnalytix writes a number, for example 402.4. How many digits, zeros or thousands separators you see is determined by the display, so VIS, Admin or your visualisation.
Up to v0.5.4: The number of decimal places can't be set. From v0.5.5, you can set it for the instance and per source (#934).
See also: Which instance settings are there (periods, decimals)?
Known bugs in older versions – please update
In short: Many bugs from the forum and issues are fixed in newer versions. Check the table to see from which version your bug is fixed, and update SourceAnalytix. Up to v0.6.1, there are a number of known bugs that are fixed from v0.6.2.
For how to update, see How do I update SourceAnalytix (and what is a downgrade)?. SourceAnalytix is currently only available in the "latest" (beta) repository.
Up to v0.6.1, fixed from v0.6.2
| Bug up to v0.6.1 | Fixed from v0.6.2 | More |
|---|---|---|
A meter reading of exactly 0 is not written to the meter readings (meterReadings). | #1253 | Meter readings |
| Power sources (W) lose the energy between the last value and midnight at every period rollover. | #1254 | Which datapoint do I activate: meter (kWh) or power (W)? |
Meter readings delivered as text, for example "12,5", are not calculated. | #1255 | Source delivers text |
| In the year archive, 29 to 31 December overwrite week 01 of January. | #1256 | Weeks 52 and 53 |
| "Known valueAtDeviceReset > known cumulative value": the source doesn't start. | #1257 | Error "Known valueAtDeviceReset" |
| If a device reports 0 twice and then goes back to the old value, the total doubles. | #1258 | Reset detection |
currentPrice only changes after a restart when a "Valid from" lies in the future. The costs are still correct. | #1259 | Prices as states |
| If ioBroker was off over midnight, all the consumption of the gap lands on the new day. | #1260 | Midnight |
| Runtime errors don't appear in the log without Sentry. | #1261 | – |
| "Cumulative reading … decreased while reset detection is disabled" fills the log. | #1262 | Too much log output |
Units such as m3 or kwh on the datapoint are not recognised. | #1264 | Error "No unit defined" |
km³, dm³, cm³, mm³, µm and nm are converted incorrectly. Mismatched units only show up during calculation. | #1278 | Units |
| Permanently high CPU load, because sources are rebuilt on every object change. | #1233 | High CPU load |
Older bugs
| What you see | Fixed in | Source |
|---|---|---|
| "Cannot load jsonConfig of sourceanalytix: Not exists" | v0.4.9 | #453 |
| Values are reset to 0 at night or double (source datapoint with default value 0) | v0.4.8 | #210 |
| Daily values are not reset to 0 at midnight when the source value doesn't change | v0.5.0 | #478 |
| The folder for the new year is not created | v0.5.0 | #481 |
| Reset detection doesn't work, or reports resets although it is switched off | v0.5.0 | #686, #794 |
| The basic fee is counted twice after a restart | v0.5.4 | #1188 |
| A missed period rollover is only recovered with a restart | v0.5.5 | #905 |
| Previous periods appear one day late in Flot, History or Grafana | v0.5.5 | #497 |
| A brief drop to 0 or to a lower value is immediately treated as a reset, and consumption doubles | v0.6.0 | #1199 |
| Price definition and unit stay empty in Admin 8 | v0.6.0 | #1202 |
| A brief downward outlier that returns to the old value is confirmed as a reset | v0.6.1 | #1227 |
The many old messages about day, week and month rollovers from versions 0.2 to 0.4 were resolved by the rebuild in v0.5.0. If you're still using one of those versions, update to at least v0.5.0, or better still to the current version.
From v0.7.0: The instance settings get the "Overview" and "Problems" tabs. The "Problems" tab shows many of this page's errors directly, with a button to fix them. For this, SourceAnalytix needs Admin 8.0.0 or newer (#1269).
See also: How do I update SourceAnalytix (and what is a downgrade)? · Log messages and errors during setup