Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codespell: config, workflow (to alert when new typos added) and get typos fixed #348

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
skip = .git,*.pdf,*.svg,go.sum,*.css,.codespellrc
check-hidden = true
# guessed lines with German, and some specific variables, regexes
ignore-regex = .*( die |ü).*|\b(upToDate|AFE|DOUT)\b|.*irt\|inpu\|con.*
ignore-words-list = busses,parm
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
6 changes: 3 additions & 3 deletions Docs/CTbasics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ CTs are manufactured to produce a secondary current that is in
phase with the primary current when installed with a particular
orientation. In single and split-phase installations it is
important to observe polarity in certain situations. In
three-phase installations, it is imperitive that a polarity
three-phase installations, it is imperative that a polarity
convention be observed.

IoTaWatt will accept many different CTs from different manufacturers.
Expand Down Expand Up @@ -197,7 +197,7 @@ systems in the next chapter.

As explained above, split-phase systems can provide
high-voltage for large appliances. These circuits are connected
to two adjascent CTs that are on different legs. The usual
to two adjacent CTs that are on different legs. The usual
convention is to use RED and BLACK wires or, as explained below,
BLACK and WHITE for *pure* 240V circuits.

Expand All @@ -221,7 +221,7 @@ correct power and amperage.
^^^^^^^^^^^^^^^^^

Like the *pure* 240V circuits above, these circuits use two
adjascent circuit-breakers, but also have a neutral conductor.
adjacent circuit-breakers, but also have a neutral conductor.
They usually have RED and BLACK conductors on the circuit-breaker
and a white neutral conductor that connects to the neutral bussbar.
Typical appliances are ranges, ovens, and clothes-dryers. Circuits
Expand Down
2 changes: 1 addition & 1 deletion Docs/Emoncms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Setup Emoncms
Emoncms is an open-source system that stores time-series
data and has multiple reporting apps developed by the authors
as well as apps contributed by users in the open community.
The graph application used locally by IoTaWatt is a derivitive
The graph application used locally by IoTaWatt is a derivative
of that effort.

For a nominal fee you can use the managed
Expand Down
2 changes: 1 addition & 1 deletion Docs/dataVisualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ whose capabilities are adequate for your needs. It remains as a menu pick under
Data tab.

The new Graphic Viewer is a superset of the functions of the Original Graph, so
this feature should be considered depricated and may be removed in a future release.
this feature should be considered deprecated and may be removed in a future release.
2 changes: 1 addition & 1 deletion Docs/dotlocal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if there is anyone out there that called iotawatt.

At startup, IoTaWatt creates a process that listens for those datagrams.
When it hears it's name, it responds to the sender saying "I'm iotawatt
and my IP address is xx.xx.xx.xx". The requestor makes a note of
and my IP address is xx.xx.xx.xx". The requester makes a note of
this address and uses it to send subsequent transactions to iotawatt.local.

How does that *not* work?
Expand Down
12 changes: 6 additions & 6 deletions Docs/graphPlus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ that the color is blue under the Watts unit, while it is green under the Wh unit
indicating they are different traces.

One final note about the sidebar. It will disappear when the screen size gets to be
too narrow to accomodate it. When that happens, it is replaced by a list icon at the
too narrow to accommodate it. When that happens, it is replaced by a list icon at the
top left of the main screen. Pressing that will overlay the main body with the selection
sidebar. An X on the sidebar is used to hide it again.

Expand Down Expand Up @@ -198,7 +198,7 @@ You will know it is auto refresh mode because the Refresh button will change to
revert to the manual |refreshImage| button.

The Refresh/Freeze state is retained when saving and subsequently restoring graphs.
This feature is useful when loading a saved graph as an embeded window where there are
This feature is useful when loading a saved graph as an embedded window where there are
no controls, allowing an auto refresh graph can be displayed in a frame.

