diff --git a/.gitignore b/.gitignore index b6e4761..8ce7dfc 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,7 @@ coverage.xml *.pot # Django stuff: -*.log +#*.log local_settings.py db.sqlite3 db.sqlite3-journal diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e66f6d9 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,80 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, without their explicit permission +* Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at opensource@github.com. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at . + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at . Translations are available at . diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..95fe61f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,118 @@ +# Welcome to python-broadlink-smart-plug-mini contributing guide + +Thank you for investing your time in contributing to our project! Any contribution you make will be reflected on [python-broadlink-smart-plug-mini](https://github.com/ZuinigeRijder/python-broadlink-smart-plug-mini) :sparkles:. + +Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable. + +In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR. + +Use the table of contents icon on the top left corner of this document to get to a specific section of this guide quickly. + +## New contributor guide + +To get an overview of the project, read the [README](README.md). Here are some resources to help you get started with open source contributions: + +- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) +- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git) +- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) +- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) + + + +## Issues + +### Create a new issue + +If you spot a problem with the docs, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). + +### Solve an issue + +Scan through our [existing issues](https://github.com/ZuinigeRijder/python-broadlink-smart-plug-mini) to find one that interests you. You can narrow down the search using `labels` as filters. As a general rule, we don’t assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix. + + +# Contributing + +Contributions are welcome, and they are greatly appreciated! Every little bit +helps, and credit will always be given. + +You can contribute in many ways: + +## Types of Contributions + +## Report Bugs + +Report bugs at https://github.com/ZuinigeRijder/python-broadlink-smart-plug-mini/issues. + +If you are reporting a bug, please include: + +* Your operating system name and version. +* Any details about your local setup that might be helpful in troubleshooting. +* Detailed steps to reproduce the bug. + +## Fix Bugs + +Look through the GitHub issues for bugs. Anything tagged with "bug" and "help +wanted" is open to whoever wants to implement it. + +## Implement Features + +Look through the GitHub issues for features. Anything tagged with "enhancement" +and "help wanted" is open to whoever wants to implement it. + +## Write Documentation + +hyundai_kia_connect_monitor could always use more documentation, in docstrings, or even on the web in blog posts, +articles, and such. + +## Submit Feedback + +The best way to send feedback is to file an issue at https://github.com/ZuinigeRijder/python-broadlink-smart-plug-mini/issues. + +If you are proposing a feature: + +* Explain in detail how it would work. +* Keep the scope as narrow as possible, to make it easier to implement. +* Remember that this is a volunteer-driven project, and that contributions + are welcome :) + +# Get Started! + +Ready to contribute? Here's how to set up `python-broadlink-smart-plug-mini` for local development. + +1. Fork the `python-broadlink-smart-plug-mini` repo on GitHub. + +2. Clone your fork locally + +``` + $ git clone https://github.com/your_name_here/python-broadlink-smart-plug-mini.git +``` + +3. Create a branch for local development + +``` + $ git checkout -b name-of-your-bugfix-or-feature +``` + + Now you can make your changes locally. + +4. Commit your changes and push your branch to GitHub + +``` + $ git add . + $ git commit -m "Your detailed description of your changes." + $ git push origin name-of-your-bugfix-or-feature +``` + +5. Submit a pull request through the GitHub website. + +# Pull Request Guidelines + +Before you submit a pull request, check that it meets these guidelines: + +1. The pull request should pass the included tests. +2. If the pull request adds functionality, the docs should be updated. Put + your new functionality into a function with a docstring, and add the + feature to the list in README.md. +3. The pull request should work for Python3.9 onwards + + diff --git a/README.md b/README.md index 919f20a..b64d694 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,484 @@ -# python-broadlink-smart-plug-mini -Get history kWh consumption of broadlink Smart Plug Mini (tested with SP3S-EU) using the broadlink server and store the kWh measurements in .csv file format +[python-broadlink-smart-plug-mini](#python-broadlink-smart-plug-mini) +- [Summary](#summary) +- [Quick start](#quick-start) +- [Background](#background) +- [python\_broadlink\_smart\_plug\_mini\_info.py](#python_broadlink_smart_plug_mini_infopy) + - [Example standard output of python\_broadlink\_smart\_plug\_mini\_info.py](#example-standard-output-of-python_broadlink_smart_plug_mini_infopy) +- [smart\_plug\_mini.cfg](#smart_plug_minicfg) +- [smart\_plug\_mini.py](#smart_plug_minipy) + - [Example standard output of smart\_plug\_mini.py](#example-standard-output-of-smart_plug_minipy) +- [Example crontab to run hourly on Raspberry Pi or another linux system](#example-crontab-to-run-hourly-on-raspberry-pi-or-another-linux-system) +- [Sniffing the e-Control App](#sniffing-the-e-control-app) + - [Month request/response](#month-requestresponse) + - [Month request](#month-request) + - [Month response](#month-response) + - [24 hour request/response](#24-hour-requestresponse) + - [24 hour request](#24-hour-request) + - [24 hour response](#24-hour-response) + - [Playing around with the server API](#playing-around-with-the-server-api) + +# Summary + +Get history kWh consumption of broadlink Smart Plug Mini (tested with model SP3S-EU) using the broadlink server and append later kWh measurements to a .csv file format per device. + +I have 2 times model Smart plug SP3S-EU and tested with those. +Probably this also works for other broadlink SP mini models. + +# Quick start + +- Make sure you have installed Python 3.9 or higher. [Here is more information about installing Python](https://realpython.com/installing-python/) +- see [requirements.txt](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/requirements.txt) for extra needed packages +- To get the MAC addresses for your Smart Plug Mini, run script [python_broadlink_smart_mini_info.py](#python_broadlink_smart_plug_mini_infopy) which uses the library [python-broadlink](https://github.com/mjg59/python-broadlink) +- Configure [smart_plug_mini.cfg](#smart_plug_minicfg), e.g. MAC addresses +- Run the [smart_plug_mini.py](#smart_plug_minipy) to generate per configured device a DEVICE_NAME.csv file from the configured datetime onwards + +# Background + +I am using 2 Smart plug SP3S-EU since 2018. The e-control App was limited in functionality/views. One of the strange things is e.g. the fact that you cannot see the month December of the year before the current year. So I was looking around if someone already had a better solution. I found the library [python-broadlink](https://github.com/mjg59/python-broadlink), but this was only for local access to your broadlink smart plug devices (get direct power measurements). So I decided to try to [sniff the e-Control app, see here](#sniffing-the-e-control-app). + +In short, it appeared way easier to get the historical data of my smart plug mini than expected. You do not even have to login, you only need the server name and MAC address of the smart plug mini. Oops, so simple ;-) + +So I started making [a simple standalone python script smart_plug_mini.py which appends the history data per hour in a csv file for each device](#smart_plug_minipy) and made [some parts configurable](#smart_plug_minicfg). +Also the tool writes the Day, Weeks, Months and Years summaries to separate .csv files per device. + +# python_broadlink_smart_plug_mini_info.py + +All the credits goes to [python-broadlink library](https://github.com/mjg59/python-broadlink). +This small program just outputs the information from the library of the detected smart plug devices. +The MAC addresses are needed for the configuration of the real tool. + +## Example standard output of python_broadlink_smart_plug_mini_info.py + +``` +C:\Users\Rick\git\broadlink>python python_broadlink_smart_plug_mini_info.py +device: Badkamer (Broadlink SP3S-EU 0x947a / 192.168.178.214:80 / 32:AA:31:72:63:43) +device: Lader (Broadlink SP3S-EU 0x947a / 192.168.178.234:80 / 32:AA:31:72:62:40) +``` + +Remarks for this example output: +- the MAC addresses are not my real SP3S-EU MAC addresses (I changed them, also in the rest of the examples) +- you have to configure the MAC addresses 32:AA:31:72:63:43 and 32:AA:31:72:62:40 in [smart_plug_mini.cfg](#smart_plug_minicfg) + +# smart_plug_mini.cfg + +[This configuration file](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/smart_plug_mini.cfg) needs to be configured once for the smart_plug_mini.py script. + +``` +[smart_plug_mini] +local_timezone = Europe/Amsterdam +server = https://0000000000000000000000007a940000rtasquery.ibroadlink.com +device_names = Room1, Room2 +device_macs = 32:AA:31:72:62:40, 32:AA:31:72:63:43 +report_types = fw_spminielec_v1, fw_spminielec_v1 +start_dates = 2023-01-01 00:00, 2023-01-01 00:00 +time_filter = "timefilter":{} +``` + +Remarks to the configuration: +- local_timezone: change into your local_timezone, see [Wiki column "TZ database name" for valid entries](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) +- server: this is the only server I am now aware of, but made it configurable in case you need another server +- device_names: comma separated list of names per device, if you have only one device, just mention one name without comma +- device_macs: comma separated list of MAC address per device +- report_types: comma separated list of report type per device, you do not need to change this +- start_dates: comma separated list of date per device you want to start filling the history in .csv files (note: when .csv file already exists, the start_date is ignored and last entry of csv file is taken for later measurements) +- time_filter: this is the timefilter for hourly measurements, maybe you want to play with this setting + +# smart_plug_mini.py + +Simple Python3 script retrieve (history) kWh values for the configured Smart Plug mini devices. + +Usage: +``` +python smart_plug_mini.py +``` +INPUTFILE: +- smart_plug_mini.cfg + +Standard output: +- progress of what is done + +OUTPUTFILES (for each configured DEVICE_NAME): +- DEVICE_NAME.csv: appended with later kWh data, [example](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/examples/Badkamer.csv) +- DEVICE_NAME.days.csv: days summary, [example](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/examples/Badkamer.days.csv) +- DEVICE_NAME.weeks.csv: weeks summary, [example](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/examples/Badkamer.weeks.csv) +- DEVICE_NAME.months.csv: months summary, [example](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/examples/Badkamer.months.csv) +- DEVICE_NAME.years.csv: years summary, [example](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/examples/Badkamer.years.csv) + + +## Example standard output of smart_plug_mini.py + +``` +C:\Users\Rick\git\broadlink>python smart_plug_mini.py +##### Lader.csv ###################################### +last line Lader.csv: 2023-02-04 12:00, 4349.84, 0.00, 0.00, 18.43, 0.02, 71.98 + 2023-02-04 12:00 +date_start local: 2023-02-04 13:00:00+01:00 +now local : 2023-02-04 14:12:00+01:00 +Lader: from 2023-02-04 13:00:00+01:00 to 2023-03-04 13:00:00+01:00 +Opening Lader.csv +Lader.csv: 2023-02-04 13:00, 4349.84, 0.00, 0.00, 18.43, 0.02, 71.98 +Lader.csv: 2023-02-04 14:00, 4349.84, 0.00, 0.00, 18.43, 0.02, 71.98 +Closing Lader.csv +##### Badkamer.csv ###################################### +last line Badkamer.csv: 2023-02-04 12:00, 649.65, 0.06, 0.52, 5.09, 3.13, 30.66 + 2023-02-04 12:00 +date_start local: 2023-02-04 13:00:00+01:00 +now local : 2023-02-04 14:12:00+01:00 +Badkamer: from 2023-02-04 13:00:00+01:00 to 2023-03-04 13:00:00+01:00 +Opening Badkamer.csv +Badkamer.csv: 2023-02-04 13:00, 649.76, 0.11, 0.63, 5.20, 3.24, 30.77 +Badkamer.csv: 2023-02-04 14:00, 649.76, 0.00, 0.63, 5.20, 3.24, 30.77 +Closing Badkamer.csv +``` + +Some remarks from this example: +- the Lader.csv and Badkamer.csv were already filled with data from 2018 onwards till 2023-02-04 12:00 localtime +- running this script again after 2 hours shows that only after this time (1 hour later) new history is requested and 2 new hourly measurements are added + +Example part of e.g. Badkamer.csv: +``` +Date, Cumulative kWh, Delta +kWh, Days +kWh, Weeks +kWh, Months +kWh, Years +kWh +..... +2023-02-02 21:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 22:00, 648.13, 0.30, 0.79, 3.57, 1.61, 29.14 +2023-02-02 23:00, 648.13, 0.00, 0.79, 3.57, 1.61, 29.14 +2023-02-03 00:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 01:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 02:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 03:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 04:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 05:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 06:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 07:00, 648.51, 0.38, 0.38, 3.95, 1.99, 29.52 +2023-02-03 08:00, 648.51, 0.00, 0.38, 3.95, 1.99, 29.52 +2023-02-03 09:00, 648.51, 0.00, 0.38, 3.95, 1.99, 29.52 +2023-02-03 10:00, 648.51, 0.00, 0.38, 3.95, 1.99, 29.52 +2023-02-03 11:00, 648.51, 0.00, 0.38, 3.95, 1.99, 29.52 +2023-02-03 12:00, 648.85, 0.34, 0.72, 4.29, 2.33, 29.86 +2023-02-03 13:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 14:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 15:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 16:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 17:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 18:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 19:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 20:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 21:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +``` + +Some remarks from this example: +- 2023-02-02 22:00 you see that 0.3 kWh has been used in one hour +- cumulative day value is increased to 0.79 kWh +- cumulative week value is increased to 3.57 kWh +- cumulative month value is increased to 1.61 kWh +- cumulative year value is increased to 29.14 kWh +- 2023-02-03 00:00 the day value is reset to 0 kWh (new day) + +A screenshot for [example spreadsheet Badkamer.xlsx](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/examples/Badkamer.xlsx) which has imported a larger Badkamer.csv: +- ![alt text](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/examples/Badkamer.xlsx.jpg) + +# Example crontab to run hourly on Raspberry Pi or another linux system + +Example script [run_smart_plug_mini_once.sh](https://raw.githubusercontent.com/ZuinigeRijder/python-broadlink-smart-plug-mini/main/examples/run_smart_plug_mini_once.sh) to run smart_plug_mini.py on a linux based system. + +Steps: +- create a directory smart_plug_mini in your home directory +- copy run_smart_plug_mini_once.sh, smart_plug_mini.cfg and smart_plug_mini.py in this smart_plug_mini directory +- change inside smart_plug_mini.cfg the smart_plug_mini settings +- chmod + x run_smart_plug_mini_once.sh + +Add the following line in your crontab -e to run it once per hour 9 minutes later (crontab -e): +``` +9 * * * * ~/smart_plug_mini/run_smart_plug_mini_once.sh >> ~/smart_plug_mini/run_smart_plug_mini_once.log 2>&1 +``` + + +# Sniffing the e-Control App + +For the ones who also want to be able to sniff the calls from e-Control the App, this is how I did it (do it at your own risk): + +- Installed NoxPlayer emulator in Windows 10 and emulate Android 5 +- Installed Burp Suite Community Edition on Windows 10 +- Then followed this guide without installing e-Control App yet: [Android App Traffic Decryption using Nox Player - Windows Guide](https://archive.ph/k1hIG) +- installed e-Control App and login with my credentials +- Enabled proxy and opened e-Control App and in the Burp Suite the decoded https requests/responses were available + +I was mainly interested in the "My Energy" information from the e-Control App. + +## Month request/response +### Month request + +``` +POST /dataservice/v2/device/stats HTTP/1.1 +Content-Length: 386 +Content-Type: text/plain; charset=UTF-8 +Host: 0000000000000000000000007a940000rtasquery.ibroadlink.com +Connection: close +Expect: 100-continue + +{ + "credentials": { + "userid": "123", + "loginsession": "456", + "licenseid": "e9a19a0e0d099eb8288d878687b4883a" + }, + "report": "fw_spminielec_v1", + "device": [ + { + "did": "0000000000000000000032aa31726240", + "start": "2022-12-31_00:00:00", + "end": "2023-01-31_23:59:00", + "params": [ + "elec" + ], + "timefilter": { + "timepoint": [ + "22:00:00", + "06:00:00" + ], + "loffset": "29m", + "roffset": "30m" + } + } + ] +} +``` + +Following observations: +- the date-time format is in the timezone "Asia/Shanghai", so the e-Control App converts from/to your local timezone +- params "elec" is apparently to get the cumulative kWh counter values +- the timefilter apparently specifies which values you will get back +- fw_spminielec_v1 is a report type, as mentioned in [this broadlink App SDK](https://docs.ibroadlink.com/public/appsdk_en/appsdk_05/) + +Mentioned types are: +- fw_currentstate_v1: Device attribute (default report) +- fw_energystatus_v1: History data (general electrical) +- fw_energystats_v1: Power measurements (general electrical) +- fw_spminielec_v1: SP mini power measurement +- fw_spminiswitch_v1: SP mini on/off history +- fw_s1push_v1: push notifications + +I did not try these, only used fw_spminielec_v1. + +### Month response + +``` +HTTP/1.1 100 Continue + +HTTP/1.1 200 OK +Server: nginx/1.4.6 (Ubuntu) +Date: Tue, 31 Jan 2023 20:52:00 GMT +Content-Type: text/plain; charset=utf-8 +Content-Length: 1257 +Connection: close + +{ + "status": 0, + "msg": "ok", + "report": "fw_spminielec_v1", + "table": [ + { + "did": "0000000000000000000032aa31726240", + "total": 22, + "cnt": 22, + "values": [ + { + "elec": 4299.56, + "occurtime": "2023-01-21_22:00:00" + }, + { + "elec": 4291.36, + "occurtime": "2023-01-21_06:00:00" + }, + { + "elec": 4320.54, + "occurtime": "2023-01-22_22:00:00" + }, + { + "elec": 4299.58, + "occurtime": "2023-01-22_06:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-23_22:00:00" + }, + { + "elec": 4320.56, + "occurtime": "2023-01-23_06:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-24_22:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-24_06:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-25_22:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-25_06:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-26_22:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-26_06:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-27_22:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-27_06:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-28_22:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-28_06:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-29_22:00:00" + }, + { + "elec": 4320.57, + "occurtime": "2023-01-29_06:00:00" + }, + { + "elec": 4349.81, + "occurtime": "2023-01-30_22:00:00" + }, + { + "elec": 4331.41, + "occurtime": "2023-01-30_06:00:00" + }, + { + "elec": 4349.81, + "occurtime": "2023-01-31_22:00:00" + }, + { + "elec": 4349.81, + "occurtime": "2023-01-31_06:00:00" + } + ] + } + ] +} +``` + +Following observations: +- "elec" is the cumulative kWh since the beginning of configuring/using the device +- the "occurtime" is in the timezone "Asia/Shanghai", so the e-Control App converts from/to your local timezone +- the timefilter apparently steers to give back only at 6:00 and 22:00 Asia/SHanghai time + +## 24 hour request/response + +### 24 hour request + +``` +POST /dataservice/v2/device/status HTTP/1.1 +Content-Length: 320 +Content-Type: text/plain; charset=UTF-8 +Host: 0000000000000000000000007a940000rtasquery.ibroadlink.com +Connection: close +Expect: 100-continue + +{ + "credentials": { + "userid": "123", + "loginsession": "456", + "licenseid": "e9a19a0e0d099eb8288d878687b4883a" + }, + "report": "fw_spminielec_v1", + "device": [ + { + "did": "0000000000000000000032aa31726240", + "start": "2023-01-31_05:09:58", + "end": "2023-02-01_05:09:58", + "params": [ + "power" + ], + "timefilter": {} + } + ] +} +``` + +Following observations: +- the params "power" is given, which is different than the "elec" from the month view +- an empty timefilter is given + +### 24 hour response + +``` +HTTP/1.1 100 Continue + +HTTP/1.1 200 OK +Server: nginx/1.4.6 (Ubuntu) +Date: Tue, 31 Jan 2023 20:57:04 GMT +Content-Type: text/plain; charset=utf-8 +Connection: close +Content-Length: 13366 + +{ + "status": 0, + "msg": "ok", + "report": "fw_spminielec_v1", + "table": [ + { + "did": "0000000000000000000034ea34796940", + "total": 283, + "cnt": 283, + "values": [ + { + "occurtime": "2023-01-31_05:10:00", + "power": 0 + }, + { + "occurtime": "2023-01-31_05:15:00", + "power": 0 + }, + { + "occurtime": "2023-01-31_05:20:00", + "power": 0 + }, + { + "occurtime": "2023-01-31_05:25:00", + "power": 0 + }, + { + "occurtime": "2023-01-31_05:30:00", + "power": 0 + }, + ..... + } + ] + } + ] +} +``` + +Following observations: +- Apparently the "power" without timefilter gives back the power (kW) per 5 minutes +- This power view is less interesting for my purpose + +## Playing around with the server API + +- it appeared that "did" was the MAC adres, zero padded, lower case and with ":" stripped: "0000000000000000000032aa31726240" +- the credentials did contain a userid, loginsession and licenseid, so I thought I needed to login to get the first 2, but after playing around, it turned out that only licenseid was mandatory, the userid and loginsession can be left out, the server did not check these. Probably because the specific Host does not have access to this information and is only for giving back fast history information. +- apparently the licenceid and MAC address decoded "did" is all you need! +- when "elec" and empty timefilter is given as parameter, you get back the cumulative kWh value per hour, perfect +- I do not know if the host 0000000000000000000000007a940000rtasquery.ibroadlink.com is different for other countries or other devices, but apparently the server stores the cumulative values for my SP3S-EU devices (Europe) +- If another server is needed, you have to sniff yourself ;-) +- No problem to ask for a month of data without timefilter for every hour +- The e-Control App restricts you in asking the month values for only the current year, but I could go back for the information from the beginning till now, so all data is kept on the broadlink server since the beginning! \ No newline at end of file diff --git a/examples/Badkamer.csv b/examples/Badkamer.csv new file mode 100644 index 0000000..820bd56 --- /dev/null +++ b/examples/Badkamer.csv @@ -0,0 +1,837 @@ +Date, Cumulative kWh, Delta +kWh, Days +kWh, Weeks +kWh, Months +kWh, Years +kWh +2022-12-31 17:00, 618.83, 0.29, 0.59, 6.29, 34.84, 169.73 +2022-12-31 18:00, 618.83, 0.00, 0.59, 6.29, 34.84, 169.73 +2022-12-31 19:00, 618.99, 0.16, 0.75, 6.45, 35.00, 169.89 +2022-12-31 20:00, 618.99, 0.00, 0.75, 6.45, 35.00, 169.89 +2022-12-31 21:00, 618.99, 0.00, 0.75, 6.45, 35.00, 169.89 +2022-12-31 22:00, 618.99, 0.00, 0.75, 6.45, 35.00, 169.89 +2022-12-31 23:00, 618.99, 0.00, 0.75, 6.45, 35.00, 169.89 +2023-01-01 00:00, 619.26, 0.27, 0.27, 0.27, 0.27, 0.27 +2023-01-01 01:00, 619.26, 0.00, 0.27, 0.27, 0.27, 0.27 +2023-01-01 02:00, 619.26, 0.00, 0.27, 0.27, 0.27, 0.27 +2023-01-01 03:00, 619.26, 0.00, 0.27, 0.27, 0.27, 0.27 +2023-01-01 04:00, 619.26, 0.00, 0.27, 0.27, 0.27, 0.27 +2023-01-01 05:00, 619.26, 0.00, 0.27, 0.27, 0.27, 0.27 +2023-01-01 06:00, 619.26, 0.00, 0.27, 0.27, 0.27, 0.27 +2023-01-01 07:00, 619.42, 0.16, 0.43, 0.43, 0.43, 0.43 +2023-01-01 08:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 09:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 10:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 11:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 12:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 13:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 14:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 15:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 16:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 17:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 18:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 19:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 20:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 21:00, 619.42, 0.00, 0.43, 0.43, 0.43, 0.43 +2023-01-01 22:00, 619.68, 0.26, 0.69, 0.69, 0.69, 0.69 +2023-01-01 23:00, 619.68, 0.00, 0.69, 0.69, 0.69, 0.69 +2023-01-02 00:00, 619.68, 0.00, 0.00, 0.00, 0.69, 0.69 +2023-01-02 01:00, 619.78, 0.10, 0.10, 0.10, 0.79, 0.79 +2023-01-02 02:00, 619.78, 0.00, 0.10, 0.10, 0.79, 0.79 +2023-01-02 03:00, 619.79, 0.01, 0.11, 0.11, 0.80, 0.80 +2023-01-02 04:00, 619.79, 0.00, 0.11, 0.11, 0.80, 0.80 +2023-01-02 05:00, 619.79, 0.00, 0.11, 0.11, 0.80, 0.80 +2023-01-02 06:00, 619.79, 0.00, 0.11, 0.11, 0.80, 0.80 +2023-01-02 07:00, 619.92, 0.13, 0.24, 0.24, 0.93, 0.93 +2023-01-02 08:00, 619.92, 0.00, 0.24, 0.24, 0.93, 0.93 +2023-01-02 09:00, 619.92, 0.00, 0.24, 0.24, 0.93, 0.93 +2023-01-02 10:00, 619.92, 0.00, 0.24, 0.24, 0.93, 0.93 +2023-01-02 11:00, 619.93, 0.01, 0.25, 0.25, 0.94, 0.94 +2023-01-02 12:00, 619.93, 0.00, 0.25, 0.25, 0.94, 0.94 +2023-01-02 13:00, 619.93, 0.00, 0.25, 0.25, 0.94, 0.94 +2023-01-02 14:00, 619.93, 0.00, 0.25, 0.25, 0.94, 0.94 +2023-01-02 15:00, 619.93, 0.00, 0.25, 0.25, 0.94, 0.94 +2023-01-02 16:00, 619.94, 0.01, 0.26, 0.26, 0.95, 0.95 +2023-01-02 17:00, 619.94, 0.00, 0.26, 0.26, 0.95, 0.95 +2023-01-02 18:00, 619.94, 0.00, 0.26, 0.26, 0.95, 0.95 +2023-01-02 19:00, 619.94, 0.00, 0.26, 0.26, 0.95, 0.95 +2023-01-02 20:00, 619.94, 0.00, 0.26, 0.26, 0.95, 0.95 +2023-01-02 21:00, 619.95, 0.01, 0.27, 0.27, 0.96, 0.96 +2023-01-02 22:00, 620.05, 0.10, 0.37, 0.37, 1.06, 1.06 +2023-01-02 23:00, 620.05, 0.00, 0.37, 0.37, 1.06, 1.06 +2023-01-03 00:00, 620.05, 0.00, 0.00, 0.37, 1.06, 1.06 +2023-01-03 01:00, 620.05, 0.00, 0.00, 0.37, 1.06, 1.06 +2023-01-03 02:00, 620.06, 0.01, 0.01, 0.38, 1.07, 1.07 +2023-01-03 03:00, 620.06, 0.00, 0.01, 0.38, 1.07, 1.07 +2023-01-03 04:00, 620.06, 0.00, 0.01, 0.38, 1.07, 1.07 +2023-01-03 05:00, 620.06, 0.00, 0.01, 0.38, 1.07, 1.07 +2023-01-03 06:00, 620.18, 0.12, 0.13, 0.50, 1.19, 1.19 +2023-01-03 07:00, 620.28, 0.10, 0.23, 0.60, 1.29, 1.29 +2023-01-03 08:00, 620.28, 0.00, 0.23, 0.60, 1.29, 1.29 +2023-01-03 09:00, 620.28, 0.00, 0.23, 0.60, 1.29, 1.29 +2023-01-03 10:00, 620.28, 0.00, 0.23, 0.60, 1.29, 1.29 +2023-01-03 11:00, 620.29, 0.01, 0.24, 0.61, 1.30, 1.30 +2023-01-03 12:00, 620.29, 0.00, 0.24, 0.61, 1.30, 1.30 +2023-01-03 13:00, 620.29, 0.00, 0.24, 0.61, 1.30, 1.30 +2023-01-03 14:00, 620.29, 0.00, 0.24, 0.61, 1.30, 1.30 +2023-01-03 15:00, 620.29, 0.00, 0.24, 0.61, 1.30, 1.30 +2023-01-03 16:00, 620.29, 0.00, 0.24, 0.61, 1.30, 1.30 +2023-01-03 17:00, 620.30, 0.01, 0.25, 0.62, 1.31, 1.31 +2023-01-03 18:00, 620.42, 0.12, 0.37, 0.74, 1.43, 1.43 +2023-01-03 19:00, 620.42, 0.00, 0.37, 0.74, 1.43, 1.43 +2023-01-03 20:00, 620.42, 0.00, 0.37, 0.74, 1.43, 1.43 +2023-01-03 21:00, 620.42, 0.00, 0.37, 0.74, 1.43, 1.43 +2023-01-03 22:00, 620.68, 0.26, 0.63, 1.00, 1.69, 1.69 +2023-01-03 23:00, 620.68, 0.00, 0.63, 1.00, 1.69, 1.69 +2023-01-04 00:00, 620.68, 0.00, 0.00, 1.00, 1.69, 1.69 +2023-01-04 01:00, 620.68, 0.00, 0.00, 1.00, 1.69, 1.69 +2023-01-04 02:00, 620.68, 0.00, 0.00, 1.00, 1.69, 1.69 +2023-01-04 03:00, 620.68, 0.00, 0.00, 1.00, 1.69, 1.69 +2023-01-04 04:00, 620.68, 0.00, 0.00, 1.00, 1.69, 1.69 +2023-01-04 05:00, 620.68, 0.00, 0.00, 1.00, 1.69, 1.69 +2023-01-04 06:00, 620.68, 0.00, 0.00, 1.00, 1.69, 1.69 +2023-01-04 07:00, 620.87, 0.19, 0.19, 1.19, 1.88, 1.88 +2023-01-04 08:00, 620.96, 0.09, 0.28, 1.28, 1.97, 1.97 +2023-01-04 09:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 10:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 11:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 12:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 13:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 14:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 15:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 16:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 17:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 18:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 19:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 20:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 21:00, 620.96, 0.00, 0.28, 1.28, 1.97, 1.97 +2023-01-04 22:00, 621.31, 0.35, 0.63, 1.63, 2.32, 2.32 +2023-01-04 23:00, 621.31, 0.00, 0.63, 1.63, 2.32, 2.32 +2023-01-05 00:00, 621.31, 0.00, 0.00, 1.63, 2.32, 2.32 +2023-01-05 01:00, 621.31, 0.00, 0.00, 1.63, 2.32, 2.32 +2023-01-05 02:00, 621.31, 0.00, 0.00, 1.63, 2.32, 2.32 +2023-01-05 03:00, 621.31, 0.00, 0.00, 1.63, 2.32, 2.32 +2023-01-05 04:00, 621.31, 0.00, 0.00, 1.63, 2.32, 2.32 +2023-01-05 05:00, 621.31, 0.00, 0.00, 1.63, 2.32, 2.32 +2023-01-05 06:00, 621.31, 0.00, 0.00, 1.63, 2.32, 2.32 +2023-01-05 07:00, 621.46, 0.15, 0.15, 1.78, 2.47, 2.47 +2023-01-05 08:00, 621.46, 0.00, 0.15, 1.78, 2.47, 2.47 +2023-01-05 09:00, 621.60, 0.14, 0.29, 1.92, 2.61, 2.61 +2023-01-05 10:00, 621.60, 0.00, 0.29, 1.92, 2.61, 2.61 +2023-01-05 11:00, 621.60, 0.00, 0.29, 1.92, 2.61, 2.61 +2023-01-05 12:00, 621.60, 0.00, 0.29, 1.92, 2.61, 2.61 +2023-01-05 13:00, 621.60, 0.00, 0.29, 1.92, 2.61, 2.61 +2023-01-05 14:00, 621.60, 0.00, 0.29, 1.92, 2.61, 2.61 +2023-01-05 15:00, 621.60, 0.00, 0.29, 1.92, 2.61, 2.61 +2023-01-05 16:00, 621.60, 0.00, 0.29, 1.92, 2.61, 2.61 +2023-01-05 17:00, 621.60, 0.00, 0.29, 1.92, 2.61, 2.61 +2023-01-05 18:00, 621.66, 0.06, 0.35, 1.98, 2.67, 2.67 +2023-01-05 19:00, 621.66, 0.00, 0.35, 1.98, 2.67, 2.67 +2023-01-05 20:00, 621.66, 0.00, 0.35, 1.98, 2.67, 2.67 +2023-01-05 21:00, 621.95, 0.29, 0.64, 2.27, 2.96, 2.96 +2023-01-05 22:00, 621.95, 0.00, 0.64, 2.27, 2.96, 2.96 +2023-01-05 23:00, 621.95, 0.00, 0.64, 2.27, 2.96, 2.96 +2023-01-06 00:00, 621.95, 0.00, 0.00, 2.27, 2.96, 2.96 +2023-01-06 01:00, 621.95, 0.00, 0.00, 2.27, 2.96, 2.96 +2023-01-06 02:00, 621.95, 0.00, 0.00, 2.27, 2.96, 2.96 +2023-01-06 03:00, 621.95, 0.00, 0.00, 2.27, 2.96, 2.96 +2023-01-06 04:00, 621.95, 0.00, 0.00, 2.27, 2.96, 2.96 +2023-01-06 05:00, 621.95, 0.00, 0.00, 2.27, 2.96, 2.96 +2023-01-06 06:00, 621.95, 0.00, 0.00, 2.27, 2.96, 2.96 +2023-01-06 07:00, 622.19, 0.24, 0.24, 2.51, 3.20, 3.20 +2023-01-06 08:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 09:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 10:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 11:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 12:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 13:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 14:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 15:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 16:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 17:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 18:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 19:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 20:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 21:00, 622.19, 0.00, 0.24, 2.51, 3.20, 3.20 +2023-01-06 22:00, 622.48, 0.29, 0.53, 2.80, 3.49, 3.49 +2023-01-06 23:00, 622.48, 0.00, 0.53, 2.80, 3.49, 3.49 +2023-01-07 00:00, 622.48, 0.00, 0.00, 2.80, 3.49, 3.49 +2023-01-07 01:00, 622.48, 0.00, 0.00, 2.80, 3.49, 3.49 +2023-01-07 02:00, 622.48, 0.00, 0.00, 2.80, 3.49, 3.49 +2023-01-07 03:00, 622.48, 0.00, 0.00, 2.80, 3.49, 3.49 +2023-01-07 04:00, 622.48, 0.00, 0.00, 2.80, 3.49, 3.49 +2023-01-07 05:00, 622.48, 0.00, 0.00, 2.80, 3.49, 3.49 +2023-01-07 06:00, 622.48, 0.00, 0.00, 2.80, 3.49, 3.49 +2023-01-07 07:00, 622.72, 0.24, 0.24, 3.04, 3.73, 3.73 +2023-01-07 08:00, 622.82, 0.10, 0.34, 3.14, 3.83, 3.83 +2023-01-07 09:00, 622.82, 0.00, 0.34, 3.14, 3.83, 3.83 +2023-01-07 10:00, 622.82, 0.00, 0.34, 3.14, 3.83, 3.83 +2023-01-07 11:00, 622.82, 0.00, 0.34, 3.14, 3.83, 3.83 +2023-01-07 12:00, 622.82, 0.00, 0.34, 3.14, 3.83, 3.83 +2023-01-07 13:00, 622.82, 0.00, 0.34, 3.14, 3.83, 3.83 +2023-01-07 14:00, 622.82, 0.00, 0.34, 3.14, 3.83, 3.83 +2023-01-07 15:00, 622.82, 0.00, 0.34, 3.14, 3.83, 3.83 +2023-01-07 16:00, 622.87, 0.05, 0.39, 3.19, 3.88, 3.88 +2023-01-07 17:00, 622.87, 0.00, 0.39, 3.19, 3.88, 3.88 +2023-01-07 18:00, 622.87, 0.00, 0.39, 3.19, 3.88, 3.88 +2023-01-07 19:00, 622.87, 0.00, 0.39, 3.19, 3.88, 3.88 +2023-01-07 20:00, 622.87, 0.00, 0.39, 3.19, 3.88, 3.88 +2023-01-07 21:00, 622.87, 0.00, 0.39, 3.19, 3.88, 3.88 +2023-01-07 22:00, 622.95, 0.08, 0.47, 3.27, 3.96, 3.96 +2023-01-07 23:00, 622.98, 0.03, 0.50, 3.30, 3.99, 3.99 +2023-01-08 00:00, 622.98, 0.00, 0.00, 3.30, 3.99, 3.99 +2023-01-08 01:00, 622.98, 0.00, 0.00, 3.30, 3.99, 3.99 +2023-01-08 02:00, 622.98, 0.00, 0.00, 3.30, 3.99, 3.99 +2023-01-08 03:00, 622.98, 0.00, 0.00, 3.30, 3.99, 3.99 +2023-01-08 04:00, 622.99, 0.01, 0.01, 3.31, 4.00, 4.00 +2023-01-08 05:00, 622.99, 0.00, 0.01, 3.31, 4.00, 4.00 +2023-01-08 06:00, 622.99, 0.00, 0.01, 3.31, 4.00, 4.00 +2023-01-08 07:00, 622.99, 0.00, 0.01, 3.31, 4.00, 4.00 +2023-01-08 08:00, 623.18, 0.19, 0.20, 3.50, 4.19, 4.19 +2023-01-08 09:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 10:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 11:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 12:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 13:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 14:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 15:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 16:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 17:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 18:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 19:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 20:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 21:00, 623.18, 0.00, 0.20, 3.50, 4.19, 4.19 +2023-01-08 22:00, 623.52, 0.34, 0.54, 3.84, 4.53, 4.53 +2023-01-08 23:00, 623.52, 0.00, 0.54, 3.84, 4.53, 4.53 +2023-01-09 00:00, 623.52, 0.00, 0.00, 0.00, 4.53, 4.53 +2023-01-09 01:00, 623.52, 0.00, 0.00, 0.00, 4.53, 4.53 +2023-01-09 02:00, 623.52, 0.00, 0.00, 0.00, 4.53, 4.53 +2023-01-09 03:00, 623.52, 0.00, 0.00, 0.00, 4.53, 4.53 +2023-01-09 04:00, 623.52, 0.00, 0.00, 0.00, 4.53, 4.53 +2023-01-09 05:00, 623.52, 0.00, 0.00, 0.00, 4.53, 4.53 +2023-01-09 06:00, 623.52, 0.00, 0.00, 0.00, 4.53, 4.53 +2023-01-09 07:00, 623.74, 0.22, 0.22, 0.22, 4.75, 4.75 +2023-01-09 08:00, 623.93, 0.19, 0.41, 0.41, 4.94, 4.94 +2023-01-09 09:00, 623.93, 0.00, 0.41, 0.41, 4.94, 4.94 +2023-01-09 10:00, 623.93, 0.00, 0.41, 0.41, 4.94, 4.94 +2023-01-09 11:00, 623.93, 0.00, 0.41, 0.41, 4.94, 4.94 +2023-01-09 12:00, 623.93, 0.00, 0.41, 0.41, 4.94, 4.94 +2023-01-09 13:00, 624.16, 0.23, 0.64, 0.64, 5.17, 5.17 +2023-01-09 14:00, 624.16, 0.00, 0.64, 0.64, 5.17, 5.17 +2023-01-09 15:00, 624.16, 0.00, 0.64, 0.64, 5.17, 5.17 +2023-01-09 16:00, 624.16, 0.00, 0.64, 0.64, 5.17, 5.17 +2023-01-09 17:00, 624.16, 0.00, 0.64, 0.64, 5.17, 5.17 +2023-01-09 18:00, 624.16, 0.00, 0.64, 0.64, 5.17, 5.17 +2023-01-09 19:00, 624.16, 0.00, 0.64, 0.64, 5.17, 5.17 +2023-01-09 20:00, 624.16, 0.00, 0.64, 0.64, 5.17, 5.17 +2023-01-09 21:00, 624.16, 0.00, 0.64, 0.64, 5.17, 5.17 +2023-01-09 22:00, 624.47, 0.31, 0.95, 0.95, 5.48, 5.48 +2023-01-09 23:00, 624.47, 0.00, 0.95, 0.95, 5.48, 5.48 +2023-01-10 00:00, 624.47, 0.00, 0.00, 0.95, 5.48, 5.48 +2023-01-10 01:00, 624.47, 0.00, 0.00, 0.95, 5.48, 5.48 +2023-01-10 02:00, 624.47, 0.00, 0.00, 0.95, 5.48, 5.48 +2023-01-10 03:00, 624.47, 0.00, 0.00, 0.95, 5.48, 5.48 +2023-01-10 04:00, 624.47, 0.00, 0.00, 0.95, 5.48, 5.48 +2023-01-10 05:00, 624.47, 0.00, 0.00, 0.95, 5.48, 5.48 +2023-01-10 06:00, 624.47, 0.00, 0.00, 0.95, 5.48, 5.48 +2023-01-10 07:00, 624.72, 0.25, 0.25, 1.20, 5.73, 5.73 +2023-01-10 08:00, 624.72, 0.00, 0.25, 1.20, 5.73, 5.73 +2023-01-10 09:00, 624.72, 0.00, 0.25, 1.20, 5.73, 5.73 +2023-01-10 10:00, 624.82, 0.10, 0.35, 1.30, 5.83, 5.83 +2023-01-10 11:00, 624.82, 0.00, 0.35, 1.30, 5.83, 5.83 +2023-01-10 12:00, 624.82, 0.00, 0.35, 1.30, 5.83, 5.83 +2023-01-10 13:00, 624.83, 0.01, 0.36, 1.31, 5.84, 5.84 +2023-01-10 14:00, 624.83, 0.00, 0.36, 1.31, 5.84, 5.84 +2023-01-10 15:00, 624.83, 0.00, 0.36, 1.31, 5.84, 5.84 +2023-01-10 16:00, 624.83, 0.00, 0.36, 1.31, 5.84, 5.84 +2023-01-10 17:00, 624.83, 0.00, 0.36, 1.31, 5.84, 5.84 +2023-01-10 18:00, 624.83, 0.00, 0.36, 1.31, 5.84, 5.84 +2023-01-10 19:00, 624.83, 0.00, 0.36, 1.31, 5.84, 5.84 +2023-01-10 20:00, 624.83, 0.00, 0.36, 1.31, 5.84, 5.84 +2023-01-10 21:00, 624.83, 0.00, 0.36, 1.31, 5.84, 5.84 +2023-01-10 22:00, 625.14, 0.31, 0.67, 1.62, 6.15, 6.15 +2023-01-10 23:00, 625.14, 0.00, 0.67, 1.62, 6.15, 6.15 +2023-01-11 00:00, 625.14, 0.00, 0.00, 1.62, 6.15, 6.15 +2023-01-11 01:00, 625.14, 0.00, 0.00, 1.62, 6.15, 6.15 +2023-01-11 02:00, 625.14, 0.00, 0.00, 1.62, 6.15, 6.15 +2023-01-11 03:00, 625.14, 0.00, 0.00, 1.62, 6.15, 6.15 +2023-01-11 04:00, 625.14, 0.00, 0.00, 1.62, 6.15, 6.15 +2023-01-11 05:00, 625.14, 0.00, 0.00, 1.62, 6.15, 6.15 +2023-01-11 06:00, 625.14, 0.00, 0.00, 1.62, 6.15, 6.15 +2023-01-11 07:00, 625.32, 0.18, 0.18, 1.80, 6.33, 6.33 +2023-01-11 08:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 09:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 10:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 11:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 12:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 13:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 14:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 15:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 16:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 17:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 18:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 19:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 20:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 21:00, 625.32, 0.00, 0.18, 1.80, 6.33, 6.33 +2023-01-11 22:00, 625.61, 0.29, 0.47, 2.09, 6.62, 6.62 +2023-01-11 23:00, 625.61, 0.00, 0.47, 2.09, 6.62, 6.62 +2023-01-12 00:00, 625.61, 0.00, 0.00, 2.09, 6.62, 6.62 +2023-01-12 01:00, 625.61, 0.00, 0.00, 2.09, 6.62, 6.62 +2023-01-12 02:00, 625.61, 0.00, 0.00, 2.09, 6.62, 6.62 +2023-01-12 03:00, 625.61, 0.00, 0.00, 2.09, 6.62, 6.62 +2023-01-12 04:00, 625.61, 0.00, 0.00, 2.09, 6.62, 6.62 +2023-01-12 05:00, 625.61, 0.00, 0.00, 2.09, 6.62, 6.62 +2023-01-12 06:00, 625.61, 0.00, 0.00, 2.09, 6.62, 6.62 +2023-01-12 07:00, 625.88, 0.27, 0.27, 2.36, 6.89, 6.89 +2023-01-12 08:00, 626.11, 0.23, 0.50, 2.59, 7.12, 7.12 +2023-01-12 09:00, 626.39, 0.28, 0.78, 2.87, 7.40, 7.40 +2023-01-12 10:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 11:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 12:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 13:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 14:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 15:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 16:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 17:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 18:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 19:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 20:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 21:00, 626.39, 0.00, 0.78, 2.87, 7.40, 7.40 +2023-01-12 22:00, 626.69, 0.30, 1.08, 3.17, 7.70, 7.70 +2023-01-12 23:00, 626.69, 0.00, 1.08, 3.17, 7.70, 7.70 +2023-01-13 00:00, 626.69, 0.00, 0.00, 3.17, 7.70, 7.70 +2023-01-13 01:00, 626.69, 0.00, 0.00, 3.17, 7.70, 7.70 +2023-01-13 02:00, 626.69, 0.00, 0.00, 3.17, 7.70, 7.70 +2023-01-13 03:00, 626.69, 0.00, 0.00, 3.17, 7.70, 7.70 +2023-01-13 04:00, 626.69, 0.00, 0.00, 3.17, 7.70, 7.70 +2023-01-13 05:00, 626.69, 0.00, 0.00, 3.17, 7.70, 7.70 +2023-01-13 06:00, 626.69, 0.00, 0.00, 3.17, 7.70, 7.70 +2023-01-13 07:00, 626.94, 0.25, 0.25, 3.42, 7.95, 7.95 +2023-01-13 08:00, 627.08, 0.14, 0.39, 3.56, 8.09, 8.09 +2023-01-13 09:00, 627.08, 0.00, 0.39, 3.56, 8.09, 8.09 +2023-01-13 10:00, 627.08, 0.00, 0.39, 3.56, 8.09, 8.09 +2023-01-13 11:00, 627.08, 0.00, 0.39, 3.56, 8.09, 8.09 +2023-01-13 12:00, 627.08, 0.00, 0.39, 3.56, 8.09, 8.09 +2023-01-13 13:00, 627.08, 0.00, 0.39, 3.56, 8.09, 8.09 +2023-01-13 14:00, 627.18, 0.10, 0.49, 3.66, 8.19, 8.19 +2023-01-13 15:00, 627.18, 0.00, 0.49, 3.66, 8.19, 8.19 +2023-01-13 16:00, 627.18, 0.00, 0.49, 3.66, 8.19, 8.19 +2023-01-13 17:00, 627.18, 0.00, 0.49, 3.66, 8.19, 8.19 +2023-01-13 18:00, 627.18, 0.00, 0.49, 3.66, 8.19, 8.19 +2023-01-13 19:00, 627.18, 0.00, 0.49, 3.66, 8.19, 8.19 +2023-01-13 20:00, 627.18, 0.00, 0.49, 3.66, 8.19, 8.19 +2023-01-13 21:00, 627.18, 0.00, 0.49, 3.66, 8.19, 8.19 +2023-01-13 22:00, 627.49, 0.31, 0.80, 3.97, 8.50, 8.50 +2023-01-13 23:00, 627.49, 0.00, 0.80, 3.97, 8.50, 8.50 +2023-01-14 00:00, 627.49, 0.00, 0.00, 3.97, 8.50, 8.50 +2023-01-14 01:00, 627.49, 0.00, 0.00, 3.97, 8.50, 8.50 +2023-01-14 02:00, 627.49, 0.00, 0.00, 3.97, 8.50, 8.50 +2023-01-14 03:00, 627.49, 0.00, 0.00, 3.97, 8.50, 8.50 +2023-01-14 04:00, 627.49, 0.00, 0.00, 3.97, 8.50, 8.50 +2023-01-14 05:00, 627.49, 0.00, 0.00, 3.97, 8.50, 8.50 +2023-01-14 06:00, 627.49, 0.00, 0.00, 3.97, 8.50, 8.50 +2023-01-14 07:00, 627.87, 0.38, 0.38, 4.35, 8.88, 8.88 +2023-01-14 08:00, 628.18, 0.31, 0.69, 4.66, 9.19, 9.19 +2023-01-14 09:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 10:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 11:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 12:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 13:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 14:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 15:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 16:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 17:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 18:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 19:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 20:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 21:00, 628.18, 0.00, 0.69, 4.66, 9.19, 9.19 +2023-01-14 22:00, 628.50, 0.32, 1.01, 4.98, 9.51, 9.51 +2023-01-14 23:00, 628.54, 0.04, 1.05, 5.02, 9.55, 9.55 +2023-01-15 00:00, 628.54, 0.00, 0.00, 5.02, 9.55, 9.55 +2023-01-15 01:00, 628.54, 0.00, 0.00, 5.02, 9.55, 9.55 +2023-01-15 02:00, 628.54, 0.00, 0.00, 5.02, 9.55, 9.55 +2023-01-15 03:00, 628.54, 0.00, 0.00, 5.02, 9.55, 9.55 +2023-01-15 04:00, 628.54, 0.00, 0.00, 5.02, 9.55, 9.55 +2023-01-15 05:00, 628.54, 0.00, 0.00, 5.02, 9.55, 9.55 +2023-01-15 06:00, 628.54, 0.00, 0.00, 5.02, 9.55, 9.55 +2023-01-15 07:00, 629.20, 0.66, 0.66, 5.68, 10.21, 10.21 +2023-01-15 08:00, 629.39, 0.19, 0.85, 5.87, 10.40, 10.40 +2023-01-15 09:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 10:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 11:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 12:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 13:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 14:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 15:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 16:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 17:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 18:00, 629.39, 0.00, 0.85, 5.87, 10.40, 10.40 +2023-01-15 19:00, 629.60, 0.21, 1.06, 6.08, 10.61, 10.61 +2023-01-15 20:00, 629.60, 0.00, 1.06, 6.08, 10.61, 10.61 +2023-01-15 21:00, 629.60, 0.00, 1.06, 6.08, 10.61, 10.61 +2023-01-15 22:00, 629.60, 0.00, 1.06, 6.08, 10.61, 10.61 +2023-01-15 23:00, 629.87, 0.27, 1.33, 6.35, 10.88, 10.88 +2023-01-16 00:00, 629.87, 0.00, 0.00, 0.00, 10.88, 10.88 +2023-01-16 01:00, 629.87, 0.00, 0.00, 0.00, 10.88, 10.88 +2023-01-16 02:00, 629.87, 0.00, 0.00, 0.00, 10.88, 10.88 +2023-01-16 03:00, 629.87, 0.00, 0.00, 0.00, 10.88, 10.88 +2023-01-16 04:00, 629.87, 0.00, 0.00, 0.00, 10.88, 10.88 +2023-01-16 05:00, 629.87, 0.00, 0.00, 0.00, 10.88, 10.88 +2023-01-16 06:00, 629.87, 0.00, 0.00, 0.00, 10.88, 10.88 +2023-01-16 07:00, 630.05, 0.18, 0.18, 0.18, 11.06, 11.06 +2023-01-16 08:00, 630.32, 0.27, 0.45, 0.45, 11.33, 11.33 +2023-01-16 09:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 10:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 11:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 12:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 13:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 14:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 15:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 16:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 17:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 18:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 19:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 20:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 21:00, 630.32, 0.00, 0.45, 0.45, 11.33, 11.33 +2023-01-16 22:00, 630.68, 0.36, 0.81, 0.81, 11.69, 11.69 +2023-01-16 23:00, 630.68, 0.00, 0.81, 0.81, 11.69, 11.69 +2023-01-17 00:00, 630.68, 0.00, 0.00, 0.81, 11.69, 11.69 +2023-01-17 01:00, 630.68, 0.00, 0.00, 0.81, 11.69, 11.69 +2023-01-17 02:00, 630.68, 0.00, 0.00, 0.81, 11.69, 11.69 +2023-01-17 03:00, 630.68, 0.00, 0.00, 0.81, 11.69, 11.69 +2023-01-17 04:00, 630.68, 0.00, 0.00, 0.81, 11.69, 11.69 +2023-01-17 05:00, 630.68, 0.00, 0.00, 0.81, 11.69, 11.69 +2023-01-17 06:00, 630.86, 0.18, 0.18, 0.99, 11.87, 11.87 +2023-01-17 07:00, 630.86, 0.00, 0.18, 0.99, 11.87, 11.87 +2023-01-17 08:00, 630.96, 0.10, 0.28, 1.09, 11.97, 11.97 +2023-01-17 09:00, 630.96, 0.00, 0.28, 1.09, 11.97, 11.97 +2023-01-17 10:00, 630.96, 0.00, 0.28, 1.09, 11.97, 11.97 +2023-01-17 11:00, 630.96, 0.00, 0.28, 1.09, 11.97, 11.97 +2023-01-17 12:00, 631.03, 0.07, 0.35, 1.16, 12.04, 12.04 +2023-01-17 13:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 14:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 15:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 16:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 17:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 18:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 19:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 20:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 21:00, 631.03, 0.00, 0.35, 1.16, 12.04, 12.04 +2023-01-17 22:00, 631.35, 0.32, 0.67, 1.48, 12.36, 12.36 +2023-01-17 23:00, 631.35, 0.00, 0.67, 1.48, 12.36, 12.36 +2023-01-18 00:00, 631.35, 0.00, 0.00, 1.48, 12.36, 12.36 +2023-01-18 01:00, 631.35, 0.00, 0.00, 1.48, 12.36, 12.36 +2023-01-18 02:00, 631.35, 0.00, 0.00, 1.48, 12.36, 12.36 +2023-01-18 03:00, 631.35, 0.00, 0.00, 1.48, 12.36, 12.36 +2023-01-18 04:00, 631.35, 0.00, 0.00, 1.48, 12.36, 12.36 +2023-01-18 05:00, 631.35, 0.00, 0.00, 1.48, 12.36, 12.36 +2023-01-18 06:00, 631.35, 0.00, 0.00, 1.48, 12.36, 12.36 +2023-01-18 07:00, 631.72, 0.37, 0.37, 1.85, 12.73, 12.73 +2023-01-18 08:00, 631.79, 0.07, 0.44, 1.92, 12.80, 12.80 +2023-01-18 09:00, 631.90, 0.11, 0.55, 2.03, 12.91, 12.91 +2023-01-18 10:00, 631.90, 0.00, 0.55, 2.03, 12.91, 12.91 +2023-01-18 11:00, 631.90, 0.00, 0.55, 2.03, 12.91, 12.91 +2023-01-18 12:00, 631.92, 0.02, 0.57, 2.05, 12.93, 12.93 +2023-01-18 13:00, 631.92, 0.00, 0.57, 2.05, 12.93, 12.93 +2023-01-18 14:00, 632.18, 0.26, 0.83, 2.31, 13.19, 13.19 +2023-01-18 15:00, 632.26, 0.08, 0.91, 2.39, 13.27, 13.27 +2023-01-18 16:00, 632.47, 0.21, 1.12, 2.60, 13.48, 13.48 +2023-01-18 17:00, 632.57, 0.10, 1.22, 2.70, 13.58, 13.58 +2023-01-18 18:00, 632.57, 0.00, 1.22, 2.70, 13.58, 13.58 +2023-01-18 19:00, 632.57, 0.00, 1.22, 2.70, 13.58, 13.58 +2023-01-18 20:00, 632.57, 0.00, 1.22, 2.70, 13.58, 13.58 +2023-01-18 21:00, 632.57, 0.00, 1.22, 2.70, 13.58, 13.58 +2023-01-18 22:00, 632.70, 0.13, 1.35, 2.83, 13.71, 13.71 +2023-01-18 23:00, 632.97, 0.27, 1.62, 3.10, 13.98, 13.98 +2023-01-19 00:00, 632.97, 0.00, 0.00, 3.10, 13.98, 13.98 +2023-01-19 01:00, 632.97, 0.00, 0.00, 3.10, 13.98, 13.98 +2023-01-19 02:00, 632.97, 0.00, 0.00, 3.10, 13.98, 13.98 +2023-01-19 03:00, 632.98, 0.01, 0.01, 3.11, 13.99, 13.99 +2023-01-19 04:00, 632.98, 0.00, 0.01, 3.11, 13.99, 13.99 +2023-01-19 05:00, 632.98, 0.00, 0.01, 3.11, 13.99, 13.99 +2023-01-19 06:00, 632.98, 0.00, 0.01, 3.11, 13.99, 13.99 +2023-01-19 07:00, 633.20, 0.22, 0.23, 3.33, 14.21, 14.21 +2023-01-19 08:00, 633.20, 0.00, 0.23, 3.33, 14.21, 14.21 +2023-01-19 09:00, 633.41, 0.21, 0.44, 3.54, 14.42, 14.42 +2023-01-19 10:00, 633.41, 0.00, 0.44, 3.54, 14.42, 14.42 +2023-01-19 11:00, 633.41, 0.00, 0.44, 3.54, 14.42, 14.42 +2023-01-19 12:00, 633.41, 0.00, 0.44, 3.54, 14.42, 14.42 +2023-01-19 13:00, 633.46, 0.05, 0.49, 3.59, 14.47, 14.47 +2023-01-19 14:00, 633.46, 0.00, 0.49, 3.59, 14.47, 14.47 +2023-01-19 15:00, 633.46, 0.00, 0.49, 3.59, 14.47, 14.47 +2023-01-19 16:00, 633.46, 0.00, 0.49, 3.59, 14.47, 14.47 +2023-01-19 17:00, 633.46, 0.00, 0.49, 3.59, 14.47, 14.47 +2023-01-19 18:00, 633.46, 0.00, 0.49, 3.59, 14.47, 14.47 +2023-01-19 19:00, 633.46, 0.00, 0.49, 3.59, 14.47, 14.47 +2023-01-19 20:00, 633.46, 0.00, 0.49, 3.59, 14.47, 14.47 +2023-01-19 21:00, 633.46, 0.00, 0.49, 3.59, 14.47, 14.47 +2023-01-19 22:00, 633.80, 0.34, 0.83, 3.93, 14.81, 14.81 +2023-01-19 23:00, 633.80, 0.00, 0.83, 3.93, 14.81, 14.81 +2023-01-20 00:00, 633.80, 0.00, 0.00, 3.93, 14.81, 14.81 +2023-01-20 01:00, 633.80, 0.00, 0.00, 3.93, 14.81, 14.81 +2023-01-20 02:00, 633.80, 0.00, 0.00, 3.93, 14.81, 14.81 +2023-01-20 03:00, 633.80, 0.00, 0.00, 3.93, 14.81, 14.81 +2023-01-20 04:00, 633.80, 0.00, 0.00, 3.93, 14.81, 14.81 +2023-01-20 05:00, 633.80, 0.00, 0.00, 3.93, 14.81, 14.81 +2023-01-20 06:00, 633.80, 0.00, 0.00, 3.93, 14.81, 14.81 +2023-01-20 07:00, 633.88, 0.08, 0.08, 4.01, 14.89, 14.89 +2023-01-20 08:00, 634.09, 0.21, 0.29, 4.22, 15.10, 15.10 +2023-01-20 09:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 10:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 11:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 12:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 13:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 14:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 15:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 16:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 17:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 18:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 19:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 20:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 21:00, 634.09, 0.00, 0.29, 4.22, 15.10, 15.10 +2023-01-20 22:00, 634.45, 0.36, 0.65, 4.58, 15.46, 15.46 +2023-01-20 23:00, 634.53, 0.08, 0.73, 4.66, 15.54, 15.54 +2023-01-21 00:00, 634.53, 0.00, 0.00, 4.66, 15.54, 15.54 +2023-01-21 01:00, 634.53, 0.00, 0.00, 4.66, 15.54, 15.54 +2023-01-21 02:00, 634.53, 0.00, 0.00, 4.66, 15.54, 15.54 +2023-01-21 03:00, 634.53, 0.00, 0.00, 4.66, 15.54, 15.54 +2023-01-21 04:00, 634.53, 0.00, 0.00, 4.66, 15.54, 15.54 +2023-01-21 05:00, 634.53, 0.00, 0.00, 4.66, 15.54, 15.54 +2023-01-21 06:00, 634.53, 0.00, 0.00, 4.66, 15.54, 15.54 +2023-01-21 07:00, 635.05, 0.52, 0.52, 5.18, 16.06, 16.06 +2023-01-21 08:00, 635.28, 0.23, 0.75, 5.41, 16.29, 16.29 +2023-01-21 09:00, 635.28, 0.00, 0.75, 5.41, 16.29, 16.29 +2023-01-21 10:00, 635.28, 0.00, 0.75, 5.41, 16.29, 16.29 +2023-01-21 11:00, 635.28, 0.00, 0.75, 5.41, 16.29, 16.29 +2023-01-21 12:00, 635.28, 0.00, 0.75, 5.41, 16.29, 16.29 +2023-01-21 13:00, 635.28, 0.00, 0.75, 5.41, 16.29, 16.29 +2023-01-21 14:00, 635.28, 0.00, 0.75, 5.41, 16.29, 16.29 +2023-01-21 15:00, 635.28, 0.00, 0.75, 5.41, 16.29, 16.29 +2023-01-21 16:00, 635.28, 0.00, 0.75, 5.41, 16.29, 16.29 +2023-01-21 17:00, 635.56, 0.28, 1.03, 5.69, 16.57, 16.57 +2023-01-21 18:00, 635.56, 0.00, 1.03, 5.69, 16.57, 16.57 +2023-01-21 19:00, 635.56, 0.00, 1.03, 5.69, 16.57, 16.57 +2023-01-21 20:00, 635.56, 0.00, 1.03, 5.69, 16.57, 16.57 +2023-01-21 21:00, 635.56, 0.00, 1.03, 5.69, 16.57, 16.57 +2023-01-21 22:00, 635.75, 0.19, 1.22, 5.88, 16.76, 16.76 +2023-01-21 23:00, 635.75, 0.00, 1.22, 5.88, 16.76, 16.76 +2023-01-22 00:00, 636.04, 0.29, 0.29, 6.17, 17.05, 17.05 +2023-01-22 01:00, 636.04, 0.00, 0.29, 6.17, 17.05, 17.05 +2023-01-22 02:00, 636.04, 0.00, 0.29, 6.17, 17.05, 17.05 +2023-01-22 03:00, 636.04, 0.00, 0.29, 6.17, 17.05, 17.05 +2023-01-22 04:00, 636.04, 0.00, 0.29, 6.17, 17.05, 17.05 +2023-01-22 05:00, 636.04, 0.00, 0.29, 6.17, 17.05, 17.05 +2023-01-22 06:00, 636.04, 0.00, 0.29, 6.17, 17.05, 17.05 +2023-01-22 07:00, 636.34, 0.30, 0.59, 6.47, 17.35, 17.35 +2023-01-22 08:00, 636.56, 0.22, 0.81, 6.69, 17.57, 17.57 +2023-01-22 09:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 10:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 11:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 12:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 13:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 14:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 15:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 16:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 17:00, 636.56, 0.00, 0.81, 6.69, 17.57, 17.57 +2023-01-22 18:00, 636.78, 0.22, 1.03, 6.91, 17.79, 17.79 +2023-01-22 19:00, 636.78, 0.00, 1.03, 6.91, 17.79, 17.79 +2023-01-22 20:00, 636.78, 0.00, 1.03, 6.91, 17.79, 17.79 +2023-01-22 21:00, 636.78, 0.00, 1.03, 6.91, 17.79, 17.79 +2023-01-22 22:00, 637.20, 0.42, 1.45, 7.33, 18.21, 18.21 +2023-01-22 23:00, 637.20, 0.00, 1.45, 7.33, 18.21, 18.21 +2023-01-23 00:00, 637.20, 0.00, 0.00, 0.00, 18.21, 18.21 +2023-01-23 01:00, 637.20, 0.00, 0.00, 0.00, 18.21, 18.21 +2023-01-23 02:00, 637.21, 0.01, 0.01, 0.01, 18.22, 18.22 +2023-01-23 03:00, 637.21, 0.00, 0.01, 0.01, 18.22, 18.22 +2023-01-23 04:00, 637.21, 0.00, 0.01, 0.01, 18.22, 18.22 +2023-01-23 05:00, 637.21, 0.00, 0.01, 0.01, 18.22, 18.22 +2023-01-23 06:00, 637.22, 0.01, 0.02, 0.02, 18.23, 18.23 +2023-01-23 07:00, 637.54, 0.32, 0.34, 0.34, 18.55, 18.55 +2023-01-23 08:00, 637.86, 0.32, 0.66, 0.66, 18.87, 18.87 +2023-01-23 09:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 10:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 11:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 12:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 13:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 14:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 15:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 16:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 17:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 18:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 19:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 20:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 21:00, 637.86, 0.00, 0.66, 0.66, 18.87, 18.87 +2023-01-23 22:00, 638.24, 0.38, 1.04, 1.04, 19.25, 19.25 +2023-01-23 23:00, 638.24, 0.00, 1.04, 1.04, 19.25, 19.25 +2023-01-24 00:00, 638.24, 0.00, 0.00, 1.04, 19.25, 19.25 +2023-01-24 01:00, 638.24, 0.00, 0.00, 1.04, 19.25, 19.25 +2023-01-24 02:00, 638.24, 0.00, 0.00, 1.04, 19.25, 19.25 +2023-01-24 03:00, 638.24, 0.00, 0.00, 1.04, 19.25, 19.25 +2023-01-24 04:00, 638.24, 0.00, 0.00, 1.04, 19.25, 19.25 +2023-01-24 05:00, 638.24, 0.00, 0.00, 1.04, 19.25, 19.25 +2023-01-24 06:00, 638.44, 0.20, 0.20, 1.24, 19.45, 19.45 +2023-01-24 07:00, 639.02, 0.58, 0.78, 1.82, 20.03, 20.03 +2023-01-24 08:00, 639.06, 0.04, 0.82, 1.86, 20.07, 20.07 +2023-01-24 09:00, 639.15, 0.09, 0.91, 1.95, 20.16, 20.16 +2023-01-24 10:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 11:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 12:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 13:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 14:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 15:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 16:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 17:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 18:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 19:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 20:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 21:00, 639.15, 0.00, 0.91, 1.95, 20.16, 20.16 +2023-01-24 22:00, 639.46, 0.31, 1.22, 2.26, 20.47, 20.47 +2023-01-24 23:00, 639.46, 0.00, 1.22, 2.26, 20.47, 20.47 +2023-01-25 00:00, 639.46, 0.00, 0.00, 2.26, 20.47, 20.47 +2023-01-25 01:00, 639.46, 0.00, 0.00, 2.26, 20.47, 20.47 +2023-01-25 02:00, 639.46, 0.00, 0.00, 2.26, 20.47, 20.47 +2023-01-25 03:00, 639.46, 0.00, 0.00, 2.26, 20.47, 20.47 +2023-01-25 04:00, 639.46, 0.00, 0.00, 2.26, 20.47, 20.47 +2023-01-25 05:00, 639.46, 0.00, 0.00, 2.26, 20.47, 20.47 +2023-01-25 06:00, 639.46, 0.00, 0.00, 2.26, 20.47, 20.47 +2023-01-25 07:00, 639.80, 0.34, 0.34, 2.60, 20.81, 20.81 +2023-01-25 08:00, 639.80, 0.00, 0.34, 2.60, 20.81, 20.81 +2023-01-25 09:00, 640.03, 0.23, 0.57, 2.83, 21.04, 21.04 +2023-01-25 10:00, 640.03, 0.00, 0.57, 2.83, 21.04, 21.04 +2023-01-25 11:00, 640.10, 0.07, 0.64, 2.90, 21.11, 21.11 +2023-01-25 12:00, 640.26, 0.16, 0.80, 3.06, 21.27, 21.27 +2023-01-25 13:00, 640.26, 0.00, 0.80, 3.06, 21.27, 21.27 +2023-01-25 14:00, 640.26, 0.00, 0.80, 3.06, 21.27, 21.27 +2023-01-25 15:00, 640.31, 0.05, 0.85, 3.11, 21.32, 21.32 +2023-01-25 16:00, 640.31, 0.00, 0.85, 3.11, 21.32, 21.32 +2023-01-25 17:00, 640.31, 0.00, 0.85, 3.11, 21.32, 21.32 +2023-01-25 18:00, 640.31, 0.00, 0.85, 3.11, 21.32, 21.32 +2023-01-25 19:00, 640.31, 0.00, 0.85, 3.11, 21.32, 21.32 +2023-01-25 20:00, 640.31, 0.00, 0.85, 3.11, 21.32, 21.32 +2023-01-25 21:00, 640.31, 0.00, 0.85, 3.11, 21.32, 21.32 +2023-01-25 22:00, 640.60, 0.29, 1.14, 3.40, 21.61, 21.61 +2023-01-25 23:00, 640.60, 0.00, 1.14, 3.40, 21.61, 21.61 +2023-01-26 00:00, 640.60, 0.00, 0.00, 3.40, 21.61, 21.61 +2023-01-26 01:00, 640.60, 0.00, 0.00, 3.40, 21.61, 21.61 +2023-01-26 02:00, 640.60, 0.00, 0.00, 3.40, 21.61, 21.61 +2023-01-26 03:00, 640.60, 0.00, 0.00, 3.40, 21.61, 21.61 +2023-01-26 04:00, 640.60, 0.00, 0.00, 3.40, 21.61, 21.61 +2023-01-26 05:00, 640.60, 0.00, 0.00, 3.40, 21.61, 21.61 +2023-01-26 06:00, 640.60, 0.00, 0.00, 3.40, 21.61, 21.61 +2023-01-26 07:00, 640.93, 0.33, 0.33, 3.73, 21.94, 21.94 +2023-01-26 08:00, 641.20, 0.27, 0.60, 4.00, 22.21, 22.21 +2023-01-26 09:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 10:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 11:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 12:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 13:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 14:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 15:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 16:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 17:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 18:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 19:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 20:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 21:00, 641.20, 0.00, 0.60, 4.00, 22.21, 22.21 +2023-01-26 22:00, 641.51, 0.31, 0.91, 4.31, 22.52, 22.52 +2023-01-26 23:00, 641.51, 0.00, 0.91, 4.31, 22.52, 22.52 +2023-01-27 00:00, 641.51, 0.00, 0.00, 4.31, 22.52, 22.52 +2023-01-27 01:00, 641.51, 0.00, 0.00, 4.31, 22.52, 22.52 +2023-01-27 02:00, 641.51, 0.00, 0.00, 4.31, 22.52, 22.52 +2023-01-27 03:00, 641.51, 0.00, 0.00, 4.31, 22.52, 22.52 +2023-01-27 04:00, 641.51, 0.00, 0.00, 4.31, 22.52, 22.52 +2023-01-27 05:00, 641.51, 0.00, 0.00, 4.31, 22.52, 22.52 +2023-01-27 06:00, 641.51, 0.00, 0.00, 4.31, 22.52, 22.52 +2023-01-27 07:00, 641.71, 0.20, 0.20, 4.51, 22.72, 22.72 +2023-01-27 08:00, 641.71, 0.00, 0.20, 4.51, 22.72, 22.72 +2023-01-27 09:00, 641.90, 0.19, 0.39, 4.70, 22.91, 22.91 +2023-01-27 10:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 11:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 12:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 13:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 14:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 15:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 16:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 17:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 18:00, 641.90, 0.00, 0.39, 4.70, 22.91, 22.91 +2023-01-27 19:00, 642.01, 0.11, 0.50, 4.81, 23.02, 23.02 +2023-01-27 20:00, 642.01, 0.00, 0.50, 4.81, 23.02, 23.02 +2023-01-27 21:00, 642.01, 0.00, 0.50, 4.81, 23.02, 23.02 +2023-01-27 22:00, 642.01, 0.00, 0.50, 4.81, 23.02, 23.02 +2023-01-27 23:00, 642.44, 0.43, 0.93, 5.24, 23.45, 23.45 +2023-01-28 00:00, 642.44, 0.00, 0.00, 5.24, 23.45, 23.45 +2023-01-28 01:00, 642.44, 0.00, 0.00, 5.24, 23.45, 23.45 +2023-01-28 02:00, 642.44, 0.00, 0.00, 5.24, 23.45, 23.45 +2023-01-28 03:00, 642.44, 0.00, 0.00, 5.24, 23.45, 23.45 +2023-01-28 04:00, 642.44, 0.00, 0.00, 5.24, 23.45, 23.45 +2023-01-28 05:00, 642.44, 0.00, 0.00, 5.24, 23.45, 23.45 +2023-01-28 06:00, 642.44, 0.00, 0.00, 5.24, 23.45, 23.45 +2023-01-28 07:00, 642.71, 0.27, 0.27, 5.51, 23.72, 23.72 +2023-01-28 08:00, 642.71, 0.00, 0.27, 5.51, 23.72, 23.72 +2023-01-28 09:00, 642.93, 0.22, 0.49, 5.73, 23.94, 23.94 +2023-01-28 10:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 11:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 12:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 13:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 14:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 15:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 16:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 17:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 18:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 19:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 20:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 21:00, 642.93, 0.00, 0.49, 5.73, 23.94, 23.94 +2023-01-28 22:00, 643.18, 0.25, 0.74, 5.98, 24.19, 24.19 +2023-01-28 23:00, 643.25, 0.07, 0.81, 6.05, 24.26, 24.26 +2023-01-29 00:00, 643.25, 0.00, 0.00, 6.05, 24.26, 24.26 +2023-01-29 01:00, 643.25, 0.00, 0.00, 6.05, 24.26, 24.26 +2023-01-29 02:00, 643.26, 0.01, 0.01, 6.06, 24.27, 24.27 +2023-01-29 03:00, 643.26, 0.00, 0.01, 6.06, 24.27, 24.27 +2023-01-29 04:00, 643.26, 0.00, 0.01, 6.06, 24.27, 24.27 +2023-01-29 05:00, 643.26, 0.00, 0.01, 6.06, 24.27, 24.27 +2023-01-29 06:00, 643.27, 0.01, 0.02, 6.07, 24.28, 24.28 +2023-01-29 07:00, 643.61, 0.34, 0.36, 6.41, 24.62, 24.62 +2023-01-29 08:00, 643.90, 0.29, 0.65, 6.70, 24.91, 24.91 +2023-01-29 09:00, 643.90, 0.00, 0.65, 6.70, 24.91, 24.91 +2023-01-29 10:00, 643.90, 0.00, 0.65, 6.70, 24.91, 24.91 +2023-01-29 11:00, 643.90, 0.00, 0.65, 6.70, 24.91, 24.91 +2023-01-29 12:00, 643.90, 0.00, 0.65, 6.70, 24.91, 24.91 +2023-01-29 13:00, 643.90, 0.00, 0.65, 6.70, 24.91, 24.91 +2023-01-29 14:00, 643.90, 0.00, 0.65, 6.70, 24.91, 24.91 +2023-01-29 15:00, 643.90, 0.00, 0.65, 6.70, 24.91, 24.91 +2023-01-29 16:00, 643.90, 0.00, 0.65, 6.70, 24.91, 24.91 +2023-01-29 17:00, 644.16, 0.26, 0.91, 6.96, 25.17, 25.17 +2023-01-29 18:00, 644.16, 0.00, 0.91, 6.96, 25.17, 25.17 +2023-01-29 19:00, 644.16, 0.00, 0.91, 6.96, 25.17, 25.17 +2023-01-29 20:00, 644.16, 0.00, 0.91, 6.96, 25.17, 25.17 +2023-01-29 21:00, 644.16, 0.00, 0.91, 6.96, 25.17, 25.17 +2023-01-29 22:00, 644.32, 0.16, 1.07, 7.12, 25.33, 25.33 +2023-01-29 23:00, 644.56, 0.24, 1.31, 7.36, 25.57, 25.57 +2023-01-30 00:00, 644.56, 0.00, 0.00, 0.00, 25.57, 25.57 +2023-01-30 01:00, 644.56, 0.00, 0.00, 0.00, 25.57, 25.57 +2023-01-30 02:00, 644.56, 0.00, 0.00, 0.00, 25.57, 25.57 +2023-01-30 03:00, 644.56, 0.00, 0.00, 0.00, 25.57, 25.57 +2023-01-30 04:00, 644.56, 0.00, 0.00, 0.00, 25.57, 25.57 +2023-01-30 05:00, 644.56, 0.00, 0.00, 0.00, 25.57, 25.57 +2023-01-30 06:00, 644.56, 0.00, 0.00, 0.00, 25.57, 25.57 +2023-01-30 07:00, 644.79, 0.23, 0.23, 0.23, 25.80, 25.80 +2023-01-30 08:00, 645.03, 0.24, 0.47, 0.47, 26.04, 26.04 +2023-01-30 09:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 10:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 11:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 12:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 13:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 14:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 15:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 16:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 17:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 18:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 19:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 20:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 21:00, 645.03, 0.00, 0.47, 0.47, 26.04, 26.04 +2023-01-30 22:00, 645.40, 0.37, 0.84, 0.84, 26.41, 26.41 +2023-01-30 23:00, 645.40, 0.00, 0.84, 0.84, 26.41, 26.41 +2023-01-31 00:00, 645.40, 0.00, 0.00, 0.84, 26.41, 26.41 +2023-01-31 01:00, 645.40, 0.00, 0.00, 0.84, 26.41, 26.41 +2023-01-31 02:00, 645.40, 0.00, 0.00, 0.84, 26.41, 26.41 +2023-01-31 03:00, 645.40, 0.00, 0.00, 0.84, 26.41, 26.41 +2023-01-31 04:00, 645.40, 0.00, 0.00, 0.84, 26.41, 26.41 +2023-01-31 05:00, 645.40, 0.00, 0.00, 0.84, 26.41, 26.41 +2023-01-31 06:00, 645.40, 0.00, 0.00, 0.84, 26.41, 26.41 +2023-01-31 07:00, 645.62, 0.22, 0.22, 1.06, 26.63, 26.63 +2023-01-31 08:00, 645.62, 0.00, 0.22, 1.06, 26.63, 26.63 +2023-01-31 09:00, 645.62, 0.00, 0.22, 1.06, 26.63, 26.63 +2023-01-31 10:00, 645.62, 0.00, 0.22, 1.06, 26.63, 26.63 +2023-01-31 11:00, 645.62, 0.00, 0.22, 1.06, 26.63, 26.63 +2023-01-31 12:00, 645.62, 0.00, 0.22, 1.06, 26.63, 26.63 +2023-01-31 13:00, 645.62, 0.00, 0.22, 1.06, 26.63, 26.63 +2023-01-31 14:00, 645.69, 0.07, 0.29, 1.13, 26.70, 26.70 +2023-01-31 15:00, 645.69, 0.00, 0.29, 1.13, 26.70, 26.70 +2023-01-31 16:00, 645.69, 0.00, 0.29, 1.13, 26.70, 26.70 +2023-01-31 17:00, 645.69, 0.00, 0.29, 1.13, 26.70, 26.70 +2023-01-31 18:00, 645.69, 0.00, 0.29, 1.13, 26.70, 26.70 +2023-01-31 19:00, 645.69, 0.00, 0.29, 1.13, 26.70, 26.70 +2023-01-31 20:00, 645.69, 0.00, 0.29, 1.13, 26.70, 26.70 +2023-01-31 21:00, 645.69, 0.00, 0.29, 1.13, 26.70, 26.70 +2023-01-31 22:00, 646.32, 0.63, 0.92, 1.76, 27.33, 27.33 +2023-01-31 23:00, 646.52, 0.20, 1.12, 1.96, 27.53, 27.53 +2023-02-01 00:00, 646.52, 0.00, 0.00, 1.96, 0.00, 27.53 +2023-02-01 01:00, 646.52, 0.00, 0.00, 1.96, 0.00, 27.53 +2023-02-01 02:00, 646.52, 0.00, 0.00, 1.96, 0.00, 27.53 +2023-02-01 03:00, 646.52, 0.00, 0.00, 1.96, 0.00, 27.53 +2023-02-01 04:00, 646.52, 0.00, 0.00, 1.96, 0.00, 27.53 +2023-02-01 05:00, 646.52, 0.00, 0.00, 1.96, 0.00, 27.53 +2023-02-01 06:00, 646.52, 0.00, 0.00, 1.96, 0.00, 27.53 +2023-02-01 07:00, 646.79, 0.27, 0.27, 2.23, 0.27, 27.80 +2023-02-01 08:00, 647.02, 0.23, 0.50, 2.46, 0.50, 28.03 +2023-02-01 09:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 10:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 11:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 12:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 13:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 14:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 15:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 16:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 17:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 18:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 19:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 20:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 21:00, 647.02, 0.00, 0.50, 2.46, 0.50, 28.03 +2023-02-01 22:00, 647.34, 0.32, 0.82, 2.78, 0.82, 28.35 +2023-02-01 23:00, 647.34, 0.00, 0.82, 2.78, 0.82, 28.35 +2023-02-02 00:00, 647.34, 0.00, 0.00, 2.78, 0.82, 28.35 +2023-02-02 01:00, 647.34, 0.00, 0.00, 2.78, 0.82, 28.35 +2023-02-02 02:00, 647.34, 0.00, 0.00, 2.78, 0.82, 28.35 +2023-02-02 03:00, 647.34, 0.00, 0.00, 2.78, 0.82, 28.35 +2023-02-02 04:00, 647.34, 0.00, 0.00, 2.78, 0.82, 28.35 +2023-02-02 05:00, 647.34, 0.00, 0.00, 2.78, 0.82, 28.35 +2023-02-02 06:00, 647.34, 0.00, 0.00, 2.78, 0.82, 28.35 +2023-02-02 07:00, 647.55, 0.21, 0.21, 2.99, 1.03, 28.56 +2023-02-02 08:00, 647.55, 0.00, 0.21, 2.99, 1.03, 28.56 +2023-02-02 09:00, 647.55, 0.00, 0.21, 2.99, 1.03, 28.56 +2023-02-02 10:00, 647.55, 0.00, 0.21, 2.99, 1.03, 28.56 +2023-02-02 11:00, 647.83, 0.28, 0.49, 3.27, 1.31, 28.84 +2023-02-02 12:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 13:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 14:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 15:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 16:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 17:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 18:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 19:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 20:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 21:00, 647.83, 0.00, 0.49, 3.27, 1.31, 28.84 +2023-02-02 22:00, 648.13, 0.30, 0.79, 3.57, 1.61, 29.14 +2023-02-02 23:00, 648.13, 0.00, 0.79, 3.57, 1.61, 29.14 +2023-02-03 00:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 01:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 02:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 03:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 04:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 05:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 06:00, 648.13, 0.00, 0.00, 3.57, 1.61, 29.14 +2023-02-03 07:00, 648.51, 0.38, 0.38, 3.95, 1.99, 29.52 +2023-02-03 08:00, 648.51, 0.00, 0.38, 3.95, 1.99, 29.52 +2023-02-03 09:00, 648.51, 0.00, 0.38, 3.95, 1.99, 29.52 +2023-02-03 10:00, 648.51, 0.00, 0.38, 3.95, 1.99, 29.52 +2023-02-03 11:00, 648.51, 0.00, 0.38, 3.95, 1.99, 29.52 +2023-02-03 12:00, 648.85, 0.34, 0.72, 4.29, 2.33, 29.86 +2023-02-03 13:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 14:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 15:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 16:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 17:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 18:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 19:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 20:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 21:00, 648.85, 0.00, 0.72, 4.29, 2.33, 29.86 +2023-02-03 22:00, 649.13, 0.28, 1.00, 4.57, 2.61, 30.14 +2023-02-03 23:00, 649.13, 0.00, 1.00, 4.57, 2.61, 30.14 +2023-02-04 00:00, 649.13, 0.00, 0.00, 4.57, 2.61, 30.14 +2023-02-04 01:00, 649.13, 0.00, 0.00, 4.57, 2.61, 30.14 +2023-02-04 02:00, 649.13, 0.00, 0.00, 4.57, 2.61, 30.14 +2023-02-04 03:00, 649.13, 0.00, 0.00, 4.57, 2.61, 30.14 +2023-02-04 04:00, 649.13, 0.00, 0.00, 4.57, 2.61, 30.14 +2023-02-04 05:00, 649.13, 0.00, 0.00, 4.57, 2.61, 30.14 +2023-02-04 06:00, 649.13, 0.00, 0.00, 4.57, 2.61, 30.14 +2023-02-04 07:00, 649.33, 0.20, 0.20, 4.77, 2.81, 30.34 +2023-02-04 08:00, 649.52, 0.19, 0.39, 4.96, 3.00, 30.53 +2023-02-04 09:00, 649.59, 0.07, 0.46, 5.03, 3.07, 30.60 +2023-02-04 10:00, 649.59, 0.00, 0.46, 5.03, 3.07, 30.60 +2023-02-04 11:00, 649.59, 0.00, 0.46, 5.03, 3.07, 30.60 +2023-02-04 12:00, 649.65, 0.06, 0.52, 5.09, 3.13, 30.66 diff --git a/examples/Badkamer.days.csv b/examples/Badkamer.days.csv new file mode 100644 index 0000000..5bd4bfa --- /dev/null +++ b/examples/Badkamer.days.csv @@ -0,0 +1,37 @@ +Date, Cumulative kWh, Delta +kWh +2022-12-30 23:00, 618.24, 1.24 +2022-12-31 23:00, 618.99, 0.75 +2023-01-01 23:00, 619.68, 0.69 +2023-01-02 23:00, 620.05, 0.37 +2023-01-03 23:00, 620.68, 0.63 +2023-01-04 23:00, 621.31, 0.63 +2023-01-05 23:00, 621.95, 0.64 +2023-01-06 23:00, 622.48, 0.53 +2023-01-07 23:00, 622.98, 0.50 +2023-01-08 23:00, 623.52, 0.54 +2023-01-09 23:00, 624.47, 0.95 +2023-01-10 23:00, 625.14, 0.67 +2023-01-11 23:00, 625.61, 0.47 +2023-01-12 23:00, 626.69, 1.08 +2023-01-13 23:00, 627.49, 0.80 +2023-01-14 23:00, 628.54, 1.05 +2023-01-15 23:00, 629.87, 1.33 +2023-01-16 23:00, 630.68, 0.81 +2023-01-17 23:00, 631.35, 0.67 +2023-01-18 23:00, 632.97, 1.62 +2023-01-19 23:00, 633.80, 0.83 +2023-01-20 23:00, 634.53, 0.73 +2023-01-21 23:00, 635.75, 1.22 +2023-01-22 23:00, 637.20, 1.45 +2023-01-23 23:00, 638.24, 1.04 +2023-01-24 23:00, 639.46, 1.22 +2023-01-25 23:00, 640.60, 1.14 +2023-01-26 23:00, 641.51, 0.91 +2023-01-27 23:00, 642.44, 0.93 +2023-01-28 23:00, 643.25, 0.81 +2023-01-29 23:00, 644.56, 1.31 +2023-01-30 23:00, 645.40, 0.84 +2023-01-31 23:00, 646.52, 1.12 +2023-02-01 23:00, 647.34, 0.82 +2023-02-02 23:00, 648.13, 0.79 +2023-02-03 23:00, 649.13, 1.00 diff --git a/examples/Badkamer.months.csv b/examples/Badkamer.months.csv new file mode 100644 index 0000000..66acae5 --- /dev/null +++ b/examples/Badkamer.months.csv @@ -0,0 +1,26 @@ +Date, Cumulative kWh, Delta +kWh +2021-01-31 23:00, 332.93, 32.45 +2021-02-28 23:00, 366.12, 33.19 +2021-03-31 23:00, 376.94, 10.82 +2021-04-30 23:00, 384.81, 7.87 +2021-05-31 23:00, 388.08, 3.27 +2021-06-30 23:00, 389.56, 1.48 +2021-07-31 23:00, 390.72, 1.16 +2021-08-31 23:00, 391.28, 0.56 +2021-09-30 23:00, 391.97, 0.69 +2021-10-31 23:00, 400.68, 8.71 +2021-11-30 23:00, 416.25, 15.57 +2021-12-31 23:00, 449.10, 32.85 +2022-01-31 23:00, 479.28, 30.18 +2022-02-28 23:00, 507.16, 27.88 +2022-03-31 23:00, 523.17, 16.01 +2022-04-30 23:00, 529.58, 6.41 +2022-05-31 23:00, 532.16, 2.58 +2022-06-30 23:00, 537.66, 5.50 +2022-07-31 23:00, 551.42, 13.76 +2022-08-31 23:00, 562.24, 10.82 +2022-09-30 23:00, 565.74, 3.50 +2022-10-31 23:00, 572.51, 6.77 +2022-11-30 23:00, 583.99, 11.48 +2022-12-31 23:00, 618.99, 35.00 +2023-01-31 23:00, 646.52, 27.53 diff --git a/examples/Badkamer.weeks.csv b/examples/Badkamer.weeks.csv new file mode 100644 index 0000000..9e4270b --- /dev/null +++ b/examples/Badkamer.weeks.csv @@ -0,0 +1,30 @@ +Date, Cumulative kWh, Delta +kWh +2022-07-24 23:00, 548.49, 2.26 +2022-07-31 23:00, 551.42, 2.93 +2022-08-07 23:00, 553.33, 1.91 +2022-08-14 23:00, 555.96, 2.63 +2022-08-21 23:00, 558.26, 2.30 +2022-08-28 23:00, 561.19, 2.93 +2022-09-04 23:00, 562.65, 1.46 +2022-09-11 23:00, 562.80, 0.15 +2022-09-18 23:00, 562.91, 0.11 +2022-09-25 23:00, 564.13, 1.22 +2022-10-02 23:00, 566.07, 1.94 +2022-10-09 23:00, 567.09, 1.02 +2022-10-16 23:00, 569.60, 2.51 +2022-10-23 23:00, 571.34, 1.74 +2022-10-30 23:00, 572.33, 0.99 +2022-11-06 23:00, 574.20, 1.87 +2022-11-13 23:00, 576.37, 2.17 +2022-11-20 23:00, 578.71, 2.34 +2022-11-27 23:00, 582.35, 3.64 +2022-12-04 23:00, 588.07, 5.72 +2022-12-11 23:00, 594.10, 6.03 +2022-12-18 23:00, 604.55, 10.45 +2022-12-25 23:00, 612.54, 7.99 +2022-12-31 23:00, 618.99, 6.45 +2023-01-01 23:00, 619.68, 0.69 +2023-01-08 23:00, 623.52, 3.84 +2023-01-15 23:00, 629.87, 6.35 +2023-01-22 23:00, 637.20, 7.33 +2023-01-29 23:00, 644.56, 7.36 diff --git a/examples/Badkamer.xlsx b/examples/Badkamer.xlsx new file mode 100644 index 0000000..cfc8f3c Binary files /dev/null and b/examples/Badkamer.xlsx differ diff --git a/examples/Badkamer.xlsx.jpg b/examples/Badkamer.xlsx.jpg new file mode 100644 index 0000000..a576989 Binary files /dev/null and b/examples/Badkamer.xlsx.jpg differ diff --git a/examples/Badkamer.years.csv b/examples/Badkamer.years.csv new file mode 100644 index 0000000..09b1e73 --- /dev/null +++ b/examples/Badkamer.years.csv @@ -0,0 +1,6 @@ +Date, Cumulative kWh, Delta +kWh +2018-12-31 23:00, 100.07, 100.07 +2019-12-31 23:00, 215.69, 115.62 +2020-12-31 23:00, 300.48, 84.79 +2021-12-31 23:00, 449.10, 148.62 +2022-12-31 23:00, 618.99, 169.89 diff --git a/examples/run_smart_plug_mini_once.sh b/examples/run_smart_plug_mini_once.sh new file mode 100644 index 0000000..e207a7d --- /dev/null +++ b/examples/run_smart_plug_mini_once.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# --------------------------------------------------------------- +# A script to run smart_plug_mini once. +# if still running, kill the previous running script and start new one +# Add to your crontab to run once per hour a few minutes after whole hour +# 9 * * * * ~/smart_plug_mini/run_smart_plug_mini_once.sh >> ~/smart_plug_mini/run_smart_plug_mini_once.log 2>&1 +# --------------------------------------------------------------- +script_name=$(basename -- "$0") +cd ~/smart_plug_mini + +now=$(date) +if pidof -x "$script_name" -o $$ >/dev/null;then + echo "$now: $script_name already running" >> run_smart_plug_mini_once.log 2>&1 + kill $(pidof $script_name) >> run_smart_plug_mini_once.log 2>&1 +fi + +/usr/bin/python -u ~/smart_plug_mini/smart_plug_mini.py >> run_smart_plug_mini_once.log 2>&1 diff --git a/python_broadlink_smart_plug_mini_info.py b/python_broadlink_smart_plug_mini_info.py new file mode 100644 index 0000000..95f9b75 --- /dev/null +++ b/python_broadlink_smart_plug_mini_info.py @@ -0,0 +1,12 @@ +# == python_broadlink_smart_plug_mini_info Author: Zuinige Rijder =============== +""" +Simple Python3 script to get values of broadlink SP mini using python_broadlink library + +Example output (MAC addresses are changed): +device: Lader (Broadlink SP3S-EU 0x947a / 192.168.178.234:80 / 32:AA:31:72:62:40) +device: Badkamer (Broadlink SP3S-EU 0x947a / 192.168.178.214:80 / 32:AA:31:72:63:43) +""" +import broadlink + +for device in broadlink.xdiscover(): + print(f"device: {device}") diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..86f0739 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +python_version>=3.9 +broadlink==0.18.3 +python_dateutil==2.8.2 diff --git a/smart_plug_mini.cfg b/smart_plug_mini.cfg new file mode 100644 index 0000000..c8ed171 --- /dev/null +++ b/smart_plug_mini.cfg @@ -0,0 +1,8 @@ +[smart_plug_mini] +local_timezone = Europe/Amsterdam +server = https://0000000000000000000000007a940000rtasquery.ibroadlink.com +device_names = Room1, Room2 +device_macs = 32:AA:31:72:62:40, 32:AA:31:72:63:43 +report_types = fw_spminielec_v1, fw_spminielec_v1 +start_dates = 2023-01-01 00:00, 2023-01-01 00:00 +time_filter = "timefilter":{} diff --git a/smart_plug_mini.py b/smart_plug_mini.py new file mode 100644 index 0000000..3e14609 --- /dev/null +++ b/smart_plug_mini.py @@ -0,0 +1,404 @@ +# == smart_plug_mini.py Author: Zuinige Rijder ============================== +""" +Simple Python3 script to get history kWh consumption of broadlink Smart Plug Mini +using the broadlink server and append later kWh measurements to a +.csv file format per device. + +Also write the days, weeks, months and years summaries to separate csv files. + +I have 2 times model Smart plug SP3S-EU and tested with those. +Probably this also works for other broadlink SP mini models. + +Do not forget to configure smart_plug_mini.cfg +""" + +import configparser +from dataclasses import dataclass, field +from datetime import datetime +from io import TextIOWrapper +from zoneinfo import ZoneInfo +import json +import os +from pathlib import Path +import socket +import sys +import time +import traceback +from urllib.error import HTTPError, URLError +from urllib.request import Request, urlopen +from dateutil.relativedelta import relativedelta + + +def arg_has(string: str) -> bool: + """arguments has string""" + for i in range(1, len(sys.argv)): + if sys.argv[i].lower() == string: + return True + return False + + +D = arg_has("debug") + + +def dbg(line: str) -> bool: + """print line if debugging""" + if D: + print(f'{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}: {line}') + return D # just to make a lazy evaluation expression possible + + +@dataclass +class FileInfo: + """helper dataclass to store file information""" + + postfix: str + path: Path = field(init=False) + file: TextIOWrapper = field(init=False) + header: str = field(default="Date, Cumulative kWh, Delta +kWh") + opened: bool = field(default=False) + + +CSV_GLOBAL = FileInfo( + postfix="", + header="Date, Cumulative kWh, Delta +kWh, Days +kWh, Weeks +kWh, Months +kWh, Years +kWh", # noqa +) +CSV_DAYS = FileInfo(postfix=".days") +CSV_WEEKS = FileInfo(postfix=".weeks") +CSV_MONTHS = FileInfo(postfix=".months") +CSV_YEARS = FileInfo(postfix=".years") + +FILES = [CSV_GLOBAL, CSV_DAYS, CSV_WEEKS, CSV_MONTHS, CSV_YEARS] + + +LICENSE_ID = "e9a19a0e0d099eb8288d878687b4883a" + +parser = configparser.ConfigParser() +parser.read("smart_plug_mini.cfg") +sp3s_settings = dict(parser.items("smart_plug_mini")) + + +LOCAL_TIMEZONE = sp3s_settings["local_timezone"].strip() +SERVER = sp3s_settings["server"].strip() +DEVICE_NAMES = sp3s_settings["device_names"].strip() +DEVICE_MACS = sp3s_settings["device_macs"].strip() +REPORT_TYPES = sp3s_settings["report_types"].strip() +START_DATES = sp3s_settings["start_dates"].strip() +TIME_FILTER = sp3s_settings["time_filter"].strip() + +ZONE_INFO_SERVER = ZoneInfo("Asia/Shanghai") +ZONE_INFO_LOCAL = ZoneInfo(LOCAL_TIMEZONE) + +_ = D and dbg( + f"SERVER: {SERVER}\nDEVICE_NAMES: [{DEVICE_NAMES}]\nDEVICE_MACS: [{DEVICE_MACS}]\nREPORT_TYPES: [{REPORT_TYPES}]\nSTART_DATES: {START_DATES}\nTIME_FILTER: {TIME_FILTER}" # noqa +) + +# these will be filled in a loop per device +DEVICE_NAME = "" +DEVICE_TYPE = "" +DEVICE_ID = "" +DATE_START = "" + + +def log(msg: str) -> None: + """log a message prefixed with a date/time format yyyymmdd hh:mm:ss""" + print(datetime.now().strftime("%Y%m%d %H:%M:%S") + ": " + msg) + + +def same_year(d_1: datetime, d_2: datetime) -> bool: + """return if same year""" + return d_1.year == d_2.year + + +def same_month(d_1: datetime, d_2: datetime) -> bool: + """return if same month""" + if d_1.month != d_2.month: + return False + return d_1.year == d_2.year + + +def same_week(d_1: datetime, d_2: datetime) -> bool: + """return if same week""" + if d_1.isocalendar().week != d_2.isocalendar().week: + return False + return d_1.year == d_2.year + + +def same_day(d_1: datetime, d_2: datetime) -> bool: + """return if same day""" + if d_1.day != d_2.day: + return False + if d_1.month != d_2.month: + return False + return d_1.year == d_2.year + + +# == post ==================================================================== +def execute_request(url, data, headers) -> str: + """execute request and handle errors""" + if D: + print(f"execute_request url={url}") + print(f"execute_request post_data={data}") + print(f"execute_request headers={headers}") + print() + + retries = 2 + while retries > 0: + retries -= 1 + request = Request(url, data=data, headers=headers) + + errorstring = "" + try: + with urlopen(request, timeout=30) as response: + body = response.read() + content = body.decode("utf-8") + _ = D and dbg(f"execute_request content: {content}\n") + return content + except HTTPError as error: + errorstring = str(error.status) + ": " + error.reason + except URLError as error: + errorstring = str(error.reason) + except TimeoutError: + errorstring = "Request timed out" + except socket.timeout: + errorstring = "Socket timed out" + except Exception as ex: # pylint: disable=broad-except + errorstring = "urlopen exception: " + str(ex) + traceback.print_exc() + + log("ERROR: " + url + " -> " + errorstring) + time.sleep(60) # retry after 1 minute + return "ERROR" + + +def get_last_line(filename: Path) -> str: + """get last line of filename""" + last_line = "" + if filename.is_file(): + with open(filename.name, "rb") as file: + try: + file.seek(-2, os.SEEK_END) + while file.read(1) != b"\n": + file.seek(-2, os.SEEK_CUR) + except OSError: + file.seek(0) + last_line = file.readline().decode().strip() + print(f"last line {filename.name}: {last_line}") + return last_line + + +def close_files() -> None: + """close files""" + for fileinfo in FILES: + if fileinfo.opened: + print(f"Closing {fileinfo.path.name}") + fileinfo.file.close() + fileinfo.opened = False + + +def write_line(fileinfo: FileInfo, line: str) -> None: + """write line""" + if not fileinfo.opened: + write_header = False + fileinfo.path = Path(f"{DEVICE_NAME}{fileinfo.postfix}.csv") + if not fileinfo.path.is_file(): + fileinfo.path.touch() + write_header = True + print(f"Opening {fileinfo.path.name}") + fileinfo.file = fileinfo.path.open("a", encoding="utf-8") + fileinfo.opened = True + if write_header: + print(fileinfo.header) + fileinfo.file.write(fileinfo.header) + fileinfo.file.write("\n") + + print(f"{fileinfo.path.name}: {line}") + fileinfo.file.write(line) + fileinfo.file.write("\n") + + +def get_kwh_counters(date_start_str: str, date_end_str: str) -> dict: + """get_kwh_counters""" + post = f"{SERVER}/dataservice/v2/device/stats" + headers = { + "Content-Type": "text/plain; charset=UTF-8", + "Connection": "close", + "Expect": "100-continue", + } + post_data = f'{{"credentials":{{"licenseid":"{LICENSE_ID}"}},"report":"{DEVICE_TYPE}","device":[{{"did":"{DEVICE_ID}","start":"{date_start_str}","end":"{date_end_str}","params":["elec"],{TIME_FILTER}}}]}}' # noqa + content = execute_request(post, post_data.encode("utf-8"), headers) + if content == "ERROR": + log(f"month_stats error: {post_data}") + return {} + + result = json.loads(content) + if result["msg"] != "ok": + log(f"get_kwh_counters error: {result}") + return {} + + table = result["table"] + _ = D and dbg(f"get_kwh_counters table = {table}") + if len(table) == 0: + return {} + + values = table[0]["values"] + _ = D and dbg(f"get_kwh_counters values = {values}") + return values + + +def get_last_info_from_csv( + csv_filename: Path, +) -> tuple[datetime, float, float, float, float, float]: + """get_last_info_from_csv""" + date_start_server = datetime.strptime(DATE_START, "%Y-%m-%d %H:%M") + date_start_server = date_start_server.replace(tzinfo=ZONE_INFO_LOCAL).astimezone( + ZONE_INFO_SERVER + ) + last_kwh = 0.0 + last_d = 0.0 + last_w = 0.0 + last_m = 0.0 + last_y = 0.0 + + print(f"##### {csv_filename} ######################################") + last_line = get_last_line(csv_filename) + if last_line != "": + splitted = last_line.split(",") + last_date_str = splitted[0].strip() + if last_date_str.startswith("20") and len(splitted) == 7: + last_kwh = float(splitted[1].strip()) + last_d = float(splitted[3].strip()) + last_w = float(splitted[4].strip()) + last_m = float(splitted[5].strip()) + last_y = float(splitted[6].strip()) + last_date = datetime.strptime(last_date_str, "%Y-%m-%d %H:%M") + last_date_server = last_date.replace(tzinfo=ZONE_INFO_LOCAL).astimezone( + ZONE_INFO_SERVER + ) + if last_date_server > date_start_server: + last_date_server += relativedelta(hours=1) # start with next hour + date_start_server = last_date_server + print(f" {last_date_str}") + + return date_start_server, last_kwh, last_d, last_w, last_m, last_y + + +def compute( + fixed: tuple[float, float, datetime], + delta_x: float, + no_change: bool, + fileinfo: FileInfo, +) -> float: + """compute""" + delta_kwh = fixed[0] + new_delta_x = 0.0 + if no_change: + new_delta_x = delta_x + delta_kwh + _ = D and dbg( + f"delta_kwh: {delta_kwh:.2f} delta_x: {delta_x:.2f} new_delta_x: {new_delta_x:.2f}" # noqa + ) + else: + new_delta_x = delta_kwh + _ = D and dbg( + f"Change: delta_kwh: {delta_kwh:.2f} delta_x: {delta_x:.2f} new_delta_x: {new_delta_x:.2f}" # noqa + ) + # append the previous day/week/month/year value to the summary csv file + prev_kwh = fixed[1] + prev_date = fixed[2] + line = f"{local_dt_str(prev_date)}, {prev_kwh:.2f}, {delta_x:.2f}" + write_line(fileinfo, line) + + return new_delta_x + + +def local_dt_str(date: datetime) -> str: + """local_dt_str""" + date_str = date.astimezone(ZONE_INFO_LOCAL).strftime("%Y-%m-%d %H:%M") + return date_str + + +def do_kwh_counters() -> None: + """do_kwh_counters""" + now_server = ( + datetime.now(tz=ZONE_INFO_LOCAL) + .replace(second=0, microsecond=0) + .astimezone(ZONE_INFO_SERVER) + ) + ( + date_start_server, + prev_kwh, + delta_d, + delta_w, + delta_m, + delta_y, + ) = get_last_info_from_csv(Path(f"{DEVICE_NAME}.csv")) + print(f"date_start local: {date_start_server.astimezone(ZONE_INFO_LOCAL)}") + print(f"now local : {now_server.astimezone(ZONE_INFO_LOCAL)}") + while date_start_server < now_server: + prev_date = date_start_server.astimezone(ZONE_INFO_LOCAL) + date_end_server = date_start_server + relativedelta(months=1) + print( + f"{DEVICE_NAME}: from {date_start_server.astimezone(ZONE_INFO_LOCAL)} to {date_end_server.astimezone(ZONE_INFO_LOCAL)}" # noqa + ) + result = get_kwh_counters( + date_start_server.strftime("%Y-%m-%d_%H:%M:%S"), + date_end_server.strftime("%Y-%m-%d_%H:%M:%S"), + ) + date_start_server = date_end_server + date_start_server += relativedelta(hours=1) # start with next hour + if result is None: + log("no results") + continue + + for entry in result: + _ = D and dbg(f"month_stats entry = {entry}") + kwh = entry["elec"] + occurtime = entry["occurtime"] + # convert the occurtime to local timezone time + date = ( + datetime.strptime(occurtime, "%Y-%m-%d_%H:%M:%S") + .replace(tzinfo=ZoneInfo("Asia/Shanghai")) # add timezone info + .astimezone() # to local timezone + ) + delta_kwh = kwh - prev_kwh + _ = D and dbg( + f"kwh: {kwh:.2f}, prev: {prev_kwh:.2f}, delta: {delta_kwh:.2f}" + ) + if delta_kwh < 0.0: # damned, previous entry should be corrected? + log( + f"WARNING: delta_elec < 0: current: {date} {kwh} prev: {prev_date} {prev_kwh}" # noqa + ) + + _ = D and dbg( + f"prev_date: {local_dt_str(prev_date)}\ncurr_date: {local_dt_str(date)}" # noqa + ) + + fixed = (delta_kwh, prev_kwh, prev_date) + delta_d = compute(fixed, delta_d, same_day(prev_date, date), CSV_DAYS) + delta_w = compute(fixed, delta_w, same_week(prev_date, date), CSV_WEEKS) + delta_m = compute(fixed, delta_m, same_month(prev_date, date), CSV_MONTHS) + delta_y = compute(fixed, delta_y, same_year(prev_date, date), CSV_YEARS) + + line = f"{local_dt_str(date)}, {kwh:.2f}, {delta_kwh:.2f}, {delta_d:.2f}, {delta_w:.2f}, {delta_m:.2f}, {delta_y:.2f}" # noqa + write_line(CSV_GLOBAL, line) + + prev_kwh = kwh + prev_date = date + + close_files() + + +def main() -> None: + """main""" + global DEVICE_NAME, DEVICE_TYPE, DEVICE_ID, DATE_START # noqa pylint: disable=global-statement + for index, mac in enumerate(DEVICE_MACS.split(",")): + DEVICE_NAME = DEVICE_NAMES.split(",")[index].strip() + DEVICE_TYPE = REPORT_TYPES.split(",")[index].strip() + DEVICE_ID = mac.strip().replace(":", "").lower().rjust(32, "0") + DATE_START = START_DATES.split(",")[index].strip() + _ = D and dbg( + f"main(): DEVICE_NAME: {DEVICE_NAME}, DEVICE_TYPE: {DEVICE_TYPE}, DEVICE_ID: {DEVICE_ID}, DATE_START: {DATE_START}" # noqa + ) + do_kwh_counters() + + +main()