From 22b8670941b5d357f41ee59d26af2a02a2d184d2 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Thu, 19 Dec 2024 15:08:31 +0100 Subject: [PATCH] snapshot inverter files --- .gitignore | 1 + inverter/.gitignore | 4 + inverter/LICENSE | 619 +++++++++++ inverter/inverter.pl | 1593 +++++++++++++++++++++++++++++ inverter/static/twilight_2018.csv | 367 +++++++ inverter/static/twilight_2019.csv | 367 +++++++ inverter/static/twilight_2020.csv | 367 +++++++ inverter/static/twilight_2022.csv | 367 +++++++ 8 files changed, 3685 insertions(+) create mode 100644 inverter/.gitignore create mode 100644 inverter/LICENSE create mode 100755 inverter/inverter.pl create mode 100755 inverter/static/twilight_2018.csv create mode 100755 inverter/static/twilight_2019.csv create mode 100755 inverter/static/twilight_2020.csv create mode 100755 inverter/static/twilight_2022.csv diff --git a/.gitignore b/.gitignore index ca9b92c..4876f95 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ pgadmin/ rsnapshot/var/ seafile/database/ seafile/server/ +inverter/data/ diff --git a/inverter/.gitignore b/inverter/.gitignore new file mode 100644 index 0000000..65aa72c --- /dev/null +++ b/inverter/.gitignore @@ -0,0 +1,4 @@ +daemon_*.sh +config.ini +data/ +wunderground.json diff --git a/inverter/LICENSE b/inverter/LICENSE new file mode 100644 index 0000000..a3997e6 --- /dev/null +++ b/inverter/LICENSE @@ -0,0 +1,619 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. \ No newline at end of file diff --git a/inverter/inverter.pl b/inverter/inverter.pl new file mode 100755 index 0000000..b515abc --- /dev/null +++ b/inverter/inverter.pl @@ -0,0 +1,1593 @@ +#!/usr/bin/perl -w +# +# AS AT 04May2011 +# +# inverter.pl - polls data from the RS232 port on certain inverters and outputs data to a csv file +# & optionally to http://pvoutput.org, depending on the configuration file settings (config.ini). +# +# Usage examples: +# perl inverter.pl +# perl inverter.pl "COM1" +# perl inverter.pl "/dev/ttyS0" +# +# Arguments: +# $ARGV[0] = OPTIONAL port name (eg: "COM1") if have >1 inverter. See: config.ini for defaults. +# +# Output Filenames +# * inverter_[serial#]_YYYYMMDD.csv +# * inverter_err_[serial#]_YYYYMM.csv +# * inverter_[serial#].rrd +# +####################################################################### +# +# (c) 2010-2011 jinba @ jinba-ittai.net +# Licensed under the GNU GPL version 2 +# +# + editions by shell_l_d: +# + edited to work with ActivePerl (Windows) too +# + added version/firmware checking & combined CMS2k & CMS10k (parseData) versions +# + added data format checking (per findings from JinbaIttai & Ingmar) +# + added %HoH, %HASH +# + added writeToPort() & added warnings to readbuf() +# + edited calc of sleep so dont have to keep DATAPOLL_FREQ_SECS set to 60. +# + edited code so dont have to keep DATAPOLL_FREQ_SECS set to 60. +# + added DESCR to $HoH hash of hashes & used in parseDataFmt() +# + added check if ( $seconds > 0 ) before 'sleep $seconds' +# + added DESCR to parseData() & replaced die with warning in writeToFile() +# + added %HoHparams, closeSerialPort(), parseParamFmt(), parseParam() +# + renamed %HoH items: ETOTAL, HTOTAL, UNK1 through UNK9 +# + edited etotal & htotal calcs in WriteToFile() +# + renamed DIVIDEBY to MULTIPLY & edited their values & replaced / with * in parseParam() & parseData() +# + added rrdtool code +# + edited REINIT_DEFAULT & writeReadBuffer() +# + added warning to closeSerialPort() & edited REINIT_DEFAULT line in writeReadBuffer() +# + added getDate_YYYYMM(), getErrFileName(). +# + edited parseData(). +# + implemented AppConfig & a configuration file (config.ini). +# +# + editions by mmcdon23: +# + added getDateTime_HHMM() & getDate_YYYYMMDD() +# + added date & time strings to writeToFile() +# + added "_YYYYMMDD.csv" to logfile name (suffix) +# + edited parseData() by using 0 for ETODAY in morning if hasn't reset yet +# + moved sleep from parseData() to main +# + moved code from initialise, readbuf & main to writeReadBuffer() +# & altered to continue reading until read pattern matched. +# + added pvoutput code to main & only send to PVoutput every 5 or 10th min per PVOUTPUT_FREQ constant. +# + added calc of sleep seconds to stop the script creeping away from the 00 minute mark. +# + edited added if statement to parseParamFmt() & parseDataFmt() & around the calls to them +# +# + editions by nigol2: +# + added optional port argument in case have more than 1 inverter +# + added serial# to logfile name in case have more than 1 inverter +# +# + editions by slampt: +# + uncommented & edited rrdtool (graphing) code in writeToFile() with help from JinbaIttai +# +####################################################################### +# +# Required to be installed: +# * perl +# * perl AppConfig module +# * perl Win32::SerialPort module (Windows) +# * perl Device::SerialPort module (Unix/Linux) +# +####################################################################### + +#use strict; +use warnings; +use AppConfig; # used to read from a config file + +$| = 1; # don't let Perl buffer I/O + +####################################################################### +# +# Define constants & variables (most from config file) +# + +# create a new AppConfig object & auto-define all variables +my $config = AppConfig->new(); + +# define new variables +$config->define( "flags_debug!" ); +$config->define( "flags_use_pvoutput!" ); +$config->define( "flags_use_rrdtool!" ); +$config->define( "secs_datapoll_freq=s" ); +$config->define( "secs_pvoutput_freq=s" ); +$config->define( "secs_timeout=s" ); +$config->define( "secs_reinit=s" ); +$config->define( "paths_windows=s" ); +$config->define( "paths_other=s" ); +$config->define( "scripts_pvoutput=s" ); +$config->define( "scripts_pvoutput_php=s"); +$config->define( "scripts_create_rrd=s" ); +$config->define( "scripts_rrdtool_exe_win=s" ); +$config->define( "scripts_rrdtool_exe_oth=s" ); +$config->define( "serial_baud=s" ); +$config->define( "serial_port_win=s" ); +$config->define( "serial_port_oth=s" ); +$config->define( "serial_parity=s" ); +$config->define( "serial_databits=s" ); +$config->define( "serial_stopbits=s" ); +$config->define( "serial_handshake=s" ); +$config->define( "serial_datatype=s" ); +$config->define( "hex_data_to_follow_index=s" ); +$config->define( "hex_capacity_index=s" ); +$config->define( "hex_capacity_length=s" ); +$config->define( "hex_firmware_index=s" ); +$config->define( "hex_firmware_length=s" ); +$config->define( "hex_model_index=s" ); +$config->define( "hex_model_length=s" ); +$config->define( "hex_manuf_index=s" ); +$config->define( "hex_manuf_length=s" ); +$config->define( "hex_serial_index=s" ); +$config->define( "hex_serial_length=s" ); +$config->define( "hex_other_index=s" ); +$config->define( "hex_other_length=s" ); +$config->define( "hex_confserial_index=s" ); +$config->define( "sendhex_initialise=s" ); +$config->define( "sendhex_serial=s" ); +$config->define( "sendhex_conf_serial1=s" ); +$config->define( "sendhex_conf_serial2=s" ); +$config->define( "sendhex_version=s" ); +$config->define( "sendhex_paramfmt=s" ); +$config->define( "sendhex_param=s" ); +$config->define( "sendhex_datafmt=s" ); +$config->define( "sendhex_data=s" ); +$config->define( "recvhex_serial=s" ); +$config->define( "recvhex_conf_serial=s" ); +$config->define( "recvhex_version=s" ); +$config->define( "recvhex_paramfmt=s" ); +$config->define( "recvhex_param=s" ); +$config->define( "recvhex_datafmt=s" ); +$config->define( "recvhex_data=s" ); +$config->define( "param_vpvstart_hexcode=s" ); +$config->define( "param_vpvstart_multiply=s" ); +$config->define( "param_vpvstart_measure=s" ); +$config->define( "param_vpvstart_index=s" ); +$config->define( "param_vpvstart_descr=s" ); +$config->define( "param_tstart_hexcode=s" ); +$config->define( "param_tstart_multiply=s" ); +$config->define( "param_tstart_measure=s" ); +$config->define( "param_tstart_index=s" ); +$config->define( "param_tstart_descr=s" ); +$config->define( "param_vacmin_hexcode=s" ); +$config->define( "param_vacmin_multiply=s" ); +$config->define( "param_vacmin_measure=s" ); +$config->define( "param_vacmin_index=s" ); +$config->define( "param_vacmin_descr=s" ); +$config->define( "param_vacmax_hexcode=s" ); +$config->define( "param_vacmax_multiply=s" ); +$config->define( "param_vacmax_measure=s" ); +$config->define( "param_vacmax_index=s" ); +$config->define( "param_vacmax_descr=s" ); +$config->define( "param_facmin_hexcode=s" ); +$config->define( "param_facmin_multiply=s" ); +$config->define( "param_facmin_measure=s" ); +$config->define( "param_facmin_index=s" ); +$config->define( "param_facmin_descr=s" ); +$config->define( "param_facmax_hexcode=s" ); +$config->define( "param_facmax_multiply=s" ); +$config->define( "param_facmax_measure=s" ); +$config->define( "param_facmax_index=s" ); +$config->define( "param_facmax_descr=s" ); +$config->define( "param_zacmax_hexcode=s" ); +$config->define( "param_zacmax_multiply=s" ); +$config->define( "param_zacmax_measure=s" ); +$config->define( "param_zacmax_index=s" ); +$config->define( "param_zacmax_descr=s" ); +$config->define( "param_dzac_hexcode=s" ); +$config->define( "param_dzac_multiply=s" ); +$config->define( "param_dzac_measure=s" ); +$config->define( "param_dzac_index=s" ); +$config->define( "param_dzac_descr=s" ); +$config->define( "data_temp_hexcode=s" ); +$config->define( "data_temp_multiply=s" ); +$config->define( "data_temp_measure=s" ); +$config->define( "data_temp_index=s" ); +$config->define( "data_temp_descr=s" ); +$config->define( "data_vpv1_hexcode=s" ); +$config->define( "data_vpv1_multiply=s" ); +$config->define( "data_vpv1_measure=s" ); +$config->define( "data_vpv1_index=s" ); +$config->define( "data_vpv1_descr=s" ); +$config->define( "data_vpv2_hexcode=s" ); +$config->define( "data_vpv2_multiply=s" ); +$config->define( "data_vpv2_measure=s" ); +$config->define( "data_vpv2_index=s" ); +$config->define( "data_vpv2_descr=s" ); +$config->define( "data_vpv3_hexcode=s" ); +$config->define( "data_vpv3_multiply=s" ); +$config->define( "data_vpv3_measure=s" ); +$config->define( "data_vpv3_index=s" ); +$config->define( "data_vpv3_descr=s" ); +$config->define( "data_ipv1_hexcode=s" ); +$config->define( "data_ipv1_multiply=s" ); +$config->define( "data_ipv1_measure=s" ); +$config->define( "data_ipv1_index=s" ); +$config->define( "data_ipv1_descr=s" ); +$config->define( "data_ipv2_hexcode=s" ); +$config->define( "data_ipv2_multiply=s" ); +$config->define( "data_ipv2_measure=s" ); +$config->define( "data_ipv2_index=s" ); +$config->define( "data_ipv2_descr=s" ); +$config->define( "data_ipv3_hexcode=s" ); +$config->define( "data_ipv3_multiply=s" ); +$config->define( "data_ipv3_measure=s" ); +$config->define( "data_ipv3_index=s" ); +$config->define( "data_ipv3_descr=s" ); +$config->define( "data_etoday_hexcode=s" ); +$config->define( "data_etoday_multiply=s" ); +$config->define( "data_etoday_measure=s" ); +$config->define( "data_etoday_index=s" ); +$config->define( "data_etoday_descr=s" ); +$config->define( "data_vpv_hexcode=s" ); +$config->define( "data_vpv_multiply=s" ); +$config->define( "data_vpv_measure=s" ); +$config->define( "data_vpv_index=s" ); +$config->define( "data_vpv_descr=s" ); +$config->define( "data_ipv3_hexcode=s" ); +$config->define( "data_ipv3_multiply=s" ); +$config->define( "data_ipv3_measure=s" ); +$config->define( "data_ipv3_index=s" ); +$config->define( "data_ipv3_descr=s" ); +$config->define( "data_iac_hexcode=s" ); +$config->define( "data_iac_multiply=s" ); +$config->define( "data_iac_measure=s" ); +$config->define( "data_iac_index=s" ); +$config->define( "data_iac_descr=s" ); +$config->define( "data_vac_hexcode=s" ); +$config->define( "data_vac_multiply=s" ); +$config->define( "data_vac_measure=s" ); +$config->define( "data_vac_index=s" ); +$config->define( "data_vac_descr=s" ); +$config->define( "data_fac_hexcode=s" ); +$config->define( "data_fac_multiply=s" ); +$config->define( "data_fac_measure=s" ); +$config->define( "data_fac_index=s" ); +$config->define( "data_fac_descr=s" ); +$config->define( "data_pac_hexcode=s" ); +$config->define( "data_pac_multiply=s" ); +$config->define( "data_pac_measure=s" ); +$config->define( "data_pac_index=s" ); +$config->define( "data_pac_descr=s" ); +$config->define( "data_zac_hexcode=s" ); +$config->define( "data_zac_multiply=s" ); +$config->define( "data_zac_measure=s" ); +$config->define( "data_zac_index=s" ); +$config->define( "data_zac_descr=s" ); +$config->define( "data_etotalh_hexcode=s" ); +$config->define( "data_etotalh_multiply=s" ); +$config->define( "data_etotalh_measure=s" ); +$config->define( "data_etotalh_index=s" ); +$config->define( "data_etotalh_descr=s" ); +$config->define( "data_etotall_hexcode=s" ); +$config->define( "data_etotall_multiply=s" ); +$config->define( "data_etotall_measure=s" ); +$config->define( "data_etotall_index=s" ); +$config->define( "data_etotall_descr=s" ); +$config->define( "data_htotalh_hexcode=s" ); +$config->define( "data_htotalh_multiply=s" ); +$config->define( "data_htotalh_measure=s" ); +$config->define( "data_htotalh_index=s" ); +$config->define( "data_htotalh_descr=s" ); +$config->define( "data_htotall_hexcode=s" ); +$config->define( "data_htotall_multiply=s" ); +$config->define( "data_htotall_measure=s" ); +$config->define( "data_htotall_index=s" ); +$config->define( "data_htotall_descr=s" ); +$config->define( "data_mode_hexcode=s" ); +$config->define( "data_mode_multiply=s" ); +$config->define( "data_mode_measure=s" ); +$config->define( "data_mode_index=s" ); +$config->define( "data_mode_descr=s" ); +$config->define( "data_errgv_hexcode=s" ); +$config->define( "data_errgv_multiply=s" ); +$config->define( "data_errgv_measure=s" ); +$config->define( "data_errgv_index=s" ); +$config->define( "data_errgv_descr=s" ); +$config->define( "data_errgf_hexcode=s" ); +$config->define( "data_errgf_multiply=s" ); +$config->define( "data_errgf_measure=s" ); +$config->define( "data_errgf_index=s" ); +$config->define( "data_errgf_descr=s" ); +$config->define( "data_errgz_hexcode=s" ); +$config->define( "data_errgz_multiply=s" ); +$config->define( "data_errgz_measure=s" ); +$config->define( "data_errgz_index=s" ); +$config->define( "data_errgz_descr=s" ); +$config->define( "data_errtemp_hexcode=s" ); +$config->define( "data_errtemp_multiply=s" ); +$config->define( "data_errtemp_measure=s" ); +$config->define( "data_errtemp_index=s" ); +$config->define( "data_errtemp_descr=s" ); +$config->define( "data_errpv1_hexcode=s" ); +$config->define( "data_errpv1_multiply=s" ); +$config->define( "data_errpv1_measure=s" ); +$config->define( "data_errpv1_index=s" ); +$config->define( "data_errpv1_descr=s" ); +$config->define( "data_errgfc1_hexcode=s" ); +$config->define( "data_errgfc1_multiply=s" ); +$config->define( "data_errgfc1_measure=s" ); +$config->define( "data_errgfc1_index=s" ); +$config->define( "data_errgfc1_descr=s" ); +$config->define( "data_errmode_hexcode=s" ); +$config->define( "data_errmode_multiply=s" ); +$config->define( "data_errmode_measure=s" ); +$config->define( "data_errmode_index=s" ); +$config->define( "data_errmode_descr=s" ); + +# fill variables by reading configuration file +$config->file( "/opt/inverter/config.ini" ) || die "FAILED to open and/or read config file: config.ini\n"; + +if ($config->flags_debug) { + print "debug=" . $config->flags_debug ; + print ", use_pvoutput=" . $config->flags_use_pvoutput ; + print ", use_rrdtool=" . $config->flags_use_rrdtool . "\n" ; +} + +# +# inverter parameter format codes (hash of hashes) +# +%HoHparams = ( + 'VPV-START' => { + HEXCODE => $config->param_vpvstart_hexcode, + MULTIPLY => $config->param_vpvstart_multiply, + MEAS => $config->param_vpvstart_measure, + INDEX => $config->param_vpvstart_index, + VALUE => 0, + DESCR => $config->param_vpvstart_descr, + }, + 'T-START' => { + HEXCODE => $config->param_tstart_hexcode, + MULTIPLY => $config->param_tstart_multiply, + MEAS => $config->param_tstart_measure, + INDEX => $config->param_tstart_index, + VALUE => 0, + DESCR => $config->param_tstart_descr, + }, + 'VAC-MIN' => { + HEXCODE => $config->param_vacmin_hexcode, + MULTIPLY => $config->param_vacmin_multiply, + MEAS => $config->param_vacmin_measure, + INDEX => $config->param_vacmin_index, + VALUE => 0, + DESCR => $config->param_vacmin_descr, + }, + 'VAC-MAX' => { + HEXCODE => $config->param_vacmax_hexcode, + MULTIPLY => $config->param_vacmax_multiply, + MEAS => $config->param_vacmax_measure, + INDEX => $config->param_vacmax_index, + VALUE => 0, + DESCR => $config->param_vacmax_descr, + }, + 'FAC-MIN' => { + HEXCODE => $config->param_facmin_hexcode, + MULTIPLY => $config->param_facmin_multiply, + MEAS => $config->param_facmin_measure, + INDEX => $config->param_facmin_index, + VALUE => 0, + DESCR => $config->param_facmin_descr, + }, + 'FAC-MAX' => { + HEXCODE => $config->param_facmax_hexcode, + MULTIPLY => $config->param_facmax_multiply, + MEAS => $config->param_facmax_measure, + INDEX => $config->param_facmax_index, + VALUE => 0, + DESCR => $config->param_facmax_descr, + }, + 'ZAC-MAX' => { + HEXCODE => $config->param_zacmax_hexcode, + MULTIPLY => $config->param_zacmax_multiply, + MEAS => $config->param_zacmax_measure, + INDEX => $config->param_zacmax_index, + VALUE => 0, + DESCR => $config->param_zacmax_descr, + }, + 'DZAC' => { + HEXCODE => $config->param_dzac_hexcode, + MULTIPLY => $config->param_dzac_multiply, + MEAS => $config->param_dzac_measure, + INDEX => $config->param_dzac_index, + VALUE => 0, + DESCR => $config->param_dzac_descr, + }, +); + +# +# inverter data format codes (hash of hashes) +# +%HoH = ( + TEMP => { + HEXCODE => $config->data_temp_hexcode, + MULTIPLY => $config->data_temp_multiply, + MEAS => $config->data_temp_measure, + INDEX => $config->data_temp_index, + VALUE => 0, + DESCR => $config->data_temp_descr, + }, + VPV1 => { + HEXCODE => $config->data_vpv1_hexcode, + MULTIPLY => $config->data_vpv1_multiply, + MEAS => $config->data_vpv1_measure, + INDEX => $config->data_vpv1_index, + VALUE => 0, + DESCR => $config->data_vpv1_descr, + }, + VPV2 => { + HEXCODE => $config->data_vpv2_hexcode, + MULTIPLY => $config->data_vpv2_multiply, + MEAS => $config->data_vpv2_measure, + INDEX => $config->data_vpv2_index, + VALUE => 0, + DESCR => $config->data_vpv2_descr, + }, + VPV3 => { + HEXCODE => $config->data_vpv3_hexcode, + MULTIPLY => $config->data_vpv3_multiply, + MEAS => $config->data_vpv3_measure, + INDEX => $config->data_vpv3_index, + VALUE => 0, + DESCR => $config->data_vpv3_descr, + }, + IPV1 => { + HEXCODE => $config->data_ipv1_hexcode, + MULTIPLY => $config->data_ipv1_multiply, + MEAS => $config->data_ipv1_measure, + INDEX => $config->data_ipv1_index, + VALUE => 0, + DESCR => $config->data_ipv1_descr, + }, + IPV2 => { + HEXCODE => $config->data_ipv2_hexcode, + MULTIPLY => $config->data_ipv2_multiply, + MEAS => $config->data_ipv2_measure, + INDEX => $config->data_ipv2_index, + VALUE => 0, + DESCR => $config->data_ipv2_descr, + }, + IPV3 => { + HEXCODE => $config->data_ipv3_hexcode, + MULTIPLY => $config->data_ipv3_multiply, + MEAS => $config->data_ipv3_measure, + INDEX => $config->data_ipv3_index, + VALUE => 0, + DESCR => $config->data_ipv3_descr, + }, + ETODAY => { + HEXCODE => $config->data_etoday_hexcode, + MULTIPLY => $config->data_etoday_multiply, + MEAS => $config->data_etoday_measure, + INDEX => $config->data_etoday_index, + VALUE => 0, + DESCR => $config->data_etoday_descr, + }, + VPV => { + HEXCODE => $config->data_vpv_hexcode, + MULTIPLY => $config->data_vpv_multiply, + MEAS => $config->data_vpv_measure, + INDEX => $config->data_vpv_index, + VALUE => 0, + DESCR => $config->data_vpv_descr, + }, + IAC => { + HEXCODE => $config->data_iac_hexcode, + MULTIPLY => $config->data_iac_multiply, + MEAS => $config->data_iac_measure, + INDEX => $config->data_iac_index, + VALUE => 0, + DESCR => $config->data_iac_descr, + }, + VAC => { + HEXCODE => $config->data_vac_hexcode, + MULTIPLY => $config->data_vac_multiply, + MEAS => $config->data_vac_measure, + INDEX => $config->data_vac_index, + VALUE => 0, + DESCR => $config->data_vac_descr, + }, + FAC => { + HEXCODE => $config->data_fac_hexcode, + MULTIPLY => $config->data_fac_multiply, + MEAS => $config->data_fac_measure, + INDEX => $config->data_fac_index, + VALUE => 0, + DESCR => $config->data_fac_descr, + }, + PAC => { + HEXCODE => $config->data_pac_hexcode, + MULTIPLY => $config->data_pac_multiply, + MEAS => $config->data_pac_measure, + INDEX => $config->data_pac_index, + VALUE => 0, + DESCR => $config->data_pac_descr, + }, + ZAC => { + HEXCODE => $config->data_zac_hexcode, + MULTIPLY => $config->data_zac_multiply, + MEAS => $config->data_zac_measure, + INDEX => $config->data_zac_index, + VALUE => 0, + DESCR => $config->data_zac_descr, + }, + ETOTALH => { + HEXCODE => $config->data_etotalh_hexcode, + MULTIPLY => $config->data_etotalh_multiply, + MEAS => $config->data_etotalh_measure, + INDEX => $config->data_etotalh_index, + VALUE => 0, + DESCR => $config->data_etotalh_descr, + }, + ETOTALL => { + HEXCODE => $config->data_etotall_hexcode, + MULTIPLY => $config->data_etotall_multiply, + MEAS => $config->data_etotall_measure, + INDEX => $config->data_etotall_index, + VALUE => 0, + DESCR => $config->data_etotall_descr, + }, + HTOTALH => { + HEXCODE => $config->data_htotalh_hexcode, + MULTIPLY => $config->data_htotalh_multiply, + MEAS => $config->data_htotalh_measure, + INDEX => $config->data_htotalh_index, + VALUE => $config->data_htotalh_index, + DESCR => $config->data_htotalh_descr, + }, + HTOTALL => { + HEXCODE => $config->data_htotall_hexcode, + MULTIPLY => $config->data_htotall_multiply, + MEAS => $config->data_htotall_measure, + INDEX => $config->data_htotall_index, + VALUE => 0, + DESCR => $config->data_htotall_descr, + }, + MODE => { + HEXCODE => $config->data_mode_hexcode, + MULTIPLY => $config->data_mode_multiply, + MEAS => $config->data_mode_measure, + INDEX => $config->data_mode_index, + VALUE => 0, + DESCR => $config->data_mode_descr, + }, + ERR_GV => { + HEXCODE => $config->data_errgv_hexcode, + MULTIPLY => $config->data_errgv_multiply, + MEAS => $config->data_errgv_measure, + INDEX => $config->data_errgv_index, + VALUE => 0, + DESCR => $config->data_errgv_descr, + }, + ERR_GF => { + HEXCODE => $config->data_errgf_hexcode, + MULTIPLY => $config->data_errgf_multiply, + MEAS => $config->data_errgf_measure, + INDEX => $config->data_errgf_index, + VALUE => 0, + DESCR => $config->data_errgf_descr, + }, + ERR_GZ => { + HEXCODE => $config->data_errgz_hexcode, + MULTIPLY => $config->data_errgz_multiply, + MEAS => $config->data_errgz_measure, + INDEX => $config->data_errgz_index, + VALUE => 0, + DESCR => $config->data_errgz_descr, + }, + ERR_TEMP => { + HEXCODE => $config->data_errtemp_hexcode, + MULTIPLY => $config->data_errtemp_multiply, + MEAS => $config->data_errtemp_measure, + INDEX => $config->data_errtemp_index, + VALUE => 0, + DESCR => $config->data_errtemp_descr, + }, + ERR_PV1 => { + HEXCODE => $config->data_errpv1_hexcode, + MULTIPLY => $config->data_errpv1_multiply, + MEAS => $config->data_errpv1_measure, + INDEX => $config->data_errpv1_index, + VALUE => 0, + DESCR => $config->data_errpv1_descr, + }, + ERR_GFC1 => { + HEXCODE => $config->data_errgfc1_hexcode, + MULTIPLY => $config->data_errgfc1_multiply, + MEAS => $config->data_errgfc1_measure, + INDEX => $config->data_errgfc1_index, + VALUE => 0, + DESCR => $config->data_errgfc1_descr, + }, + ERR_MODE => { + HEXCODE => $config->data_errmode_hexcode, + MULTIPLY => $config->data_errmode_multiply, + MEAS => $config->data_errmode_measure, + INDEX => $config->data_errmode_index, + VALUE => 0, + DESCR => $config->data_errmode_descr, + }, + UNK10 => { + HEXCODE => "7f", + MULTIPLY => 1, + MEAS => "", + INDEX => -1, + VALUE => 0, + DESCR => "Unknown", + }, + # ---------------- UNKNOWN ---------------------- + UNK11 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "", + INDEX => -1, + VALUE => 0, + DESCR => "Unknown", + }, + UNK12 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "", + INDEX => -1, + VALUE => 0, + DESCR => "Unknown", + }, + UNK13 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "", + INDEX => -1, + VALUE => 0, + DESCR => "Unknown", + }, + UNK14 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "", + INDEX => -1, + VALUE => 0, + DESCR => "Unknown", + }, + IDC1 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "A", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + IDC2 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "A", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + IDC3 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "A", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + IAC1 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "A", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + VAC1 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "V", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + FAC1 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.01, + MEAS => "Hz", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + PDC1 => { + HEXCODE => "zz", # unknown + MULTIPLY => 1, + MEAS => "W", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + IAC2 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "A", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + VAC2 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "V", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + FAC2 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.01, + MEAS => "Hz", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + PDC2 => { + HEXCODE => "zz", # unknown + MULTIPLY => 1, + MEAS => "W", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + IAC3 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "A", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + VAC3 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.1, + MEAS => "V", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + FAC3 => { + HEXCODE => "zz", # unknown + MULTIPLY => 0.01, + MEAS => "Hz", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, + PDC3 => { + HEXCODE => "zz", # unknown + MULTIPLY => 1, + MEAS => "W", + INDEX => -1, + VALUE => 0, + DESCR => "", + }, +# ---------------- UNKNOWN ---------------------- +# PVP1 "W", "PV 1 voltage" +# PVP2 "W", "PV 2 voltage" +# PVP3 "W", "PV 3 voltage" +# IAC1 "A", "PV 1 Grid current" +# IAC2 "A", "PV 2 Grid current" +# IAC3 "A", "PV 3 Grid current" +# VAC1 "V", "PV 1 Grid voltage" +# VAC2 "V", "PV 2 Grid voltage" +# VAC3 "V", "PV 3 Grid voltage" +# TEMP1 "deg C", "External temperature sensor 1" +# TEMP2 "deg C", "External temperature sensor 2" +# RAD1 "W/m2", "Irradiance sensor 1" +# RAD2 "W/m2", "Irradiance sensor 2" +); + + +# +# inverter version information (hash) +# +%HASH = ( + CAPACITY => "", + FIRMWARE => "", + MODEL => "", + MANUF => "", + SERIAL => "", + OTHER => "", +); + +####################################################################### + + + +####################################################################### +# +# Open serial/usb/bluetooth port depending on Operating System +# +sub initialiseSerialPort() { + + print "Initialise Serial Port... "; + if ($^O eq 'MSWin32') { # Win32 (ActivePerl) + eval "use Win32::SerialPort"; + $port = $ARGV[0] || $config->serial_port_win; + + # Open the serial port + $serial = Win32::SerialPort->new ($port, 0, '') || die "Can\'t open $port: $!"; + } + else { # Unix/Linux/other + eval "use Device::SerialPort"; + $port = $ARGV[0] || $config->serial_port_oth; + + # Open the serial port + $serial = Device::SerialPort->new ($port, 0, '') || die "Can\'t open $port: $!"; + } + print "port = $port\n"; + + # + # Open the serial port + # + $serial->error_msg(1); # use built-in hardware error messages like "Framing Error" + $serial->user_msg(1); # use built-in function messages like "Waiting for ..." + #$serial->baudrate($config->serial_baud) || die 'fail setting baudrate, try -b option'; + $serial->{'_L_BAUD'}{$config->serial_baud} = $config->serial_baud; + $serial->parity($config->serial_parity) || die 'fail setting parity'; + $serial->databits($config->serial_databits) || die 'fail setting databits'; + $serial->stopbits($config->serial_stopbits) || die 'fail setting stopbits'; + $serial->handshake($config->serial_handshake) || die 'fail setting handshake'; + $serial->datatype($config->serial_datatype) || die 'fail setting datatype'; + $serial->write_settings || die 'could not write settings'; + $serial->read_char_time(0); # don't wait for each character + $serial->read_const_time(1000); # 1 second per unfulfilled "read" call +} + +####################################################################### +# +# Close serial/usb/bluetooth port +# +sub closeSerialPort() { + $serial->close || warn "*** WARNING Close port failed, connection may have died.\n"; + undef $serial; +} + +####################################################################### +# +# Trim function to remove whitespace from start and end of a string +# +sub trim($) { + my $string = shift; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; +} + +####################################################################### +# +# Turn raw data from the inverter into a hex string +# +sub convRawToHex() { + my $pstring = shift; + my $hstring = unpack ("H*",$pstring); + return $hstring; +} + +####################################################################### +# +# Turn hex string into raw data for transmission to the inverter +# +sub convHexToRaw() { + my $hstring = shift; + my $pstring = pack (qq{H*},qq{$hstring}); + return $pstring; +} + +####################################################################### +# +# Return Date & Time in format: "DD/MM/YYYY HH:MM:SS" +# +sub getDateTime { + local($time_since_epoch) = @_; + local($sec,$min,$hour,$dayOfMth,$monthOffset,$yearOffset,$dayOfWk,$dayOfYr,$isDST) = localtime($time_since_epoch); + local($year) = 1900 + $yearOffset; + local($month) = 1 + $monthOffset; + return sprintf("%.2d/%.2d/%d %.2d:%.2d:%.2d", $dayOfMth, $month, $year, $hour, $min, $sec); +} + +####################################################################### +# +# Return Date in format: "YYYYMMDD" +# +sub getDate_YYYYMMDD { + local($time_since_epoch) = @_; + local($sec,$min,$hour,$dayOfMth,$monthOffset,$yearOffset,$dayOfWk,$dayOfYr,$isDST) = localtime($time_since_epoch); + local($year) = 1900 + $yearOffset; + local($month) = 1 + $monthOffset; + return sprintf("%d%.2d%.2d", $year, $month, $dayOfMth); +} + +####################################################################### +# +# Return Date in format: "YYYYMM" +# +sub getDate_YYYYMM { + local($time_since_epoch) = @_; + local($sec,$min,$hour,$dayOfMth,$monthOffset,$yearOffset,$dayOfWk,$dayOfYr,$isDST) = localtime($time_since_epoch); + local($year) = 1900 + $yearOffset; + local($month) = 1 + $monthOffset; + return sprintf("%d%.2d", $year, $month); +} + +####################################################################### +# +# Return Time in format: "HH:MM" +# +sub getTime_HHMM { + local($time_since_epoch) = @_; + local($sec,$min,$hour,$dayOfMth,$monthOffset,$yearOffset,$dayOfWk,$dayOfYr,$isDST) = localtime($time_since_epoch); + return sprintf("%.2d:%.2d", $hour, $min); +} + +####################################################################### +# +# Return LogFile Name: [path]/inverter_[serial#]_[yyyymmdd].csv +# +sub getLogFileName { + my $logfile = ""; + + # + # set path + # + if ($^O eq 'MSWin32') { # Win32 (ActivePerl) + $logfile = $config->paths_windows; + } + else { # Unix/Linux/other + $logfile = $config->paths_other; + } + + # + # append filename + # + $logfile .= "/inverter_" . $HASH{SERIAL} . "_" . getDate_YYYYMMDD(time) . ".csv"; + return $logfile; +} + +####################################################################### +# +# Return ErrFile Name: [path]/inverter_err_[serial#]_[yyyymm].log +# +sub getErrFileName { + my $errfile = ""; + + # + # set path + # + if ($^O eq 'MSWin32') { # Win32 (ActivePerl) + $errfile = $config->paths_windows; + } + else { # Unix/Linux/other + $errfile = $config->paths_other; + } + + # + # append filename + # + $errfile .= "/inverter_err_" . $HASH{SERIAL} . "_" . getDate_YYYYMM(time) . ".log"; + return $errfile; +} + +####################################################################### +# +# Return RRD File Name: [path]/inverter_[serial#].rrd +# +sub getRrdFileName(@) { + my $rrdfile = ""; + my $suffix = shift; + + # + # set path + # + if ($^O eq 'MSWin32') { # Win32 (ActivePerl) + $rrdfile = $config->paths_windows; + } + else { # Unix/Linux/other + $rrdfile = $config->paths_other; + } + + # + # append filename + # + $rrdfile .= "/inverter_" . $HASH{SERIAL} . (defined $suffix ? ("_" . $suffix) : "") . ".rrd"; + return $rrdfile; +} + +####################################################################### +# +# Write to the port (the inverter is on) & warn if it fails +# +sub writeToPort() { + my $writeStr = shift; + my $countOut = $serial->write($writeStr); + warn "*** write failed ( $countOut ) ***\n" unless ($countOut); + warn "*** write incomplete ( $countOut ) ***\n" if ( $countOut != length($writeStr) ); + return $countOut; +} + +####################################################################### +# +# Write to serial port then read result from buffer +# until expected read response received or timeout exceeded +# +sub writeReadBuffer() { + my $writeString = shift; + my $readPattern = shift; + my $chars=0; + my $buffer=""; + my $buffer2="x"; + my $timeout = $config->secs_timeout; + my $reinit = 0; + + if ($config->flags_debug) { + print "writeReadBuffer: writeString=$writeString\n"; + print "writeReadBuffer: readPattern=$readPattern\n"; + } + + # + # Write to (Serial) Port + # + &writeToPort(&convHexToRaw($writeString)); + + # sleep for dodgy cables (eg beginner soldering or usb converters) + # sleep 2; + + # + # Read response from buffer until either expected response received or timeout reached + # + while ( $timeout > 0 ) { + + my ($countIn,$stringIn) = $serial->read(255); # will read _up to_ 255 chars + if ($countIn > 0) { + + if ($config->flags_debug) { + print "writeReadBuffer: saw..." . &convRawToHex($stringIn) . "\n"; + } + + $chars += $countIn; + $buffer .= $stringIn; + $hexBuffer = &convRawToHex($buffer); + + # + # Check to see if expected read response is in the $buffer, say "last" if we find it + # + if ( $hexBuffer =~ /$readPattern/ ) { + ($buffer2) = ( $hexBuffer =~ /($readPattern.*$)/ ); + if ($config->flags_debug) { + print "writeReadBuffer: found=$buffer2\n"; + } + last; + } + + } + else { + $timeout--; + } + + # + # check if timeout was reached + # + if ($timeout==0) { + print "Re-Init...\n"; + &closeSerialPort; + &initialiseSerialPort; + + $timeout = $config->secs_timeout; + $reinit++; + + print "Waited " . $config->secs_timeout . " seconds and never saw $readPattern\n"; + #die "Waited " . $config->secs_timeout . " seconds and never saw $readPattern\n"; + } + + # + # check if reinitialise port timeout was reached, if so die + # + if ($config->secs_reinit >= 0 && $reinit > $config->secs_reinit) { + &closeSerialPort; + die "REINIT MAX exceeded, aborted.\n"; + } + + } # end of while loop + + print "Recv <- $buffer2 \n"; + return $buffer2; +} + +####################################################################### +# +# Prepare the REQUEST_CONF_SERIAL packet +# grab serial# from input data, use it to create the response packet, incl checksum in format: +# RESPONSE_CONF_SERIAL_1 + $hexSerial + RESPONSE_CONF_SERIAL_2 + $hexReqChkSum +# +sub calcReqConfSerial() { + my $hexStr = shift; + my $hexSerial = substr($hexStr, $config->hex_confserial_index, $config->hex_serial_length); + my $hexReqRegex = $config->sendhex_conf_serial1 . $hexSerial . $config->sendhex_conf_serial2; + + # + # calculate hex checksum for the request + # + my $rawReq = &convHexToRaw( $hexReqRegex ); + my $rawReqChkSum = unpack ( "%C*", $rawReq ); + my $hexReqChkSum = sprintf ( "%04x ", $rawReqChkSum ); + + # + # join it all together to create the request + # + my $reqConfSerial = $hexReqRegex . $hexReqChkSum; + return($reqConfSerial); +} + +####################################################################### +# +# Initialise Inverter - handshake is done here +# +sub initialiseInverter() { + # + # step 1: Start initial handshake with inverter (reset network) + # + my $rawRequest = &convHexToRaw($config->sendhex_initialise); + print "Send -> req init inverter: " . $config->sendhex_initialise . "\n"; + &writeToPort($rawRequest); + + # + # step 2: request the serial number (query network) + # + print "Send -> req serial: " . $config->sendhex_serial . "\n"; + my $hexResponse = &writeReadBuffer($config->sendhex_serial,$config->recvhex_serial); + + # + # step 3: confirm the serial number + # + my $confSerialRequest = &calcReqConfSerial($hexResponse); + print "Send -> confirm serial: $confSerialRequest \n"; + my $hexResponse2 = &writeReadBuffer($confSerialRequest,$config->recvhex_conf_serial); +} + +####################################################################### +# +# Parse Version/Firmware Data - store in %HASH +# +sub parseVersData() { + print "* Version info:\n"; + my $hexData = shift; + my $asciiVers = ( pack ("H*", $hexData) ); + my $hexLength = length($hexData); + print "asciiVers=$asciiVers\n"; + + # + # convert portions of hex to ascii + # + if ( $config->hex_capacity_length > 0 && $config->hex_capacity_index + $config->hex_capacity_length < $hexLength ) { + $HASH{CAPACITY} = &trim( pack ("H*", substr($hexData, $config->hex_capacity_index, $config->hex_capacity_length)) ); + } + if ( $config->hex_firmware_length > 0 && $config->hex_firmware_index + $config->hex_firmware_length < $hexLength ) { + $HASH{FIRMWARE} = &trim( pack ("H*", substr($hexData, $config->hex_firmware_index, $config->hex_firmware_length)) ); + } + if ( $config->hex_model_length > 0 && $config->hex_model_index + $config->hex_model_length < $hexLength ) { + $HASH{MODEL} = &trim( pack ("H*", substr($hexData, $config->hex_model_index, $config->hex_model_length)) ); + } + if ( $config->hex_manuf_length > 0 && $config->hex_manuf_index + $config->hex_manuf_length < $hexLength ) { + $HASH{MANUF} = &trim( pack ("H*", substr($hexData, $config->hex_manuf_index, $config->hex_manuf_length)) ); + } + if ( $config->hex_serial_length > 0 && $config->hex_serial_index + $config->hex_serial_length < $hexLength ) { + $HASH{SERIAL} = &trim( pack ("H*", substr($hexData, $config->hex_serial_index, $config->hex_serial_length)) ); + } + if ( $config->hex_other_length > 0 && $config->hex_other_index + $config->hex_other_length < $hexLength ) { + $HASH{OTHER} = &trim( pack ("H*", substr($hexData, $config->hex_other_index, $config->hex_other_length)) ); + } + + # + # display version information (in sorted order) + # + for $key ( sort( keys ( %HASH ) ) ) { + printf "%-8s : %s\n", $key, $HASH{$key}; + } +} + +####################################################################### +# +# Parse Parameter Format +# based on $HoHparams{HEXCODE} & store index/position in $HoHparams{INDEX} +# +sub parseParamFmt() { + print "* Parameter Format:\n"; + my $hexData = shift; + if ($hexData eq "") { + print "n/a\n"; + return; + } + + # split hex string into an array of 2char hex strings + @d = ( $hexData =~ m/..?/g ); + + my $dataOffset = $config->hex_data_to_follow_index + 1; + my $dataToFollow = hex($d[$config->hex_data_to_follow_index]); + print "dataToFollow = hex($d[$config->hex_data_to_follow_index]) = $dataToFollow\n"; + + my $i = 0; + for $x ($dataOffset .. $dataOffset + $dataToFollow - 1) { + printf "%2s = %2s", $x, $d[$x] ; + for $key ( keys ( %HoHparams ) ) { + if ( $HoHparams{$key}{HEXCODE} eq $d[$x]) { + $HoHparams{$key}{INDEX} = $i; + printf " = %-10s = %2s = %s", $key, $HoHparams{$key}{INDEX}, $HoHparams{$key}{DESCR} ; + } + } + print "\n"; + $i++; + } +} + +####################################################################### +# +# Parse Parameters +# based on $HoHparams{INDEX} & store value in $HoHparams{VALUE} +# +sub parseParam() { + print "* Parameters:\n"; + my $hexData = shift; + my $dataToFollow = hex( substr( $hexData, $config->hex_data_to_follow_index*2, 2 ) ); + my $startIndex = ( $config->hex_data_to_follow_index + 1 )*2; + my $numOfChars = $dataToFollow * 2; + my $data = substr( $hexData, $startIndex, $numOfChars ); + + # split hex string into an array of 4char hex strings + @d = ( $data =~ m/..?.?.?/g ); + + # display data values - sort %HoH by INDEX + for $key ( sort {$HoHparams{$a}{INDEX} <=> $HoHparams{$b}{INDEX} } keys ( %HoHparams ) ) { + if ( $HoHparams{$key}{INDEX} ne "-1" ) { + $HoHparams{$key}{VALUE} = hex( $d[$HoHparams{$key}{INDEX}] ) * $HoHparams{$key}{MULTIPLY}; + printf "%-10s: %8s %-5s = %s \n", $key, $HoHparams{$key}{VALUE}, $HoHparams{$key}{MEAS}, $HoHparams{$key}{DESCR} ; + } + } +} + +####################################################################### +# +# Set Data Format Manually - if not sure of REQUEST_DATAFMT response break-up yet +# eg: CMS 10000 +# +sub setDataFmt2() { + print "* Data Format2:\n"; + $HoH{TEMP}{INDEX} = 0; + $HoH{VPV}{INDEX} = 1; + $HoH{VPV2}{INDEX} = 2; + $HoH{VPV3}{INDEX} = 3; + $HoH{IDC1}{INDEX} = 4; + $HoH{IDC2}{INDEX} = 5; + $HoH{IDC3}{INDEX} = 6; + $HoH{ETOTALH}{INDEX} = 7; + $HoH{ETOTALL}{INDEX} = 8; + $HoH{HTOTALH}{INDEX} = 9; + $HoH{HTOTALL}{INDEX} = 10; + $HoH{PAC}{INDEX} = 11; + $HoH{MODE}{INDEX} = 12; + $HoH{ETODAY}{INDEX} = 13; + $HoH{ERR_GV}{INDEX} = 14; + $HoH{ERR_GF}{INDEX} = 15; + $HoH{ERR_GZ}{INDEX} = 16; + $HoH{ERR_TEMP}{INDEX} = 17; + $HoH{ERR_PV1}{INDEX} = 18; + $HoH{ERR_GFC1}{INDEX} = 19; + $HoH{ERR_MODE}{INDEX} = 20; + $HoH{IAC1}{INDEX} = 21; + $HoH{VAC1}{INDEX} = 22; + $HoH{FAC1}{INDEX} = 23; + $HoH{PDC1}{INDEX} = 24; + $HoH{UNK10}{INDEX} = 25; + $HoH{UNK11}{INDEX} = 26; + $HoH{UNK12}{INDEX} = 27; + $HoH{UNK13}{INDEX} = 28; + $HoH{IAC2}{INDEX} = 29; + $HoH{VAC2}{INDEX} = 30; + $HoH{FAC2}{INDEX} = 31; + $HoH{PDC2}{INDEX} = 32; + $HoH{UNK14}{INDEX} = 33; + + # + # display data format indexes - sort %HoH by INDEX + # + for $key ( sort {$HoH{$a}{INDEX} <=> $HoH{$b}{INDEX} } keys ( %HoH ) ) { + if ( $HoH{$key}{INDEX} ne "-1" ) { + printf "%-8s = %2s = %s\n", $key, $HoH{$key}{INDEX}, $HoH{$key}{DESCR} ; + } + } +} + +####################################################################### +# +# Parse Data Format +# based on $HoH{HEXCODE} & store index/position in $HoH{INDEX} +# +sub parseDataFmt() { + print "* Data Format:\n"; + my $hexData = shift; + if ($hexData eq "") { + print "n/a\n"; + return; + } + + # split hex string into an array of 2char hex strings + @d = ( $hexData =~ m/..?/g ); + + my $dataOffset = $config->hex_data_to_follow_index + 1; + my $dataToFollow = hex($d[$config->hex_data_to_follow_index]); + print "dataToFollow = hex($d[$config->hex_data_to_follow_index]) = $dataToFollow\n"; + + if ($HASH{MODEL} eq "CMS 10000") { + &setDataFmt2; # temp: until get hold of CMS 10000 protocol & figure out hexcodes & keys + return; + } + + my $i = 0; + for $x ($dataOffset .. $dataOffset + $dataToFollow - 1) { + printf "%2s = %2s", $x, $d[$x] ; + for $key ( keys ( %HoH ) ) { + if ( $HoH{$key}{HEXCODE} eq $d[$x]) { + $HoH{$key}{INDEX} = $i; + printf " = %-8s = %2s = %s", $key, $HoH{$key}{INDEX}, $HoH{$key}{DESCR} ; + } + } + print "\n"; + $i++; + } +} + +####################################################################### +# +# Parse Data +# based on $HoH{INDEX} & store value in $HoH{VALUE} +# +sub parseData() { + print "* Data:\n"; + my $hexData = shift; + my $dataToFollow = hex( substr( $hexData, $config->hex_data_to_follow_index*2, 2 ) ); + my $startIndex = ( $config->hex_data_to_follow_index + 1 )*2; + my $numOfChars = $dataToFollow * 2; + my $data = substr( $hexData, $startIndex, $numOfChars ); + + # split hex string into an array of 4char hex strings + @d = ( $data =~ m/..?.?.?/g ); + + # display data values - sort %HoH by INDEX + for $key ( sort {$HoH{$a}{INDEX} <=> $HoH{$b}{INDEX} } keys ( %HoH ) ) { + if ( $HoH{$key}{INDEX} ne "-1" ) { + $HoH{$key}{VALUE} = hex( $d[$HoH{$key}{INDEX}] ) * $HoH{$key}{MULTIPLY}; + printf "%-8s: %8s %-5s = %s \n", $key, $HoH{$key}{VALUE}, $HoH{$key}{MEAS}, $HoH{$key}{DESCR} ; + } + } + + # + # Sometimes CMS2000 inverter keeps yesterdays ETODAY for first 30mins or more each morning + # hence some logic to use ZERO if hour < 9am and ETODAY > 1.0 kWh + # + if ($HASH{MODEL} eq "CMS 2000") { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); + if ($hour < 9 && $HoH{ETODAY}{VALUE} > 1.0) { + + # + # open errfile in 'append' mode + # + my $errfile = getErrFileName(); + if ( open(ERRFILE, ">>$errfile") ) { + my $dateTimeStr = getDateTime(time); + my $errLine = "$dateTimeStr - ETODAY=$HoH{ETODAY}{VALUE}, will use 0 instead, as not reset since yesterday."; + print "ERROR logged to: $errfile\n"; + print ERRFILE "$errLine\n"; + close (ERRFILE); + } + $HoH{ETODAY}{VALUE} = 0; + } + } +} + +####################################################################### +# +# Write certain inverter data to a csv file +# +sub writeToFile() { + my $logfile = getLogFileName(); + my $rrdfile = getRrdFileName(); + + # + # open logfile in 'append' mode + # + if ( open(LOGFILE, ">>$logfile") ) { + print "Logging to: $logfile\n"; + + # + # add file header to logfile (if file exists & is empty) + # + if ( -z $logfile ) { +# print LOGFILE "DATE,TIMESTAMP,TEMP,VPV,IAC,VAC,FAC,PAC,ETOTAL,HTOTAL,MODE,ETODAY\n"; + print LOGFILE "DATE,TIMESTAMP,TEMP,VPV,IAC,VAC,FAC,PAC,ETOTAL,HTOTAL,MODE,ETODAY" . + ",ETOTALH,HTOTALH,ERR_GV,ERR_GF,ERR_GZ,ERR_TEMP,ERR_PV1,ERR_GFC1,ERR_MODE,UNK10\n"; + } + + my $etotal = ($HoH{ETOTALL}{VALUE} + $HoH{ETOTALH}{VALUE}); + my $htotal = ($HoH{HTOTALL}{VALUE} + $HoH{HTOTALH}{VALUE}); + if ($config->flags_debug) { + print "etotal=$etotal htotal=$htotal\n"; + } + + # + # write data to logfile & close it + # + my $unixTimeStamp = time; # secs since epoch + my $dateTimeStr = getDateTime($unixTimeStamp); + my $csvLine = "$dateTimeStr," . + "$unixTimeStamp," . + "$HoH{TEMP}{VALUE}," . + "$HoH{VPV}{VALUE}," . + "$HoH{IAC}{VALUE}," . + "$HoH{VAC}{VALUE}," . + "$HoH{FAC}{VALUE}," . + "$HoH{PAC}{VALUE}," . + "$etotal," . + "$htotal," . + "$HoH{MODE}{VALUE}," . + "$HoH{ETODAY}{VALUE}," . + "$HoH{ETOTALH}{VALUE}," . + "$HoH{HTOTALH}{VALUE}," . + "$HoH{ERR_GV}{VALUE}," . + "$HoH{ERR_GF}{VALUE}," . + "$HoH{ERR_GZ}{VALUE}," . + "$HoH{ERR_TEMP}{VALUE}," . + "$HoH{ERR_PV1}{VALUE}," . + "$HoH{ERR_GFC1}{VALUE}," . + "$HoH{ERR_MODE}{VALUE}," . + "$HoH{UNK10}{VALUE}"; + print LOGFILE "$csvLine\n"; + close (LOGFILE); + + # + # write data to rrdtool for graphing + # + if ($config->flags_use_rrdtool) { + + my $rrdexe = $config->scripts_rrdtool_exe_oth; # Unix/Linux/other + if ($^O eq 'MSWin32') { # Win32 (ActivePerl) + $rrdexe = $config->scripts_rrdtool_exe_win; + } + + # + # create rrd file - if it doesn't exist + # + if ( ! -e $rrdfile ) { + print "Ran: " . $config->scripts_create_rrd . " \"$rrdfile\" \"$rrdexe\"\n"; + system ($config->scripts_create_rrd . " \"$rrdfile\" \"$rrdexe\"" ); + } + + # + # update rrd file + # + my $rrdLine = "$unixTimeStamp:" . + "$HoH{TEMP}{VALUE}:" . + "$HoH{VPV}{VALUE}:" . + "$HoH{IAC}{VALUE}:" . + "$HoH{VAC}{VALUE}:" . + "$HoH{FAC}{VALUE}:" . + "$HoH{PAC}{VALUE}:" . + "$etotal:" . + "$HoH{ETODAY}{VALUE}"; + print "Ran: $rrdexe update $rrdfile $rrdLine\n"; + system( "$rrdexe update $rrdfile $rrdLine" ); + + $rrdfile = getRrdFileName("today"); + if (-e $rrdfile) { + $rrdLine = "$unixTimeStamp:" . + "$HoH{PAC}{VALUE}:" . + "$HoH{ETODAY}{VALUE}"; + print "Ran: $rrdexe update $rrdfile $rrdLine\n"; + system( "$rrdexe update $rrdfile $rrdLine" ); + } + } + + } + else { + warn "*** WARNING Could not open logfile: $logfile\n"; + } +} + +####################################################################### +# +# MAIN +# +print "Starting up at " . getDateTime(time) . " running on $^O ...\n"; +my $lastPollTime = 0; +my $nextPollTime = 0; +my $lastPvoutputTime = 0; +my $nextPvoutputTime = 0; + +# +# Initialise Serial Port & Inverter +# +&initialiseSerialPort; +&initialiseInverter; + +# +# Request Inverter Version Information +# +print "Send -> req version: " . $config->sendhex_version . "\n"; +$hexResponse = &writeReadBuffer($config->sendhex_version,$config->recvhex_version); +&parseVersData($hexResponse); + +# +# Request Inverter Parameter Format Information +# +if ( $config->sendhex_paramfmt ne " " ) { + print "Send -> req param format: " . $config->sendhex_paramfmt . "\n"; + $hexResponse = &writeReadBuffer($config->sendhex_paramfmt,$config->recvhex_paramfmt); + &parseParamFmt($hexResponse); +} + +# +# Request Inverter Parameter Information +# +print "Send -> req params: " . $config->sendhex_param . "\n"; +$hexResponse = &writeReadBuffer($config->sendhex_param,$config->recvhex_param); +&parseParam($hexResponse); + +# +# Request Inverter Data Format Information +# +if ( $config->sendhex_datafmt ne " " ) { + print "Send -> req data format: " . $config->sendhex_datafmt . "\n"; + $hexResponse = &writeReadBuffer($config->sendhex_datafmt,$config->recvhex_datafmt); + &parseDataFmt($hexResponse); +} + +# +# The main loop starts here +# +while (1) { + + # + # Request Inverter Data (regular data poll) + # + print "Send -> req data as at " . getDateTime(time) . " : " . $config->sendhex_data . "\n"; + $lastPollTime = time; + $nextPollTime = $lastPollTime + $config->secs_datapoll_freq; + $hexResponse = &writeReadBuffer($config->sendhex_data,$config->recvhex_data); + &parseData($hexResponse); + &writeToFile(); + + # + # Export data to http://pvoutput.org + # + if ($config->flags_use_pvoutput) { + $nextPvoutputTime = $lastPvoutputTime + $config->secs_pvoutput_freq; + if ( $lastPvoutputTime == 0 || $nextPvoutputTime <= time ) { + #my $date = getDate_YYYYMMDD(time); + #my $time = getTime_HHMM(time); + #print "PVOUTPUT as at " . getDateTime(time) . " ...\n"; + #print " ran: " . $config->scripts_pvoutput . " " . ($HoH{ETODAY}{VALUE} * 1000) . " $HoH{PAC}{VALUE} $HoH{VAC}{VALUE} $date $time $HASH{SERIAL}\n"; + #system ($config->scripts_pvoutput . " " . ($HoH{ETODAY}{VALUE} * 1000) . " $HoH{PAC}{VALUE} $HoH{VAC}{VALUE} $date $time $HASH{SERIAL}" ); + print " ran: " . $config->scripts_pvoutput_php . " " . ($HoH{ETODAY}{VALUE} * 1000) . " $HoH{PAC}{VALUE} $HoH{VAC}{VALUE} $HASH{SERIAL}\n"; + system ($config->scripts_pvoutput_php . " " . ($HoH{ETODAY}{VALUE} * 1000) . " $HoH{PAC}{VALUE} $HoH{VAC}{VALUE} $HASH{SERIAL} &"); + $lastPvoutputTime = time; + } + } + + # + # Sleep until next time data needs to be polled (per DATAPOLL_FREQ_SECS constant) + # + $seconds = $nextPollTime - time; + if ( $seconds > 0 ) { + print "Sleeping: $seconds secs as at " . getDateTime(time) . " ...\n"; + sleep $seconds; + } + +} + +####################################################################### diff --git a/inverter/static/twilight_2018.csv b/inverter/static/twilight_2018.csv new file mode 100755 index 0000000..8b943c6 --- /dev/null +++ b/inverter/static/twilight_2018.csv @@ -0,0 +1,367 @@ +day,rise,noon,set +1,08:52:00,12:44:45,16:37:42 +2,08:51:51,12:45:13,16:38:48 +3,08:51:38,12:45:41,16:39:57 +4,08:51:22,12:46:08,16:41:09 +5,08:51:02,12:46:35,16:42:24 +6,08:50:39,12:47:01,16:43:41 +7,08:50:13,12:47:27,16:45:00 +8,08:49:43,12:47:53,16:46:22 +9,08:49:10,12:48:18,16:47:46 +10,08:48:33,12:48:42,16:49:13 +11,08:47:54,12:49:06,16:50:41 +12,08:47:11,12:49:30,16:52:12 +13,08:46:25,12:49:52,16:53:44 +14,08:45:36,12:50:14,16:55:18 +15,08:44:43,12:50:36,16:56:54 +16,08:43:48,12:50:57,16:58:32 +17,08:42:50,12:51:17,17:00:11 +18,08:41:49,12:51:36,17:01:52 +19,08:40:45,12:51:55,17:03:34 +20,08:39:39,12:52:13,17:05:17 +21,08:38:30,12:52:30,17:07:02 +22,08:37:18,12:52:46,17:08:47 +23,08:36:03,12:53:02,17:10:34 +24,08:34:46,12:53:17,17:12:22 +25,08:33:26,12:53:31,17:14:10 +26,08:32:04,12:53:44,17:16:00 +27,08:30:40,12:53:57,17:17:50 +28,08:29:13,12:54:08,17:19:41 +29,08:27:44,12:54:19,17:21:32 +30,08:26:13,12:54:29,17:23:24 +31,08:24:40,12:54:39,17:25:17 +32,08:23:04,12:54:47,17:27:09 +33,08:21:27,12:54:55,17:29:03 +34,08:19:47,12:55:01,17:30:56 +35,08:18:06,12:55:07,17:32:50 +36,08:16:23,12:55:12,17:34:44 +37,08:14:38,12:55:17,17:36:38 +38,08:12:51,12:55:20,17:38:33 +39,08:11:03,12:55:23,17:40:27 +40,08:09:13,12:55:25,17:42:22 +41,08:07:21,12:55:26,17:44:16 +42,08:05:28,12:55:26,17:46:11 +43,08:03:33,12:55:26,17:48:05 +44,08:01:37,12:55:25,17:49:59 +45,07:59:40,12:55:23,17:51:53 +46,07:57:41,12:55:20,17:53:47 +47,07:55:41,12:55:17,17:55:41 +48,07:53:39,12:55:12,17:57:35 +49,07:51:36,12:55:08,17:59:29 +50,07:49:33,12:55:02,18:01:22 +51,07:47:28,12:54:56,18:03:15 +52,07:45:22,12:54:49,18:05:08 +53,07:43:14,12:54:41,18:07:00 +54,07:41:06,12:54:33,18:08:52 +55,07:38:57,12:54:25,18:10:44 +56,07:36:47,12:54:15,18:12:36 +57,07:34:37,12:54:05,18:14:28 +58,07:32:25,12:53:55,18:16:19 +59,07:30:12,12:53:44,18:18:10 +60,07:27:59,12:53:32,18:20:00 +61,07:25:45,12:53:20,18:21:50 +62,07:23:31,12:53:08,18:23:40 +63,07:21:15,12:52:55,18:25:30 +64,07:18:59,12:52:41,18:27:20 +65,07:16:43,12:52:27,18:29:09 +66,07:14:26,12:52:13,18:30:58 +67,07:12:08,12:51:58,18:32:46 +68,07:09:50,12:51:43,18:34:35 +69,07:07:32,12:51:28,18:36:23 +70,07:05:13,12:51:12,18:38:11 +71,07:02:54,12:50:56,18:39:58 +72,07:00:34,12:50:40,18:41:46 +73,06:58:14,12:50:23,18:43:33 +74,06:55:54,12:50:07,18:45:20 +75,06:53:33,12:49:50,18:47:07 +76,06:51:13,12:49:32,18:48:53 +77,06:48:52,12:49:15,18:50:40 +78,06:46:31,12:48:57,18:52:26 +79,06:44:09,12:48:40,18:54:12 +80,06:41:48,12:48:22,18:55:58 +81,06:39:27,12:48:04,18:57:44 +82,06:37:05,12:47:46,18:59:30 +83,06:34:44,12:47:28,19:01:15 +84,06:32:23,12:47:10,19:03:01 +85,06:30:01,12:46:52,19:04:46 +86,06:27:40,12:46:34,19:06:32 +87,06:25:19,12:46:15,19:08:17 +88,06:22:58,12:45:57,19:10:02 +89,06:20:37,12:45:39,19:11:47 +90,07:18:16,13:45:21,20:13:32 +91,07:15:56,13:45:04,20:15:18 +92,07:13:36,13:44:46,20:17:03 +93,07:11:16,13:44:28,20:18:48 +94,07:08:56,13:44:11,20:20:33 +95,07:06:37,13:43:54,20:22:18 +96,07:04:18,13:43:37,20:24:03 +97,07:02:00,13:43:20,20:25:47 +98,06:59:42,13:43:03,20:27:32 +99,06:57:24,13:42:47,20:29:17 +100,06:55:07,13:42:31,20:31:02 +101,06:52:51,13:42:15,20:32:47 +102,06:50:35,13:41:59,20:34:32 +103,06:48:20,13:41:44,20:36:17 +104,06:46:05,13:41:29,20:38:02 +105,06:43:51,13:41:14,20:39:47 +106,06:41:38,13:41:00,20:41:32 +107,06:39:25,13:40:46,20:43:17 +108,06:37:13,13:40:33,20:45:02 +109,06:35:03,13:40:20,20:46:47 +110,06:32:52,13:40:07,20:48:31 +111,06:30:43,13:39:55,20:50:16 +112,06:28:35,13:39:43,20:52:01 +113,06:26:28,13:39:32,20:53:45 +114,06:24:22,13:39:21,20:55:30 +115,06:22:16,13:39:10,20:57:14 +116,06:20:12,13:39:01,20:58:58 +117,06:18:09,13:38:51,21:00:42 +118,06:16:07,13:38:42,21:02:26 +119,06:14:07,13:38:34,21:04:09 +120,06:12:08,13:38:26,21:05:53 +121,06:10:10,13:38:18,21:07:36 +122,06:08:13,13:38:12,21:09:18 +123,06:06:18,13:38:05,21:11:01 +124,06:04:24,13:38:00,21:12:43 +125,06:02:32,13:37:54,21:14:24 +126,06:00:41,13:37:50,21:16:05 +127,05:58:52,13:37:46,21:17:46 +128,05:57:04,13:37:42,21:19:26 +129,05:55:18,13:37:39,21:21:05 +130,05:53:34,13:37:37,21:22:44 +131,05:51:52,13:37:35,21:24:22 +132,05:50:12,13:37:34,21:26:00 +133,05:48:33,13:37:33,21:27:36 +134,05:46:57,13:37:33,21:29:12 +135,05:45:22,13:37:34,21:30:47 +136,05:43:49,13:37:35,21:32:20 +137,05:42:19,13:37:36,21:33:53 +138,05:40:51,13:37:38,21:35:25 +139,05:39:25,13:37:41,21:36:55 +140,05:38:01,13:37:44,21:38:25 +141,05:36:40,13:37:48,21:39:53 +142,05:35:20,13:37:52,21:41:19 +143,05:34:04,13:37:57,21:42:44 +144,05:32:50,13:38:03,21:44:08 +145,05:31:38,13:38:09,21:45:30 +146,05:30:29,13:38:15,21:46:50 +147,05:29:23,13:38:22,21:48:09 +148,05:28:19,13:38:29,21:49:26 +149,05:27:18,13:38:37,21:50:41 +150,05:26:20,13:38:45,21:51:54 +151,05:25:24,13:38:54,21:53:05 +152,05:24:32,13:39:03,21:54:14 +153,05:23:42,13:39:12,21:55:20 +154,05:22:56,13:39:22,21:56:25 +155,05:22:12,13:39:32,21:57:27 +156,05:21:32,13:39:42,21:58:27 +157,05:20:54,13:39:53,21:59:24 +158,05:20:20,13:40:04,22:00:19 +159,05:19:49,13:40:16,22:01:11 +160,05:19:20,13:40:27,22:02:00 +161,05:18:55,13:40:39,22:02:47 +162,05:18:34,13:40:51,22:03:31 +163,05:18:15,13:41:04,22:04:12 +164,05:18:00,13:41:16,22:04:50 +165,05:17:48,13:41:29,22:05:25 +166,05:17:39,13:41:41,22:05:57 +167,05:17:33,13:41:54,22:06:26 +168,05:17:31,13:42:07,22:06:52 +169,05:17:32,13:42:20,22:07:15 +170,05:17:36,13:42:33,22:07:35 +171,05:17:44,13:42:46,22:07:51 +172,05:17:54,13:42:59,22:08:04 +173,05:18:08,13:43:12,22:08:15 +174,05:18:25,13:43:25,22:08:21 +175,05:18:45,13:43:38,22:08:25 +176,05:19:08,13:43:51,22:08:25 +177,05:19:34,13:44:04,22:08:22 +178,05:20:03,13:44:16,22:08:16 +179,05:20:35,13:44:28,22:08:06 +180,05:21:10,13:44:41,22:07:53 +181,05:21:48,13:44:53,22:07:37 +182,05:22:29,13:45:04,22:07:18 +183,05:23:12,13:45:16,22:06:55 +184,05:23:58,13:45:27,22:06:29 +185,05:24:47,13:45:38,22:06:00 +186,05:25:39,13:45:48,22:05:27 +187,05:26:33,13:45:58,22:04:52 +188,05:27:29,13:46:08,22:04:13 +189,05:28:28,13:46:17,22:03:32 +190,05:29:29,13:46:26,22:02:47 +191,05:30:32,13:46:35,22:01:59 +192,05:31:37,13:46:43,22:01:08 +193,05:32:45,13:46:51,22:00:15 +194,05:33:54,13:46:58,21:59:18 +195,05:35:06,13:47:05,21:58:19 +196,05:36:19,13:47:11,21:57:17 +197,05:37:34,13:47:17,21:56:12 +198,05:38:51,13:47:22,21:55:04 +199,05:40:09,13:47:27,21:53:54 +200,05:41:29,13:47:31,21:52:41 +201,05:42:51,13:47:35,21:51:26 +202,05:44:13,13:47:38,21:50:08 +203,05:45:38,13:47:40,21:48:48 +204,05:47:03,13:47:42,21:47:25 +205,05:48:30,13:47:44,21:46:00 +206,05:49:58,13:47:44,21:44:33 +207,05:51:27,13:47:45,21:43:03 +208,05:52:56,13:47:44,21:41:31 +209,05:54:27,13:47:43,21:39:58 +210,05:55:59,13:47:41,21:38:22 +211,05:57:32,13:47:39,21:36:44 +212,05:59:05,13:47:36,21:35:04 +213,06:00:39,13:47:33,21:33:23 +214,06:02:14,13:47:29,21:31:39 +215,06:03:49,13:47:24,21:29:54 +216,06:05:25,13:47:19,21:28:07 +217,06:07:02,13:47:13,21:26:18 +218,06:08:38,13:47:06,21:24:28 +219,06:10:16,13:46:59,21:22:36 +220,06:11:54,13:46:52,21:20:43 +221,06:13:32,13:46:43,21:18:48 +222,06:15:10,13:46:35,21:16:51 +223,06:16:49,13:46:25,21:14:53 +224,06:18:28,13:46:15,21:12:54 +225,06:20:07,13:46:05,21:10:54 +226,06:21:47,13:45:54,21:08:52 +227,06:23:26,13:45:42,21:06:49 +228,06:25:06,13:45:30,21:04:45 +229,06:26:46,13:45:17,21:02:40 +230,06:28:26,13:45:04,21:00:34 +231,06:30:06,13:44:50,20:58:26 +232,06:31:46,13:44:36,20:56:18 +233,06:33:26,13:44:22,20:54:08 +234,06:35:06,13:44:07,20:51:58 +235,06:36:46,13:43:51,20:49:47 +236,06:38:27,13:43:35,20:47:35 +237,06:40:07,13:43:19,20:45:22 +238,06:41:47,13:43:02,20:43:08 +239,06:43:27,13:42:45,20:40:54 +240,06:45:08,13:42:27,20:38:39 +241,06:46:48,13:42:10,20:36:23 +242,06:48:28,13:41:51,20:34:07 +243,06:50:08,13:41:33,20:31:49 +244,06:51:48,13:41:14,20:29:32 +245,06:53:28,13:40:55,20:27:14 +246,06:55:08,13:40:35,20:24:55 +247,06:56:48,13:40:16,20:22:36 +248,06:58:28,13:39:56,20:20:16 +249,07:00:08,13:39:36,20:17:56 +250,07:01:48,13:39:15,20:15:36 +251,07:03:28,13:38:55,20:13:15 +252,07:05:08,13:38:34,20:10:54 +253,07:06:48,13:38:13,20:08:32 +254,07:08:28,13:37:52,20:06:11 +255,07:10:08,13:37:31,20:03:49 +256,07:11:48,13:37:10,20:01:27 +257,07:13:28,13:36:48,19:59:04 +258,07:15:08,13:36:27,19:56:42 +259,07:16:48,13:36:06,19:54:19 +260,07:18:29,13:35:44,19:51:56 +261,07:20:09,13:35:23,19:49:34 +262,07:21:49,13:35:01,19:47:11 +263,07:23:30,13:34:40,19:44:48 +264,07:25:10,13:34:19,19:42:25 +265,07:26:51,13:33:58,19:40:02 +266,07:28:32,13:33:37,19:37:40 +267,07:30:13,13:33:16,19:35:17 +268,07:31:54,13:32:55,19:32:55 +269,07:33:35,13:32:34,19:30:32 +270,07:35:17,13:32:13,19:28:10 +271,07:36:58,13:31:53,19:25:48 +272,07:38:40,13:31:33,19:23:27 +273,07:40:22,13:31:13,19:21:05 +274,07:42:04,13:30:54,19:18:44 +275,07:43:47,13:30:34,19:16:23 +276,07:45:29,13:30:15,19:14:03 +277,07:47:12,13:29:57,19:11:43 +278,07:48:56,13:29:38,19:09:24 +279,07:50:39,13:29:20,19:07:05 +280,07:52:23,13:29:03,19:04:46 +281,07:54:07,13:28:46,19:02:28 +282,07:55:51,13:28:29,19:00:11 +283,07:57:36,13:28:13,18:57:54 +284,07:59:21,13:27:57,18:55:38 +285,08:01:06,13:27:41,18:53:22 +286,08:02:52,13:27:27,18:51:07 +287,08:04:38,13:27:12,18:48:53 +288,08:06:24,13:26:58,18:46:40 +289,08:08:10,13:26:45,18:44:28 +290,08:09:57,13:26:33,18:42:16 +291,08:11:44,13:26:21,18:40:05 +292,08:13:31,13:26:09,18:37:56 +293,08:15:19,13:25:58,18:35:47 +294,08:17:07,13:25:48,18:33:39 +295,08:18:55,13:25:39,18:31:32 +296,08:20:44,13:25:30,18:29:27 +297,08:22:33,13:25:22,18:27:22 +298,08:24:22,13:25:15,18:25:19 +299,07:26:11,12:25:08,17:23:17 +300,07:28:01,12:25:02,17:21:16 +301,07:29:51,12:24:57,17:19:17 +302,07:31:40,12:24:53,17:17:19 +303,07:33:30,12:24:49,17:15:22 +304,07:35:21,12:24:46,17:13:27 +305,07:37:11,12:24:44,17:11:33 +306,07:39:01,12:24:43,17:09:41 +307,07:40:52,12:24:43,17:07:51 +308,07:42:42,12:24:44,17:06:02 +309,07:44:32,12:24:45,17:04:15 +310,07:46:23,12:24:47,17:02:30 +311,07:48:13,12:24:50,17:00:46 +312,07:50:03,12:24:54,16:59:05 +313,07:51:53,12:24:59,16:57:25 +314,07:53:42,12:25:04,16:55:47 +315,07:55:31,12:25:11,16:54:12 +316,07:57:20,12:25:18,16:52:38 +317,07:59:09,12:25:26,16:51:07 +318,08:00:57,12:25:35,16:49:38 +319,08:02:44,12:25:45,16:48:11 +320,08:04:31,12:25:56,16:46:47 +321,08:06:17,12:26:08,16:45:24 +322,08:08:02,12:26:20,16:44:05 +323,08:09:46,12:26:33,16:42:48 +324,08:11:30,12:26:47,16:41:33 +325,08:13:12,12:27:02,16:40:21 +326,08:14:54,12:27:18,16:39:12 +327,08:16:34,12:27:34,16:38:05 +328,08:18:13,12:27:52,16:37:02 +329,08:19:51,12:28:10,16:36:01 +330,08:21:27,12:28:28,16:35:03 +331,08:23:02,12:28:48,16:34:08 +332,08:24:36,12:29:08,16:33:16 +333,08:26:07,12:29:29,16:32:27 +334,08:27:37,12:29:51,16:31:42 +335,08:29:05,12:30:13,16:30:59 +336,08:30:31,12:30:36,16:30:20 +337,08:31:55,12:30:59,16:29:44 +338,08:33:17,12:31:23,16:29:11 +339,08:34:37,12:31:48,16:28:42 +340,08:35:54,12:32:13,16:28:16 +341,08:37:09,12:32:39,16:27:53 +342,08:38:21,12:33:05,16:27:34 +343,08:39:31,12:33:32,16:27:18 +344,08:40:38,12:33:59,16:27:06 +345,08:41:43,12:34:26,16:26:58 +346,08:42:45,12:34:54,16:26:53 +347,08:43:43,12:35:22,16:26:51 +348,08:44:39,12:35:50,16:26:53 +349,08:45:32,12:36:19,16:26:59 +350,08:46:22,12:36:48,16:27:08 +351,08:47:09,12:37:17,16:27:21 +352,08:47:52,12:37:47,16:27:37 +353,08:48:32,12:38:16,16:27:57 +354,08:49:09,12:38:46,16:28:21 +355,08:49:43,12:39:16,16:28:48 +356,08:50:13,12:39:45,16:29:18 +357,08:50:39,12:40:15,16:29:52 +358,08:51:03,12:40:45,16:30:30 +359,08:51:22,12:41:14,16:31:10 +360,08:51:39,12:41:44,16:31:55 +361,08:51:51,12:42:14,16:32:42 +362,08:52:01,12:42:43,16:33:32 +363,08:52:06,12:43:12,16:34:26 +364,08:52:08,12:43:41,16:35:23 +365,08:52:07,12:44:10,16:36:23 +366,08:52:00,12:44:45,16:37:42 diff --git a/inverter/static/twilight_2019.csv b/inverter/static/twilight_2019.csv new file mode 100755 index 0000000..59d8dc8 --- /dev/null +++ b/inverter/static/twilight_2019.csv @@ -0,0 +1,367 @@ +day,rise,noon,set +1,08:52:02,12:44:38,16:37:26 +2,08:51:54,12:45:06,16:38:31 +3,08:51:42,12:45:34,16:39:40 +4,08:51:26,12:46:01,16:40:51 +5,08:51:08,12:46:28,16:42:05 +6,08:50:45,12:46:55,16:43:21 +7,08:50:20,12:47:21,16:44:40 +8,08:49:51,12:47:47,16:46:02 +9,08:49:18,12:48:12,16:47:25 +10,08:48:43,12:48:36,16:48:51 +11,08:48:04,12:49:00,16:50:19 +12,08:47:22,12:49:24,16:51:49 +13,08:46:36,12:49:47,16:53:21 +14,08:45:48,12:50:09,16:54:55 +15,08:44:57,12:50:31,16:56:30 +16,08:44:02,12:50:52,16:58:08 +17,08:43:05,12:51:12,16:59:46 +18,08:42:04,12:51:31,17:01:27 +19,08:41:01,12:51:50,17:03:08 +20,08:39:55,12:52:08,17:04:51 +21,08:38:47,12:52:26,17:06:36 +22,08:37:35,12:52:42,17:08:21 +23,08:36:21,12:52:58,17:10:08 +24,08:35:05,12:53:13,17:11:55 +25,08:33:46,12:53:28,17:13:43 +26,08:32:24,12:53:41,17:15:33 +27,08:31:01,12:53:54,17:17:23 +28,08:29:34,12:54:06,17:19:13 +29,08:28:06,12:54:17,17:21:05 +30,08:26:35,12:54:27,17:22:57 +31,08:25:03,12:54:36,17:24:49 +32,08:23:28,12:54:45,17:26:42 +33,08:21:51,12:54:53,17:28:35 +34,08:20:12,12:55:00,17:30:28 +35,08:18:31,12:55:06,17:32:22 +36,08:16:48,12:55:11,17:34:16 +37,08:15:04,12:55:16,17:36:10 +38,08:13:18,12:55:19,17:38:05 +39,08:11:30,12:55:22,17:39:59 +40,08:09:40,12:55:24,17:41:54 +41,08:07:49,12:55:26,17:43:48 +42,08:05:56,12:55:26,17:45:43 +43,08:04:01,12:55:26,17:47:37 +44,08:02:06,12:55:25,17:49:31 +45,08:00:08,12:55:23,17:51:25 +46,07:58:10,12:55:21,17:53:20 +47,07:56:10,12:55:17,17:55:13 +48,07:54:09,12:55:13,17:57:07 +49,07:52:06,12:55:09,17:59:01 +50,07:50:03,12:55:03,18:00:54 +51,07:47:58,12:54:57,18:02:47 +52,07:45:52,12:54:51,18:04:40 +53,07:43:45,12:54:43,18:06:33 +54,07:41:38,12:54:35,18:08:25 +55,07:39:29,12:54:27,18:10:17 +56,07:37:19,12:54:17,18:12:09 +57,07:35:08,12:54:08,18:14:00 +58,07:32:57,12:53:57,18:15:52 +59,07:30:45,12:53:46,18:17:42 +60,07:28:32,12:53:35,18:19:33 +61,07:26:18,12:53:23,18:21:23 +62,07:24:03,12:53:11,18:23:14 +63,07:21:48,12:52:58,18:25:03 +64,07:19:32,12:52:44,18:26:53 +65,07:17:16,12:52:31,18:28:42 +66,07:14:59,12:52:16,18:30:31 +67,07:12:42,12:52:02,18:32:20 +68,07:10:24,12:51:47,18:34:08 +69,07:08:05,12:51:32,18:35:56 +70,07:05:47,12:51:16,18:37:44 +71,07:03:27,12:51:00,18:39:32 +72,07:01:08,12:50:44,18:41:19 +73,06:58:48,12:50:27,18:43:07 +74,06:56:28,12:50:11,18:44:54 +75,06:54:07,12:49:54,18:46:41 +76,06:51:47,12:49:36,18:48:27 +77,06:49:26,12:49:19,18:50:14 +78,06:47:05,12:49:02,18:52:00 +79,06:44:44,12:48:44,18:53:46 +80,06:42:23,12:48:26,18:55:32 +81,06:40:01,12:48:08,18:57:18 +82,06:37:40,12:47:50,18:59:04 +83,06:35:18,12:47:32,19:00:50 +84,06:32:57,12:47:14,19:02:35 +85,06:30:36,12:46:56,19:04:21 +86,06:28:14,12:46:38,19:06:06 +87,06:25:53,12:46:20,19:07:51 +88,06:23:32,12:46:02,19:09:37 +89,06:21:11,12:45:44,19:11:22 +90,07:18:50,13:45:26,20:13:07 +91,07:16:30,13:45:08,20:14:52 +92,07:14:10,13:44:50,20:16:37 +93,07:11:50,13:44:33,20:18:22 +94,07:09:30,13:44:15,20:20:07 +95,07:07:11,13:43:58,20:21:52 +96,07:04:52,13:43:41,20:23:37 +97,07:02:33,13:43:24,20:25:22 +98,07:00:15,13:43:07,20:27:07 +99,06:57:58,13:42:51,20:28:52 +100,06:55:40,13:42:35,20:30:37 +101,06:53:24,13:42:19,20:32:22 +102,06:51:08,13:42:03,20:34:07 +103,06:48:52,13:41:48,20:35:52 +104,06:46:37,13:41:33,20:37:37 +105,06:44:23,13:41:18,20:39:22 +106,06:42:10,13:41:04,20:41:07 +107,06:39:57,13:40:50,20:42:52 +108,06:37:45,13:40:36,20:44:36 +109,06:35:34,13:40:23,20:46:21 +110,06:33:24,13:40:10,20:48:06 +111,06:31:14,13:39:58,20:49:51 +112,06:29:06,13:39:46,20:51:35 +113,06:26:58,13:39:35,20:53:20 +114,06:24:52,13:39:23,20:55:04 +115,06:22:47,13:39:13,20:56:49 +116,06:20:42,13:39:03,20:58:33 +117,06:18:39,13:38:53,21:00:17 +118,06:16:37,13:38:44,21:02:01 +119,06:14:36,13:38:36,21:03:44 +120,06:12:36,13:38:28,21:05:28 +121,06:10:38,13:38:20,21:07:11 +122,06:08:41,13:38:13,21:08:54 +123,06:06:45,13:38:07,21:10:36 +124,06:04:51,13:38:01,21:12:18 +125,06:02:59,13:37:56,21:14:00 +126,06:01:08,13:37:51,21:15:41 +127,05:59:18,13:37:47,21:17:22 +128,05:57:30,13:37:43,21:19:02 +129,05:55:44,13:37:40,21:20:42 +130,05:53:59,13:37:37,21:22:20 +131,05:52:17,13:37:35,21:23:59 +132,05:50:36,13:37:34,21:25:36 +133,05:48:57,13:37:33,21:27:13 +134,05:47:20,13:37:33,21:28:49 +135,05:45:45,13:37:33,21:30:24 +136,05:44:12,13:37:34,21:31:58 +137,05:42:41,13:37:36,21:33:31 +138,05:41:12,13:37:38,21:35:03 +139,05:39:45,13:37:40,21:36:34 +140,05:38:21,13:37:44,21:38:03 +141,05:36:59,13:37:47,21:39:32 +142,05:35:39,13:37:51,21:40:59 +143,05:34:22,13:37:56,21:42:24 +144,05:33:07,13:38:01,21:43:48 +145,05:31:55,13:38:07,21:45:11 +146,05:30:45,13:38:13,21:46:31 +147,05:29:38,13:38:20,21:47:51 +148,05:28:34,13:38:27,21:49:08 +149,05:27:32,13:38:35,21:50:23 +150,05:26:34,13:38:43,21:51:37 +151,05:25:37,13:38:51,21:52:48 +152,05:24:44,13:39:00,21:53:58 +153,05:23:54,13:39:10,21:55:05 +154,05:23:07,13:39:19,21:56:10 +155,05:22:22,13:39:29,21:57:12 +156,05:21:41,13:39:40,21:58:13 +157,05:21:03,13:39:51,21:59:11 +158,05:20:28,13:40:02,22:00:06 +159,05:19:56,13:40:13,22:00:59 +160,05:19:27,13:40:25,22:01:49 +161,05:19:01,13:40:36,22:02:36 +162,05:18:39,13:40:48,22:03:21 +163,05:18:19,13:41:01,22:04:02 +164,05:18:03,13:41:13,22:04:41 +165,05:17:50,13:41:26,22:05:17 +166,05:17:41,13:41:38,22:05:50 +167,05:17:34,13:41:51,22:06:20 +168,05:17:31,13:42:04,22:06:46 +169,05:17:31,13:42:17,22:07:10 +170,05:17:35,13:42:30,22:07:31 +171,05:17:41,13:42:43,22:07:48 +172,05:17:51,13:42:56,22:08:02 +173,05:18:04,13:43:09,22:08:13 +174,05:18:20,13:43:22,22:08:20 +175,05:18:39,13:43:35,22:08:25 +176,05:19:02,13:43:48,22:08:26 +177,05:19:27,13:44:01,22:08:24 +178,05:19:56,13:44:13,22:08:18 +179,05:20:27,13:44:26,22:08:09 +180,05:21:01,13:44:38,22:07:57 +181,05:21:39,13:44:50,22:07:42 +182,05:22:19,13:45:02,22:07:23 +183,05:23:01,13:45:13,22:07:01 +184,05:23:47,13:45:24,22:06:36 +185,05:24:35,13:45:35,22:06:08 +186,05:25:26,13:45:46,22:05:36 +187,05:26:19,13:45:56,22:05:01 +188,05:27:15,13:46:06,22:04:23 +189,05:28:13,13:46:15,22:03:42 +190,05:29:14,13:46:24,22:02:58 +191,05:30:16,13:46:33,22:02:11 +192,05:31:21,13:46:41,22:01:21 +193,05:32:28,13:46:49,22:00:28 +194,05:33:37,13:46:57,21:59:33 +195,05:34:48,13:47:04,21:58:34 +196,05:36:01,13:47:10,21:57:32 +197,05:37:16,13:47:16,21:56:28 +198,05:38:32,13:47:21,21:55:21 +199,05:39:50,13:47:26,21:54:12 +200,05:41:10,13:47:30,21:52:59 +201,05:42:31,13:47:34,21:51:45 +202,05:43:53,13:47:37,21:50:27 +203,05:45:17,13:47:40,21:49:08 +204,05:46:42,13:47:42,21:47:45 +205,05:48:09,13:47:44,21:46:21 +206,05:49:36,13:47:44,21:44:54 +207,05:51:05,13:47:45,21:43:25 +208,05:52:35,13:47:44,21:41:54 +209,05:54:05,13:47:44,21:40:21 +210,05:55:37,13:47:42,21:38:46 +211,05:57:09,13:47:40,21:37:08 +212,05:58:42,13:47:37,21:35:29 +213,06:00:16,13:47:34,21:33:48 +214,06:01:51,13:47:30,21:32:05 +215,06:03:26,13:47:25,21:30:20 +216,06:05:02,13:47:20,21:28:33 +217,06:06:38,13:47:15,21:26:45 +218,06:08:15,13:47:08,21:24:55 +219,06:09:52,13:47:01,21:23:04 +220,06:11:30,13:46:54,21:21:11 +221,06:13:08,13:46:46,21:19:16 +222,06:14:46,13:46:37,21:17:20 +223,06:16:25,13:46:28,21:15:22 +224,06:18:04,13:46:18,21:13:24 +225,06:19:43,13:46:07,21:11:23 +226,06:21:22,13:45:56,21:09:22 +227,06:23:02,13:45:45,21:07:19 +228,06:24:42,13:45:33,21:05:16 +229,06:26:22,13:45:20,21:03:11 +230,06:28:01,13:45:07,21:01:05 +231,06:29:41,13:44:54,20:58:57 +232,06:31:22,13:44:40,20:56:49 +233,06:33:02,13:44:25,20:54:40 +234,06:34:42,13:44:10,20:52:30 +235,06:36:22,13:43:55,20:50:19 +236,06:38:02,13:43:39,20:48:07 +237,06:39:43,13:43:23,20:45:54 +238,06:41:23,13:43:06,20:43:41 +239,06:43:03,13:42:49,20:41:27 +240,06:44:43,13:42:32,20:39:12 +241,06:46:24,13:42:14,20:36:56 +242,06:48:04,13:41:56,20:34:40 +243,06:49:44,13:41:37,20:32:23 +244,06:51:24,13:41:19,20:30:05 +245,06:53:04,13:41:00,20:27:47 +246,06:54:44,13:40:40,20:25:29 +247,06:56:24,13:40:21,20:23:10 +248,06:58:04,13:40:01,20:20:50 +249,06:59:44,13:39:41,20:18:30 +250,07:01:24,13:39:20,20:16:10 +251,07:03:04,13:39:00,20:13:49 +252,07:04:44,13:38:39,20:11:28 +253,07:06:24,13:38:18,20:09:07 +254,07:08:04,13:37:57,20:06:45 +255,07:09:44,13:37:36,20:04:23 +256,07:11:24,13:37:15,20:02:01 +257,07:13:04,13:36:54,19:59:39 +258,07:14:44,13:36:32,19:57:16 +259,07:16:24,13:36:11,19:54:54 +260,07:18:04,13:35:50,19:52:31 +261,07:19:45,13:35:28,19:50:08 +262,07:21:25,13:35:07,19:47:45 +263,07:23:05,13:34:45,19:45:23 +264,07:24:46,13:34:24,19:43:00 +265,07:26:27,13:34:03,19:40:37 +266,07:28:07,13:33:42,19:38:14 +267,07:29:48,13:33:21,19:35:52 +268,07:31:29,13:33:00,19:33:29 +269,07:33:11,13:32:39,19:31:07 +270,07:34:52,13:32:18,19:28:45 +271,07:36:33,13:31:58,19:26:23 +272,07:38:15,13:31:38,19:24:01 +273,07:39:57,13:31:18,19:21:40 +274,07:41:39,13:30:58,19:19:18 +275,07:43:22,13:30:39,19:16:58 +276,07:45:05,13:30:20,19:14:37 +277,07:46:47,13:30:01,19:12:17 +278,07:48:31,13:29:43,19:09:57 +279,07:50:14,13:29:25,19:07:38 +280,07:51:58,13:29:07,19:05:20 +281,07:53:42,13:28:50,19:03:02 +282,07:55:26,13:28:33,19:00:44 +283,07:57:11,13:28:16,18:58:27 +284,07:58:55,13:28:00,18:56:11 +285,08:00:41,13:27:45,18:53:55 +286,08:02:26,13:27:30,18:51:40 +287,08:04:12,13:27:16,18:49:26 +288,08:05:58,13:27:02,18:47:12 +289,08:07:44,13:26:48,18:45:00 +290,08:09:31,13:26:36,18:42:48 +291,08:11:18,13:26:23,18:40:37 +292,08:13:05,13:26:12,18:38:27 +293,08:14:53,13:26:01,18:36:18 +294,08:16:41,13:25:51,18:34:10 +295,08:18:29,13:25:41,18:32:03 +296,08:20:18,13:25:32,18:29:57 +297,08:22:06,13:25:24,18:27:52 +298,08:23:55,13:25:16,18:25:49 +299,07:25:45,12:25:10,17:23:46 +300,07:27:34,12:25:04,17:21:45 +301,07:29:24,12:24:58,17:19:46 +302,07:31:14,12:24:54,17:17:47 +303,07:33:04,12:24:50,17:15:50 +304,07:34:54,12:24:47,17:13:55 +305,07:36:44,12:24:45,17:12:01 +306,07:38:35,12:24:43,17:10:08 +307,07:40:25,12:24:43,17:08:17 +308,07:42:15,12:24:43,17:06:28 +309,07:44:06,12:24:44,17:04:41 +310,07:45:56,12:24:46,17:02:55 +311,07:47:46,12:24:49,17:01:11 +312,07:49:36,12:24:53,16:59:29 +313,07:51:26,12:24:57,16:57:49 +314,07:53:16,12:25:03,16:56:11 +315,07:55:05,12:25:09,16:54:35 +316,07:56:54,12:25:16,16:53:01 +317,07:58:42,12:25:24,16:51:29 +318,08:00:30,12:25:33,16:49:59 +319,08:02:18,12:25:43,16:48:32 +320,08:04:05,12:25:53,16:47:07 +321,08:05:51,12:26:05,16:45:44 +322,08:07:37,12:26:17,16:44:24 +323,08:09:21,12:26:30,16:43:06 +324,08:11:05,12:26:44,16:41:51 +325,08:12:48,12:26:58,16:40:38 +326,08:14:29,12:27:14,16:39:28 +327,08:16:10,12:27:30,16:38:21 +328,08:17:49,12:27:47,16:37:17 +329,08:19:28,12:28:05,16:36:15 +330,08:21:04,12:28:24,16:35:16 +331,08:22:40,12:28:43,16:34:21 +332,08:24:13,12:29:03,16:33:28 +333,08:25:45,12:29:24,16:32:39 +334,08:27:15,12:29:45,16:31:52 +335,08:28:44,12:30:07,16:31:09 +336,08:30:10,12:30:30,16:30:29 +337,08:31:35,12:30:53,16:29:52 +338,08:32:57,12:31:17,16:29:18 +339,08:34:18,12:31:42,16:28:48 +340,08:35:35,12:32:07,16:28:21 +341,08:36:51,12:32:32,16:27:58 +342,08:38:04,12:32:58,16:27:38 +343,08:39:15,12:33:25,16:27:21 +344,08:40:22,12:33:52,16:27:08 +345,08:41:28,12:34:19,16:26:59 +346,08:42:30,12:34:47,16:26:53 +347,08:43:30,12:35:15,16:26:51 +348,08:44:26,12:35:43,16:26:52 +349,08:45:20,12:36:12,16:26:57 +350,08:46:10,12:36:41,16:27:05 +351,08:46:58,12:37:10,16:27:17 +352,08:47:42,12:37:39,16:27:33 +353,08:48:23,12:38:09,16:27:52 +354,08:49:01,12:38:39,16:28:14 +355,08:49:35,12:39:08,16:28:41 +356,08:50:06,12:39:38,16:29:10 +357,08:50:33,12:40:08,16:29:43 +358,08:50:57,12:40:37,16:30:20 +359,08:51:18,12:41:07,16:31:00 +360,08:51:35,12:41:37,16:31:43 +361,08:51:49,12:42:06,16:32:30 +362,08:51:59,12:42:36,16:33:19 +363,08:52:05,12:43:05,16:34:12 +364,08:52:08,12:43:34,16:35:08 +365,08:52:08,12:44:03,16:36:08 +366,08:52:02,12:44:38,16:37:26 diff --git a/inverter/static/twilight_2020.csv b/inverter/static/twilight_2020.csv new file mode 100755 index 0000000..09d6132 --- /dev/null +++ b/inverter/static/twilight_2020.csv @@ -0,0 +1,367 @@ +day,rise,noon,set +1,08:52:04,12:44:31,16:37:10 +2,08:51:56,12:44:59,16:38:15 +3,08:51:45,12:45:27,16:39:22 +4,08:51:31,12:45:55,16:40:33 +5,08:51:13,12:46:22,16:41:46 +6,08:50:51,12:46:48,16:43:02 +7,08:50:26,12:47:15,16:44:20 +8,08:49:58,12:47:40,16:45:41 +9,08:49:27,12:48:06,16:47:04 +10,08:48:52,12:48:30,16:48:30 +11,08:48:14,12:48:55,16:49:57 +12,08:47:32,12:49:18,16:51:27 +13,08:46:48,12:49:41,16:52:58 +14,08:46:00,12:50:04,16:54:31 +15,08:45:10,12:50:25,16:56:07 +16,08:44:16,12:50:46,16:57:43 +17,08:43:19,12:51:07,16:59:22 +18,08:42:20,12:51:27,17:01:02 +19,08:41:17,12:51:46,17:02:43 +20,08:40:12,12:52:04,17:04:26 +21,08:39:04,12:52:21,17:06:10 +22,08:37:53,12:52:38,17:07:55 +23,08:36:40,12:52:54,17:09:41 +24,08:35:24,12:53:10,17:11:29 +25,08:34:06,12:53:24,17:13:17 +26,08:32:45,12:53:38,17:15:06 +27,08:31:21,12:53:51,17:16:56 +28,08:29:56,12:54:03,17:18:46 +29,08:28:28,12:54:14,17:20:37 +30,08:26:58,12:54:24,17:22:29 +31,08:25:25,12:54:34,17:24:21 +32,08:23:51,12:54:43,17:26:14 +33,08:22:15,12:54:51,17:28:07 +34,08:20:36,12:54:58,17:30:01 +35,08:18:56,12:55:04,17:31:54 +36,08:17:14,12:55:10,17:33:48 +37,08:15:29,12:55:15,17:35:42 +38,08:13:44,12:55:19,17:37:37 +39,08:11:56,12:55:22,17:39:31 +40,08:10:07,12:55:24,17:41:26 +41,08:08:16,12:55:25,17:43:20 +42,08:06:23,12:55:26,17:45:14 +43,08:04:29,12:55:26,17:47:09 +44,08:02:34,12:55:25,17:49:03 +45,08:00:37,12:55:24,17:50:57 +46,07:58:39,12:55:21,17:52:52 +47,07:56:39,12:55:18,17:54:46 +48,07:54:38,12:55:14,17:56:39 +49,07:52:36,12:55:10,17:58:33 +50,07:50:33,12:55:05,18:00:26 +51,07:48:29,12:54:59,18:02:19 +52,07:46:23,12:54:52,18:04:12 +53,07:44:16,12:54:45,18:06:05 +54,07:42:09,12:54:37,18:07:57 +55,07:40:00,12:54:29,18:09:50 +56,07:37:51,12:54:20,18:11:41 +57,07:35:40,12:54:10,18:13:33 +58,07:33:29,12:54:00,18:15:24 +59,07:31:17,12:53:49,18:17:15 +60,07:29:04,12:53:38,18:19:06 +61,07:26:50,12:53:26,18:20:57 +62,07:24:36,12:53:14,18:22:47 +63,07:22:21,12:53:01,18:24:37 +64,07:20:05,12:52:48,18:26:26 +65,07:17:49,12:52:34,18:28:15 +66,07:15:32,12:52:20,18:30:04 +67,07:13:15,12:52:05,18:31:53 +68,07:10:57,12:51:51,18:33:42 +69,07:08:39,12:51:35,18:35:30 +70,07:06:20,12:51:20,18:37:18 +71,07:04:01,12:51:04,18:39:06 +72,07:01:42,12:50:48,18:40:53 +73,06:59:22,12:50:31,18:42:41 +74,06:57:02,12:50:15,18:44:28 +75,06:54:42,12:49:58,18:46:15 +76,06:52:21,12:49:41,18:48:01 +77,06:50:00,12:49:23,18:49:48 +78,06:47:39,12:49:06,18:51:34 +79,06:45:18,12:48:48,18:53:21 +80,06:42:57,12:48:30,18:55:07 +81,06:40:35,12:48:13,18:56:53 +82,06:38:14,12:47:55,18:58:38 +83,06:35:53,12:47:37,19:00:24 +84,06:33:31,12:47:18,19:02:10 +85,06:31:10,12:47:00,19:03:55 +86,06:28:49,12:46:42,19:05:40 +87,06:26:27,12:46:24,19:07:26 +88,06:24:06,12:46:06,19:09:11 +89,06:21:45,12:45:48,19:10:56 +90,06:19:24,12:45:30,19:12:41 +91,07:17:04,13:45:12,20:14:26 +92,07:14:44,13:44:54,20:16:12 +93,07:12:24,13:44:37,20:17:57 +94,07:10:04,13:44:19,20:19:42 +95,07:07:44,13:44:02,20:21:27 +96,07:05:25,13:43:45,20:23:12 +97,07:03:07,13:43:28,20:24:57 +98,07:00:49,13:43:11,20:26:42 +99,06:58:31,13:42:55,20:28:26 +100,06:56:13,13:42:38,20:30:11 +101,06:53:57,13:42:22,20:31:56 +102,06:51:41,13:42:07,20:33:41 +103,06:49:25,13:41:51,20:35:26 +104,06:47:10,13:41:36,20:37:11 +105,06:44:56,13:41:21,20:38:56 +106,06:42:42,13:41:07,20:40:41 +107,06:40:29,13:40:53,20:42:26 +108,06:38:17,13:40:39,20:44:11 +109,06:36:06,13:40:26,20:45:56 +110,06:33:55,13:40:13,20:47:41 +111,06:31:46,13:40:01,20:49:26 +112,06:29:37,13:39:49,20:51:10 +113,06:27:29,13:39:37,20:52:55 +114,06:25:22,13:39:26,20:54:39 +115,06:23:17,13:39:15,20:56:24 +116,06:21:12,13:39:05,20:58:08 +117,06:19:09,13:38:56,20:59:52 +118,06:17:06,13:38:46,21:01:36 +119,06:15:05,13:38:38,21:03:20 +120,06:13:05,13:38:30,21:05:03 +121,06:11:06,13:38:22,21:06:46 +122,06:09:09,13:38:15,21:08:29 +123,06:07:13,13:38:08,21:10:12 +124,06:05:19,13:38:02,21:11:54 +125,06:03:26,13:37:57,21:13:35 +126,06:01:34,13:37:52,21:15:17 +127,05:59:44,13:37:48,21:16:58 +128,05:57:56,13:37:44,21:18:38 +129,05:56:09,13:37:41,21:20:18 +130,05:54:24,13:37:38,21:21:57 +131,05:52:41,13:37:36,21:23:35 +132,05:51:00,13:37:34,21:25:13 +133,05:49:20,13:37:33,21:26:50 +134,05:47:43,13:37:33,21:28:26 +135,05:46:07,13:37:33,21:30:01 +136,05:44:34,13:37:34,21:31:36 +137,05:43:02,13:37:35,21:33:09 +138,05:41:33,13:37:37,21:34:41 +139,05:40:06,13:37:40,21:36:12 +140,05:38:41,13:37:43,21:37:42 +141,05:37:18,13:37:46,21:39:11 +142,05:35:58,13:37:50,21:40:38 +143,05:34:40,13:37:55,21:42:04 +144,05:33:25,13:38:00,21:43:28 +145,05:32:12,13:38:06,21:44:51 +146,05:31:02,13:38:12,21:46:12 +147,05:29:54,13:38:18,21:47:32 +148,05:28:49,13:38:26,21:48:50 +149,05:27:47,13:38:33,21:50:06 +150,05:26:47,13:38:41,21:51:20 +151,05:25:51,13:38:49,21:52:31 +152,05:24:57,13:38:58,21:53:41 +153,05:24:06,13:39:08,21:54:49 +154,05:23:18,13:39:17,21:55:55 +155,05:22:33,13:39:27,21:56:58 +156,05:21:51,13:39:37,21:57:59 +157,05:21:12,13:39:48,21:58:57 +158,05:20:36,13:39:59,21:59:53 +159,05:20:03,13:40:10,22:00:46 +160,05:19:33,13:40:22,22:01:37 +161,05:19:07,13:40:34,22:02:25 +162,05:18:43,13:40:46,22:03:10 +163,05:18:23,13:40:58,22:03:53 +164,05:18:07,13:41:10,22:04:32 +165,05:17:53,13:41:23,22:05:09 +166,05:17:43,13:41:35,22:05:43 +167,05:17:35,13:41:48,22:06:13 +168,05:17:31,13:42:01,22:06:41 +169,05:17:31,13:42:14,22:07:05 +170,05:17:33,13:42:27,22:07:26 +171,05:17:39,13:42:40,22:07:44 +172,05:17:48,13:42:53,22:07:59 +173,05:18:00,13:43:06,22:08:11 +174,05:18:16,13:43:19,22:08:19 +175,05:18:34,13:43:32,22:08:25 +176,05:18:56,13:43:45,22:08:26 +177,05:19:21,13:43:58,22:08:25 +178,05:19:48,13:44:10,22:08:20 +179,05:20:19,13:44:23,22:08:12 +180,05:20:53,13:44:35,22:08:01 +181,05:21:29,13:44:47,22:07:46 +182,05:22:08,13:44:59,22:07:28 +183,05:22:51,13:45:10,22:07:07 +184,05:23:36,13:45:22,22:06:43 +185,05:24:23,13:45:33,22:06:15 +186,05:25:13,13:45:43,22:05:44 +187,05:26:06,13:45:54,22:05:10 +188,05:27:01,13:46:04,22:04:33 +189,05:27:59,13:46:13,22:03:53 +190,05:28:59,13:46:22,22:03:10 +191,05:30:01,13:46:31,22:02:24 +192,05:31:05,13:46:40,22:01:34 +193,05:32:12,13:46:48,22:00:42 +194,05:33:20,13:46:55,21:59:47 +195,05:34:31,13:47:02,21:58:49 +196,05:35:43,13:47:09,21:57:48 +197,05:36:57,13:47:15,21:56:44 +198,05:38:13,13:47:20,21:55:38 +199,05:39:31,13:47:25,21:54:29 +200,05:40:50,13:47:30,21:53:17 +201,05:42:11,13:47:33,21:52:03 +202,05:43:33,13:47:37,21:50:47 +203,05:44:57,13:47:40,21:49:27 +204,05:46:21,13:47:42,21:48:06 +205,05:47:48,13:47:43,21:46:42 +206,05:49:15,13:47:44,21:45:16 +207,05:50:43,13:47:45,21:43:47 +208,05:52:13,13:47:45,21:42:17 +209,05:53:43,13:47:44,21:40:44 +210,05:55:14,13:47:43,21:39:09 +211,05:56:47,13:47:41,21:37:32 +212,05:58:20,13:47:38,21:35:54 +213,05:59:53,13:47:35,21:34:13 +214,06:01:28,13:47:31,21:32:30 +215,06:03:03,13:47:27,21:30:46 +216,06:04:39,13:47:22,21:29:00 +217,06:06:15,13:47:16,21:27:12 +218,06:07:51,13:47:10,21:25:22 +219,06:09:29,13:47:03,21:23:31 +220,06:11:06,13:46:56,21:21:38 +221,06:12:44,13:46:48,21:19:44 +222,06:14:22,13:46:39,21:17:48 +223,06:16:01,13:46:30,21:15:51 +224,06:17:40,13:46:20,21:13:53 +225,06:19:19,13:46:10,21:11:53 +226,06:20:58,13:45:59,21:09:52 +227,06:22:38,13:45:48,21:07:49 +228,06:24:18,13:45:36,21:05:46 +229,06:25:57,13:45:24,21:03:41 +230,06:27:37,13:45:11,21:01:35 +231,06:29:17,13:44:57,20:59:28 +232,06:30:57,13:44:43,20:57:21 +233,06:32:37,13:44:29,20:55:12 +234,06:34:18,13:44:14,20:53:02 +235,06:35:58,13:43:59,20:50:51 +236,06:37:38,13:43:43,20:48:39 +237,06:39:18,13:43:27,20:46:27 +238,06:40:59,13:43:10,20:44:14 +239,06:42:39,13:42:53,20:42:00 +240,06:44:19,13:42:36,20:39:45 +241,06:45:59,13:42:18,20:37:29 +242,06:47:39,13:42:00,20:35:13 +243,06:49:20,13:41:42,20:32:56 +244,06:51:00,13:41:23,20:30:39 +245,06:52:40,13:41:04,20:28:21 +246,06:54:20,13:40:45,20:26:03 +247,06:56:00,13:40:25,20:23:44 +248,06:57:40,13:40:06,20:21:24 +249,06:59:20,13:39:46,20:19:04 +250,07:01:00,13:39:25,20:16:44 +251,07:02:40,13:39:05,20:14:23 +252,07:04:20,13:38:44,20:12:02 +253,07:06:00,13:38:23,20:09:41 +254,07:07:40,13:38:02,20:07:20 +255,07:09:20,13:37:41,20:04:58 +256,07:11:00,13:37:20,20:02:36 +257,07:12:40,13:36:59,20:00:13 +258,07:14:20,13:36:38,19:57:51 +259,07:16:00,13:36:16,19:55:28 +260,07:17:40,13:35:55,19:53:06 +261,07:19:20,13:35:33,19:50:43 +262,07:21:01,13:35:12,19:48:20 +263,07:22:41,13:34:51,19:45:57 +264,07:24:22,13:34:29,19:43:34 +265,07:26:02,13:34:08,19:41:12 +266,07:27:43,13:33:47,19:38:49 +267,07:29:24,13:33:26,19:36:26 +268,07:31:05,13:33:05,19:34:04 +269,07:32:46,13:32:44,19:31:41 +270,07:34:27,13:32:23,19:29:19 +271,07:36:09,13:32:03,19:26:57 +272,07:37:51,13:31:43,19:24:35 +273,07:39:33,13:31:23,19:22:14 +274,07:41:15,13:31:03,19:19:53 +275,07:42:57,13:30:44,19:17:32 +276,07:44:40,13:30:24,19:15:11 +277,07:46:23,13:30:06,19:12:51 +278,07:48:06,13:29:47,19:10:31 +279,07:49:49,13:29:29,19:08:12 +280,07:51:33,13:29:11,19:05:53 +281,07:53:17,13:28:54,19:03:35 +282,07:55:01,13:28:37,19:01:17 +283,07:56:45,13:28:20,18:59:00 +284,07:58:30,13:28:04,18:56:44 +285,08:00:15,13:27:49,18:54:28 +286,08:02:00,13:27:34,18:52:13 +287,08:03:46,13:27:19,18:49:58 +288,08:05:32,13:27:05,18:47:44 +289,08:07:19,13:26:52,18:45:32 +290,08:09:05,13:26:39,18:43:20 +291,08:10:52,13:26:26,18:41:08 +292,08:12:39,13:26:15,18:38:58 +293,08:14:27,13:26:03,18:36:49 +294,08:16:15,13:25:53,18:34:41 +295,08:18:03,13:25:43,18:32:33 +296,08:19:51,13:25:34,18:30:27 +297,08:21:40,13:25:26,18:28:22 +298,08:23:29,13:25:18,18:26:18 +299,08:25:18,13:25:11,18:24:16 +300,07:27:08,12:25:05,17:22:14 +301,07:28:57,12:24:59,17:20:14 +302,07:30:47,12:24:55,17:18:16 +303,07:32:37,12:24:51,17:16:18 +304,07:34:27,12:24:48,17:14:22 +305,07:36:18,12:24:45,17:12:28 +306,07:38:08,12:24:44,17:10:35 +307,07:39:58,12:24:43,17:08:44 +308,07:41:49,12:24:43,17:06:54 +309,07:43:39,12:24:44,17:05:06 +310,07:45:29,12:24:46,17:03:20 +311,07:47:20,12:24:48,17:01:36 +312,07:49:10,12:24:52,16:59:53 +313,07:51:00,12:24:56,16:58:13 +314,07:52:49,12:25:01,16:56:34 +315,07:54:39,12:25:07,16:54:57 +316,07:56:28,12:25:14,16:53:23 +317,07:58:16,12:25:22,16:51:50 +318,08:00:04,12:25:31,16:50:20 +319,08:01:52,12:25:40,16:48:52 +320,08:03:39,12:25:50,16:47:27 +321,08:05:25,12:26:02,16:46:03 +322,08:07:11,12:26:14,16:44:43 +323,08:08:56,12:26:26,16:43:24 +324,08:10:40,12:26:40,16:42:08 +325,08:12:23,12:26:55,16:40:55 +326,08:14:05,12:27:10,16:39:45 +327,08:15:46,12:27:26,16:38:37 +328,08:17:26,12:27:43,16:37:32 +329,08:19:04,12:28:01,16:36:29 +330,08:20:41,12:28:19,16:35:30 +331,08:22:17,12:28:38,16:34:34 +332,08:23:51,12:28:58,16:33:40 +333,08:25:23,12:29:19,16:32:50 +334,08:26:54,12:29:40,16:32:03 +335,08:28:23,12:30:02,16:31:19 +336,08:29:50,12:30:24,16:30:38 +337,08:31:15,12:30:48,16:30:00 +338,08:32:38,12:31:11,16:29:26 +339,08:33:58,12:31:36,16:28:55 +340,08:35:17,12:32:01,16:28:27 +341,08:36:33,12:32:26,16:28:03 +342,08:37:47,12:32:52,16:27:42 +343,08:38:58,12:33:18,16:27:25 +344,08:40:06,12:33:45,16:27:11 +345,08:41:12,12:34:12,16:27:01 +346,08:42:15,12:34:40,16:26:54 +347,08:43:16,12:35:08,16:26:51 +348,08:44:13,12:35:36,16:26:51 +349,08:45:07,12:36:05,16:26:55 +350,08:45:59,12:36:34,16:27:02 +351,08:46:47,12:37:03,16:27:14 +352,08:47:32,12:37:32,16:27:28 +353,08:48:13,12:38:02,16:27:46 +354,08:48:52,12:38:31,16:28:08 +355,08:49:27,12:39:01,16:28:34 +356,08:49:59,12:39:31,16:29:02 +357,08:50:27,12:40:00,16:29:35 +358,08:50:52,12:40:30,16:30:10 +359,08:51:14,12:41:00,16:30:49 +360,08:51:32,12:41:29,16:31:32 +361,08:51:46,12:41:59,16:32:18 +362,08:51:57,12:42:28,16:33:07 +363,08:52:04,12:42:58,16:33:59 +364,08:52:08,12:43:27,16:34:54 +365,08:52:09,12:43:56,16:35:52 +366,08:52:05,12:44:24,16:36:54 diff --git a/inverter/static/twilight_2022.csv b/inverter/static/twilight_2022.csv new file mode 100755 index 0000000..09d6132 --- /dev/null +++ b/inverter/static/twilight_2022.csv @@ -0,0 +1,367 @@ +day,rise,noon,set +1,08:52:04,12:44:31,16:37:10 +2,08:51:56,12:44:59,16:38:15 +3,08:51:45,12:45:27,16:39:22 +4,08:51:31,12:45:55,16:40:33 +5,08:51:13,12:46:22,16:41:46 +6,08:50:51,12:46:48,16:43:02 +7,08:50:26,12:47:15,16:44:20 +8,08:49:58,12:47:40,16:45:41 +9,08:49:27,12:48:06,16:47:04 +10,08:48:52,12:48:30,16:48:30 +11,08:48:14,12:48:55,16:49:57 +12,08:47:32,12:49:18,16:51:27 +13,08:46:48,12:49:41,16:52:58 +14,08:46:00,12:50:04,16:54:31 +15,08:45:10,12:50:25,16:56:07 +16,08:44:16,12:50:46,16:57:43 +17,08:43:19,12:51:07,16:59:22 +18,08:42:20,12:51:27,17:01:02 +19,08:41:17,12:51:46,17:02:43 +20,08:40:12,12:52:04,17:04:26 +21,08:39:04,12:52:21,17:06:10 +22,08:37:53,12:52:38,17:07:55 +23,08:36:40,12:52:54,17:09:41 +24,08:35:24,12:53:10,17:11:29 +25,08:34:06,12:53:24,17:13:17 +26,08:32:45,12:53:38,17:15:06 +27,08:31:21,12:53:51,17:16:56 +28,08:29:56,12:54:03,17:18:46 +29,08:28:28,12:54:14,17:20:37 +30,08:26:58,12:54:24,17:22:29 +31,08:25:25,12:54:34,17:24:21 +32,08:23:51,12:54:43,17:26:14 +33,08:22:15,12:54:51,17:28:07 +34,08:20:36,12:54:58,17:30:01 +35,08:18:56,12:55:04,17:31:54 +36,08:17:14,12:55:10,17:33:48 +37,08:15:29,12:55:15,17:35:42 +38,08:13:44,12:55:19,17:37:37 +39,08:11:56,12:55:22,17:39:31 +40,08:10:07,12:55:24,17:41:26 +41,08:08:16,12:55:25,17:43:20 +42,08:06:23,12:55:26,17:45:14 +43,08:04:29,12:55:26,17:47:09 +44,08:02:34,12:55:25,17:49:03 +45,08:00:37,12:55:24,17:50:57 +46,07:58:39,12:55:21,17:52:52 +47,07:56:39,12:55:18,17:54:46 +48,07:54:38,12:55:14,17:56:39 +49,07:52:36,12:55:10,17:58:33 +50,07:50:33,12:55:05,18:00:26 +51,07:48:29,12:54:59,18:02:19 +52,07:46:23,12:54:52,18:04:12 +53,07:44:16,12:54:45,18:06:05 +54,07:42:09,12:54:37,18:07:57 +55,07:40:00,12:54:29,18:09:50 +56,07:37:51,12:54:20,18:11:41 +57,07:35:40,12:54:10,18:13:33 +58,07:33:29,12:54:00,18:15:24 +59,07:31:17,12:53:49,18:17:15 +60,07:29:04,12:53:38,18:19:06 +61,07:26:50,12:53:26,18:20:57 +62,07:24:36,12:53:14,18:22:47 +63,07:22:21,12:53:01,18:24:37 +64,07:20:05,12:52:48,18:26:26 +65,07:17:49,12:52:34,18:28:15 +66,07:15:32,12:52:20,18:30:04 +67,07:13:15,12:52:05,18:31:53 +68,07:10:57,12:51:51,18:33:42 +69,07:08:39,12:51:35,18:35:30 +70,07:06:20,12:51:20,18:37:18 +71,07:04:01,12:51:04,18:39:06 +72,07:01:42,12:50:48,18:40:53 +73,06:59:22,12:50:31,18:42:41 +74,06:57:02,12:50:15,18:44:28 +75,06:54:42,12:49:58,18:46:15 +76,06:52:21,12:49:41,18:48:01 +77,06:50:00,12:49:23,18:49:48 +78,06:47:39,12:49:06,18:51:34 +79,06:45:18,12:48:48,18:53:21 +80,06:42:57,12:48:30,18:55:07 +81,06:40:35,12:48:13,18:56:53 +82,06:38:14,12:47:55,18:58:38 +83,06:35:53,12:47:37,19:00:24 +84,06:33:31,12:47:18,19:02:10 +85,06:31:10,12:47:00,19:03:55 +86,06:28:49,12:46:42,19:05:40 +87,06:26:27,12:46:24,19:07:26 +88,06:24:06,12:46:06,19:09:11 +89,06:21:45,12:45:48,19:10:56 +90,06:19:24,12:45:30,19:12:41 +91,07:17:04,13:45:12,20:14:26 +92,07:14:44,13:44:54,20:16:12 +93,07:12:24,13:44:37,20:17:57 +94,07:10:04,13:44:19,20:19:42 +95,07:07:44,13:44:02,20:21:27 +96,07:05:25,13:43:45,20:23:12 +97,07:03:07,13:43:28,20:24:57 +98,07:00:49,13:43:11,20:26:42 +99,06:58:31,13:42:55,20:28:26 +100,06:56:13,13:42:38,20:30:11 +101,06:53:57,13:42:22,20:31:56 +102,06:51:41,13:42:07,20:33:41 +103,06:49:25,13:41:51,20:35:26 +104,06:47:10,13:41:36,20:37:11 +105,06:44:56,13:41:21,20:38:56 +106,06:42:42,13:41:07,20:40:41 +107,06:40:29,13:40:53,20:42:26 +108,06:38:17,13:40:39,20:44:11 +109,06:36:06,13:40:26,20:45:56 +110,06:33:55,13:40:13,20:47:41 +111,06:31:46,13:40:01,20:49:26 +112,06:29:37,13:39:49,20:51:10 +113,06:27:29,13:39:37,20:52:55 +114,06:25:22,13:39:26,20:54:39 +115,06:23:17,13:39:15,20:56:24 +116,06:21:12,13:39:05,20:58:08 +117,06:19:09,13:38:56,20:59:52 +118,06:17:06,13:38:46,21:01:36 +119,06:15:05,13:38:38,21:03:20 +120,06:13:05,13:38:30,21:05:03 +121,06:11:06,13:38:22,21:06:46 +122,06:09:09,13:38:15,21:08:29 +123,06:07:13,13:38:08,21:10:12 +124,06:05:19,13:38:02,21:11:54 +125,06:03:26,13:37:57,21:13:35 +126,06:01:34,13:37:52,21:15:17 +127,05:59:44,13:37:48,21:16:58 +128,05:57:56,13:37:44,21:18:38 +129,05:56:09,13:37:41,21:20:18 +130,05:54:24,13:37:38,21:21:57 +131,05:52:41,13:37:36,21:23:35 +132,05:51:00,13:37:34,21:25:13 +133,05:49:20,13:37:33,21:26:50 +134,05:47:43,13:37:33,21:28:26 +135,05:46:07,13:37:33,21:30:01 +136,05:44:34,13:37:34,21:31:36 +137,05:43:02,13:37:35,21:33:09 +138,05:41:33,13:37:37,21:34:41 +139,05:40:06,13:37:40,21:36:12 +140,05:38:41,13:37:43,21:37:42 +141,05:37:18,13:37:46,21:39:11 +142,05:35:58,13:37:50,21:40:38 +143,05:34:40,13:37:55,21:42:04 +144,05:33:25,13:38:00,21:43:28 +145,05:32:12,13:38:06,21:44:51 +146,05:31:02,13:38:12,21:46:12 +147,05:29:54,13:38:18,21:47:32 +148,05:28:49,13:38:26,21:48:50 +149,05:27:47,13:38:33,21:50:06 +150,05:26:47,13:38:41,21:51:20 +151,05:25:51,13:38:49,21:52:31 +152,05:24:57,13:38:58,21:53:41 +153,05:24:06,13:39:08,21:54:49 +154,05:23:18,13:39:17,21:55:55 +155,05:22:33,13:39:27,21:56:58 +156,05:21:51,13:39:37,21:57:59 +157,05:21:12,13:39:48,21:58:57 +158,05:20:36,13:39:59,21:59:53 +159,05:20:03,13:40:10,22:00:46 +160,05:19:33,13:40:22,22:01:37 +161,05:19:07,13:40:34,22:02:25 +162,05:18:43,13:40:46,22:03:10 +163,05:18:23,13:40:58,22:03:53 +164,05:18:07,13:41:10,22:04:32 +165,05:17:53,13:41:23,22:05:09 +166,05:17:43,13:41:35,22:05:43 +167,05:17:35,13:41:48,22:06:13 +168,05:17:31,13:42:01,22:06:41 +169,05:17:31,13:42:14,22:07:05 +170,05:17:33,13:42:27,22:07:26 +171,05:17:39,13:42:40,22:07:44 +172,05:17:48,13:42:53,22:07:59 +173,05:18:00,13:43:06,22:08:11 +174,05:18:16,13:43:19,22:08:19 +175,05:18:34,13:43:32,22:08:25 +176,05:18:56,13:43:45,22:08:26 +177,05:19:21,13:43:58,22:08:25 +178,05:19:48,13:44:10,22:08:20 +179,05:20:19,13:44:23,22:08:12 +180,05:20:53,13:44:35,22:08:01 +181,05:21:29,13:44:47,22:07:46 +182,05:22:08,13:44:59,22:07:28 +183,05:22:51,13:45:10,22:07:07 +184,05:23:36,13:45:22,22:06:43 +185,05:24:23,13:45:33,22:06:15 +186,05:25:13,13:45:43,22:05:44 +187,05:26:06,13:45:54,22:05:10 +188,05:27:01,13:46:04,22:04:33 +189,05:27:59,13:46:13,22:03:53 +190,05:28:59,13:46:22,22:03:10 +191,05:30:01,13:46:31,22:02:24 +192,05:31:05,13:46:40,22:01:34 +193,05:32:12,13:46:48,22:00:42 +194,05:33:20,13:46:55,21:59:47 +195,05:34:31,13:47:02,21:58:49 +196,05:35:43,13:47:09,21:57:48 +197,05:36:57,13:47:15,21:56:44 +198,05:38:13,13:47:20,21:55:38 +199,05:39:31,13:47:25,21:54:29 +200,05:40:50,13:47:30,21:53:17 +201,05:42:11,13:47:33,21:52:03 +202,05:43:33,13:47:37,21:50:47 +203,05:44:57,13:47:40,21:49:27 +204,05:46:21,13:47:42,21:48:06 +205,05:47:48,13:47:43,21:46:42 +206,05:49:15,13:47:44,21:45:16 +207,05:50:43,13:47:45,21:43:47 +208,05:52:13,13:47:45,21:42:17 +209,05:53:43,13:47:44,21:40:44 +210,05:55:14,13:47:43,21:39:09 +211,05:56:47,13:47:41,21:37:32 +212,05:58:20,13:47:38,21:35:54 +213,05:59:53,13:47:35,21:34:13 +214,06:01:28,13:47:31,21:32:30 +215,06:03:03,13:47:27,21:30:46 +216,06:04:39,13:47:22,21:29:00 +217,06:06:15,13:47:16,21:27:12 +218,06:07:51,13:47:10,21:25:22 +219,06:09:29,13:47:03,21:23:31 +220,06:11:06,13:46:56,21:21:38 +221,06:12:44,13:46:48,21:19:44 +222,06:14:22,13:46:39,21:17:48 +223,06:16:01,13:46:30,21:15:51 +224,06:17:40,13:46:20,21:13:53 +225,06:19:19,13:46:10,21:11:53 +226,06:20:58,13:45:59,21:09:52 +227,06:22:38,13:45:48,21:07:49 +228,06:24:18,13:45:36,21:05:46 +229,06:25:57,13:45:24,21:03:41 +230,06:27:37,13:45:11,21:01:35 +231,06:29:17,13:44:57,20:59:28 +232,06:30:57,13:44:43,20:57:21 +233,06:32:37,13:44:29,20:55:12 +234,06:34:18,13:44:14,20:53:02 +235,06:35:58,13:43:59,20:50:51 +236,06:37:38,13:43:43,20:48:39 +237,06:39:18,13:43:27,20:46:27 +238,06:40:59,13:43:10,20:44:14 +239,06:42:39,13:42:53,20:42:00 +240,06:44:19,13:42:36,20:39:45 +241,06:45:59,13:42:18,20:37:29 +242,06:47:39,13:42:00,20:35:13 +243,06:49:20,13:41:42,20:32:56 +244,06:51:00,13:41:23,20:30:39 +245,06:52:40,13:41:04,20:28:21 +246,06:54:20,13:40:45,20:26:03 +247,06:56:00,13:40:25,20:23:44 +248,06:57:40,13:40:06,20:21:24 +249,06:59:20,13:39:46,20:19:04 +250,07:01:00,13:39:25,20:16:44 +251,07:02:40,13:39:05,20:14:23 +252,07:04:20,13:38:44,20:12:02 +253,07:06:00,13:38:23,20:09:41 +254,07:07:40,13:38:02,20:07:20 +255,07:09:20,13:37:41,20:04:58 +256,07:11:00,13:37:20,20:02:36 +257,07:12:40,13:36:59,20:00:13 +258,07:14:20,13:36:38,19:57:51 +259,07:16:00,13:36:16,19:55:28 +260,07:17:40,13:35:55,19:53:06 +261,07:19:20,13:35:33,19:50:43 +262,07:21:01,13:35:12,19:48:20 +263,07:22:41,13:34:51,19:45:57 +264,07:24:22,13:34:29,19:43:34 +265,07:26:02,13:34:08,19:41:12 +266,07:27:43,13:33:47,19:38:49 +267,07:29:24,13:33:26,19:36:26 +268,07:31:05,13:33:05,19:34:04 +269,07:32:46,13:32:44,19:31:41 +270,07:34:27,13:32:23,19:29:19 +271,07:36:09,13:32:03,19:26:57 +272,07:37:51,13:31:43,19:24:35 +273,07:39:33,13:31:23,19:22:14 +274,07:41:15,13:31:03,19:19:53 +275,07:42:57,13:30:44,19:17:32 +276,07:44:40,13:30:24,19:15:11 +277,07:46:23,13:30:06,19:12:51 +278,07:48:06,13:29:47,19:10:31 +279,07:49:49,13:29:29,19:08:12 +280,07:51:33,13:29:11,19:05:53 +281,07:53:17,13:28:54,19:03:35 +282,07:55:01,13:28:37,19:01:17 +283,07:56:45,13:28:20,18:59:00 +284,07:58:30,13:28:04,18:56:44 +285,08:00:15,13:27:49,18:54:28 +286,08:02:00,13:27:34,18:52:13 +287,08:03:46,13:27:19,18:49:58 +288,08:05:32,13:27:05,18:47:44 +289,08:07:19,13:26:52,18:45:32 +290,08:09:05,13:26:39,18:43:20 +291,08:10:52,13:26:26,18:41:08 +292,08:12:39,13:26:15,18:38:58 +293,08:14:27,13:26:03,18:36:49 +294,08:16:15,13:25:53,18:34:41 +295,08:18:03,13:25:43,18:32:33 +296,08:19:51,13:25:34,18:30:27 +297,08:21:40,13:25:26,18:28:22 +298,08:23:29,13:25:18,18:26:18 +299,08:25:18,13:25:11,18:24:16 +300,07:27:08,12:25:05,17:22:14 +301,07:28:57,12:24:59,17:20:14 +302,07:30:47,12:24:55,17:18:16 +303,07:32:37,12:24:51,17:16:18 +304,07:34:27,12:24:48,17:14:22 +305,07:36:18,12:24:45,17:12:28 +306,07:38:08,12:24:44,17:10:35 +307,07:39:58,12:24:43,17:08:44 +308,07:41:49,12:24:43,17:06:54 +309,07:43:39,12:24:44,17:05:06 +310,07:45:29,12:24:46,17:03:20 +311,07:47:20,12:24:48,17:01:36 +312,07:49:10,12:24:52,16:59:53 +313,07:51:00,12:24:56,16:58:13 +314,07:52:49,12:25:01,16:56:34 +315,07:54:39,12:25:07,16:54:57 +316,07:56:28,12:25:14,16:53:23 +317,07:58:16,12:25:22,16:51:50 +318,08:00:04,12:25:31,16:50:20 +319,08:01:52,12:25:40,16:48:52 +320,08:03:39,12:25:50,16:47:27 +321,08:05:25,12:26:02,16:46:03 +322,08:07:11,12:26:14,16:44:43 +323,08:08:56,12:26:26,16:43:24 +324,08:10:40,12:26:40,16:42:08 +325,08:12:23,12:26:55,16:40:55 +326,08:14:05,12:27:10,16:39:45 +327,08:15:46,12:27:26,16:38:37 +328,08:17:26,12:27:43,16:37:32 +329,08:19:04,12:28:01,16:36:29 +330,08:20:41,12:28:19,16:35:30 +331,08:22:17,12:28:38,16:34:34 +332,08:23:51,12:28:58,16:33:40 +333,08:25:23,12:29:19,16:32:50 +334,08:26:54,12:29:40,16:32:03 +335,08:28:23,12:30:02,16:31:19 +336,08:29:50,12:30:24,16:30:38 +337,08:31:15,12:30:48,16:30:00 +338,08:32:38,12:31:11,16:29:26 +339,08:33:58,12:31:36,16:28:55 +340,08:35:17,12:32:01,16:28:27 +341,08:36:33,12:32:26,16:28:03 +342,08:37:47,12:32:52,16:27:42 +343,08:38:58,12:33:18,16:27:25 +344,08:40:06,12:33:45,16:27:11 +345,08:41:12,12:34:12,16:27:01 +346,08:42:15,12:34:40,16:26:54 +347,08:43:16,12:35:08,16:26:51 +348,08:44:13,12:35:36,16:26:51 +349,08:45:07,12:36:05,16:26:55 +350,08:45:59,12:36:34,16:27:02 +351,08:46:47,12:37:03,16:27:14 +352,08:47:32,12:37:32,16:27:28 +353,08:48:13,12:38:02,16:27:46 +354,08:48:52,12:38:31,16:28:08 +355,08:49:27,12:39:01,16:28:34 +356,08:49:59,12:39:31,16:29:02 +357,08:50:27,12:40:00,16:29:35 +358,08:50:52,12:40:30,16:30:10 +359,08:51:14,12:41:00,16:30:49 +360,08:51:32,12:41:29,16:31:32 +361,08:51:46,12:41:59,16:32:18 +362,08:51:57,12:42:28,16:33:07 +363,08:52:04,12:42:58,16:33:59 +364,08:52:08,12:43:27,16:34:54 +365,08:52:09,12:43:56,16:35:52 +366,08:52:05,12:44:24,16:36:54