.. |refreshImage| image:: pics/graphPlus/refreshButton.png
Expand Down Expand Up @@ -258,7 +258,7 @@ an immediate effect on the graph. There is no Save or Refresh required.
Removes the trace from the graph and deselects from the source list.

:Color:
Selects an overide color.
Selects an override color.

:Line/Bar:
Toggle between line or bar chart for this trace.
Expand All @@ -284,7 +284,7 @@ an immediate effect on the graph. There is no Save or Refresh required.
sometimes increasing the precision provides a more detailed representation.

:Scale:
The values returned in the query will be muliplied by this scale factor.
The values returned in the query will be multiplied by this scale factor.
This will affect the values in the CSV table as well.


Expand Down Expand Up @@ -338,10 +338,10 @@ Yaxes Range Table

This list is used to modify the Yaxis range for each unit. The default is "auto",
which works well to represent the full range of the data, however the Min and/or Max
can be specified here to overide the auto default. Once changed, the new limit will remain
can be specified here to override the auto default. Once changed, the new limit will remain
in effect until one of these things happens:

* The overide value is removed.
* The override value is removed.
* A saved graph is loaded.
* The reset button is clicked.

Expand Down
4 changes: 2 additions & 2 deletions Docs/integrators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ You can click |edit| on existing integrations to change or delete them.

From here, the process is identical to adding any other output.
For a refresher, see `Adding a new Output <outputs.html>`_
Integrations must be uniquely named using alpha-numeric characters and the
Integrations must be uniquely named using alphanumeric characters and the
underscore (_) character.

The Script that is specified will be integrated to sum the positive and negative components.
Expand Down Expand Up @@ -131,7 +131,7 @@ and will drive the mains negative when generation exceeds energy use.

Create an output that is the sum of all of the mains.
Typically a 230V single-phase service will have one main,
a split-phase North-American servive will have two mains and
a split-phase North-American service will have two mains and
a three-phase service will have three:

(single-phase)
Expand Down
8 changes: 4 additions & 4 deletions Docs/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ select=[*series1* [, *series2* ...]]
* .volts (default)
* .hz (frequency).

The .d<n> modifier overides the default number of decimal digits.
The .d<n> modifier overrides the default number of decimal digits.

<power input or output> [ **.watts** | .amps | .wh | .va | .var | .varh | .pf] [.d<n>]
A power input or output. A unit modifier can be used to specify:
Expand All @@ -82,7 +82,7 @@ select=[*series1* [, *series2* ...]]
* .varh (volt-ampere-reactive hours)
* .pf (power factor)

The .d<n> modifier overides the default number of decimal digits.
The .d<n> modifier overrides the default number of decimal digits.

An example might be:
`select=[time.local.unix,mains.watts.d0,solar.wh.d1]`
Expand Down Expand Up @@ -118,7 +118,7 @@ select=[*series1* [, *series2* ...]]
For most units, this will result in the average value over the entire period.
For Wh, it will result in the total Wh for the entire period.

To overide, specify a time unit preceeded by a multiplier, as in:
To override, specify a time unit preceded by a multiplier, as in:

* 10s (ten seconds)
* 5m (five minutes)
Expand Down Expand Up @@ -175,7 +175,7 @@ select=[*series1* [, *series2* ...]]
&limit={**n** | none }
......................

Optional parameter overides the default output limit.
Optional parameter overrides the default output limit.
The default is 1,000 lines.

:n:
Expand Down
2 changes: 1 addition & 1 deletion Docs/split-phase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ There are three possibilities:
....
These circuits are typically larger appliances like Hot-Water,
Range, Pumps, Electric Heat, Dryers, Heat-pumps, sub-panels,
and Air-conditioners. They use two circuit breakers in adjascent
and Air-conditioners. They use two circuit breakers in adjacent
rows, so one of the breakers is on phase A and the other is on phase B.

As explained in the `CT Basics <CTbasics.html>`_ section, 240V
Expand Down
2 changes: 1 addition & 1 deletion Docs/threePhase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for three-phase monitoring, particularly in three phase countries like
Australia and Germany. For home energy monitoring, the *derived reference*
method has been overwhelmingly popular.

This chapter explains two methods for measuring a so calld "four wire"
This chapter explains two methods for measuring a so called "four wire"
or "wye" system, by far the most common implementation of three-phase.
IoTaWatt can also be used with "three wire" or "delta" systems using
different methods.
Expand Down
4 changes: 2 additions & 2 deletions Docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Troubleshooting
Led Indicator
-------------

The IotaWatt has a bi-color external LED indicator that is usefull in
determining the current state and for explicitely indicating
The IotaWatt has a bi-color external LED indicator that is useful in
determining the current state and for explicitly indicating
serious problems. Whenever there is a question about whether
something may be wrong, it is important to look at the LED indicator.
The LED can blink RED (R) or GREEN (G).
Expand Down
2 changes: 1 addition & 1 deletion Docs/uploaders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ similar systems within close proximity allows both short and
longer term performance issues to be identified.

While pvoutput is primarily focused on monitoring energy generation,
it also provides equally capabable facilities to upload and monitor
it also provides equally capable facilities to upload and monitor
energy consumption data from various energy monitoring devices.

Both solar generation and energy consumption data can be
Expand Down
4 changes: 2 additions & 2 deletions Firmware/IotaWatt/CSVquery.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CSVquery {
uint32_t _begin; // Beginning time - UTC
uint32_t _end; // Ending time - UTC
int32_t _limit; // Output limit in lines, -1 is nolimit
uint32_t _groupMult; // Group unit muliplier as in 7d
uint32_t _groupMult; // Group unit multiplier as in 7d
tUnits _groupUnits; // Basic group time unit
tformat _timeFormat; // Time output format
format _format; // Output format (Json or CSV)
Expand All @@ -74,7 +74,7 @@ class CSVquery {
units unit; // Units to produce
tformat timeFormat; // Format of Time column
};
int8_t decimals; // Overide decimal positions
int8_t decimals; // Override decimal positions
bool timeLocal; // output local time if source=='T'
bool delta; // Output change in value;
Script* script; // -> Script
Expand Down
2 changes: 1 addition & 1 deletion Firmware/IotaWatt/GetFeedData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* GetFeedData SERVICE.
*
* The web server does a pretty good job of handling file downloads and uploads asynchronously,
* but assumes that any callbacks to new handlers get the job completely done befor returning.
* but assumes that any callbacks to new handlers get the job completely done before returning.
* The GET /feed/data/ request takes a long time and generates a lot of data so it needs to
* run as a SERVICE so that sampling can continue while it works on providing the data.
* To accomplish that without modifying ESP8266WebServer, we schedule this SERVICE and
Expand Down
2 changes: 1 addition & 1 deletion Firmware/IotaWatt/IotaInputChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class IotaInputChannel {
float _calibration; // Calibration factor
float _phase; // Phase correction in degrees (+lead, - lag);
float _vphase; // Phase offset for 3-phase voltage reference
float _vmult; // Voltage multiplier (overides _double)
float _vmult; // Voltage multiplier (overrides _double)
float _lastPhase;
int16_t* _p50; // -> 50Hz phase correction array
int16_t* _p60; // -> 60Hz phase correction array
Expand Down
2 changes: 1 addition & 1 deletion Firmware/IotaWatt/IotaScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Script {
Script* next(); // -> next Script in set

double run(IotaLogRecord* oldRec, IotaLogRecord* newRec); // Run this Script
double run(IotaLogRecord* oldRec, IotaLogRecord* newRec, units); // Run w/overide units
double run(IotaLogRecord* oldRec, IotaLogRecord* newRec, units); // Run w/override units
double run(IotaLogRecord* oldRec, IotaLogRecord* newRec, const char* overideUnits);

void print();
Expand Down
6 changes: 3 additions & 3 deletions Firmware/IotaWatt/IotaWatt.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct EEprom {
#define T_RTCWDT 24 // Dead man pedal service
#define T_CSVquery 25 // CSVquery
#define T_xurl 26 // xurl
#define T_utility 27 // Miscelaneous utilities
#define T_utility 27 // Miscellaneous utilities
#define T_EXPORTLOG 28 // Export log
#define T_influx2 29 // influxDB_v2_uploader
#define T_influx2Config 30 // influx2 configuration
Expand Down Expand Up @@ -262,7 +262,7 @@ extern int16_t* masterPhaseArray; // Single array containing all ind
// handlers if the statistics are used.

extern float frequency; // Split the difference to start
extern float configFrequency; // Frequency at last config (phase corrrection basis)
extern float configFrequency; // Frequency at last config (phase correction basis)
extern float samplesPerCycle; // Here as well
extern float cycleSampleRate;
extern int16_t cycleSamples;
Expand All @@ -289,7 +289,7 @@ extern bool getNewConfig; // Set to update config after running
#define HTTPrequestMax 1 // Maximum number of concurrent HTTP requests
extern int16_t HTTPrequestFree; // Request semaphore
extern uint32_t HTTPrequestStart[HTTPrequestMax]; // request start time tokens
extern uint16_t HTTPrequestId[HTTPrequestMax]; // Module ID of requestor
extern uint16_t HTTPrequestId[HTTPrequestMax]; // Module ID of requester
extern uint32_t HTTPlock; // start time token of locking request

// ************************** HTTPS proxy host ******************************************
Expand Down
4 changes: 2 additions & 2 deletions Firmware/IotaWatt/Loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void loop()
*
* Other activities are organized as Services that are scheduled and dispatched in Loop during the half-cycle
* downtime. This mechanism schedules at a resolution of one millisecond, and dispatches during the optimal
* time period between AC cycles. To preserve context and synchonization, each Service is coded as a
* time period between AC cycles. To preserve context and synchronization, each Service is coded as a
* state-machine. They must be well behaved and should try to run for less than a few milliseconds and/or
* relinquish at Bingo time. That isn't always possible and doesn't do any real harm if they run over
* occasionally as it just reduces the sampling frequency a bit.
Expand All @@ -153,7 +153,7 @@ void loop()
* 2-1000 value is milliseconds to delay before redispatch.
* > 1000 value is UNIXtime of requested redispatch.
* So if a service just wants to relinquish in deference to sampling but is not finished with its
* business, just reeturn 1 to be redispatched at the next available opportunity.
* business, just return 1 to be redispatched at the next available opportunity.
*
* The schedule itself is kept as an ordered list of control blocks in ascending order of time + priority
* called serviceQueue. Loop invokes the service with the highest priority that is dispatchable.
Expand Down
2 changes: 1 addition & 1 deletion Firmware/IotaWatt/RTC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ bool DateTime::isValid() const {
above specifiers are left as-is.
__Example__: The format "DDD, DD MMM YYYY hh:mm:ss" generates an output
of the form "Thu, 16 Apr 2020 18:34:56.
@see The `timestamp()` method provides similar functionnality, but it
@see The `timestamp()` method provides similar functionality, but it
returns a `String` object and supports a limited choice of
predefined formats.
@param[in,out] buffer Array of `char` for holding the format description
Expand Down
2 changes: 1 addition & 1 deletion Firmware/IotaWatt/Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ if(spiffsBegin()){
log("SPIFFS mounted.");
} else {
if(spiffsFormat()){
log("SPIFFS formated");
log("SPIFFS formatted");
if(spiffsBegin()){
log("SPIFFS mounted.");
}
Expand Down
12 changes: 6 additions & 6 deletions Firmware/IotaWatt/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* 04/21/17 2.01.01 Add polyphase correction with single VT
* 05/06/17 2.01.02 Rework samplePower for better phase correction
* 05/28/17 2.01.03 Add automatic update and rework WiFiManager use
* 06/04/17 2.01.04 Miscelaneous cleanup
* 06/04/17 2.01.04 Miscellaneous cleanup
* 06/26/17 2.01.05 Ongoing development
* 07/09/17 2.02.00 Version 4 hardware support
* 07/12/17 2.02.01 Fix sample power, enhance graph
Expand Down Expand Up @@ -73,10 +73,10 @@
* 03/29/18 02_03_03 Units computation in calculator, heap management improvements
* 03/30/18 02_03_04 Punchlist, fix memory loak in getConfig, build server payload at bulk maturation
* 04/15/18 02_03_05 Rework influxDB support with variables and double buffering
* 05/16/18 02_03_06 Reimpliment messagelog, upgrade to 2.4.1 core and lwip 2
* 05/16/18 02_03_06 Reimplement messagelog, upgrade to 2.4.1 core and lwip 2
* 06/03/18 02_03_07 Add web server authorization, temp time-wait fix
* 06/20/18 02_03_08 Use lwip 2 "high bandwidth", misc fixes
* 07/11/18 02_03_09 Lastest asyngHTTPrequest, Issue#166, improve auth&trace
* 07/11/18 02_03_09 Latest asyngHTTPrequest, Issue#166, improve auth&trace
* 07/25/18 02_03_10 run getFeedData in handler, auth session changes, use staging core
* 07/31/18 02_03_11 Minor changes for general release
* 08/08/18 02_03_12 Finally fix memory leak?
Expand All @@ -100,11 +100,11 @@
* 02/12/20 02_05_04 Update to core 2.6.3, Fix URL handling influx, fix heap requirement issues during config start and update.
* 02/27/20 02_05_05 Fix problem creating datalogs
* 03/27/20 02_05_06 Use legacy mDNS, combine influxDBmeasurements
* 04/02/20 02_05_07 Overide HTTPS with HTTP in Emonservice, influxService
* 04/02/20 02_05_07 Override HTTPS with HTTP in Emonservice, influxService
* 04/20/20 02_05_08 Nothing to see here, just a change to tables.txt to add AccuCTs forced version change
* 05/03/20 02_05_09 Add VAR VARh to script and query, Disable datalog WDT during update download, rp in influx query
* 09/14/20 02_05_10 Add WiFi to status query
* 09/21/20 02_05_11 Add Graph+ imbed
* 09/21/20 02_05_11 Add Graph+ embed
* 12/02/20 02_05_12 Maintenance. Fix query chunking, Tables updates, contributed app changes.
* 03/10/21 02_06_00 Add HTTPSproxy, influx2, ms Scheduler, recode Script, uploader base class, more..
* 03/18/21 02_06_01 "server" restart issue, vars in influx tags, init influx bucket
Expand Down Expand Up @@ -181,7 +181,7 @@ float VrefVolts = 2.5; // Voltage reference shunt value used
// handlers if the statistics are used.

float frequency = 55; // Split the difference to start
float configFrequency; // Frequency at last config (phase corrrection basis)
float configFrequency; // Frequency at last config (phase correction basis)
float samplesPerCycle = 550; // Here as well
float cycleSampleRate = 0;
int16_t cycleSamples = 0;
Expand Down
2 changes: 1 addition & 1 deletion Firmware/IotaWatt/dataLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* but they are ordered. It is relatively quick to find any record by key (UNIXtime) and a
* readKEY method is provided in the IotaLog class.
*
* As with all of the SERVICES, it has a single function call and is implimented as state machine.
* As with all of the SERVICES, it has a single function call and is implemented as state machine.
* Services should try not to execute for more than a few milliseconds at a time.
**********************************************************************************************/
#include "IotaWatt.h"
Expand Down
Loading