deleted: .idea/workspace.xml
modified: repository.yaml modified: src.dev/CHANGELOG.md new file: src.dev/README.md new file: src.dev/icon.png new file: src.dev/logo.png new file: src.dev/rund.sh
This commit is contained in:
88
.idea/workspace.xml
generated
88
.idea/workspace.xml
generated
@@ -1,88 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="AutoImportSettings">
|
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
|
||||||
</component>
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="8727e2a1-35f4-4c9e-8dd5-0334d3dc5b3b" name="Changes" comment="">
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/src/CHANGELOG.md" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/api.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/api.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/config.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/src/config.yaml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/cron.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/cron.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main.py" beforeDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/moj_licznik.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/moj_licznik.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/run.sh" beforeDir="false" afterPath="$PROJECT_DIR$/src/run.sh" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
||||||
</component>
|
|
||||||
<component name="MarkdownSettingsMigration">
|
|
||||||
<option name="stateVersion" value="1" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectColorInfo"><![CDATA[{
|
|
||||||
"associatedIndex": 8
|
|
||||||
}]]></component>
|
|
||||||
<component name="ProjectId" id="2XJbibVs5CCeRSUO1z20ufRUETI" />
|
|
||||||
<component name="ProjectViewState">
|
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
|
||||||
<option name="showLibraryContents" value="true" />
|
|
||||||
<option name="showVisibilityIcons" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
|
||||||
"keyToString": {
|
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
||||||
"git-widget-placeholder": "wytworca",
|
|
||||||
"last_opened_file_path": "D:/github/tcich/ha-addon-energa-meter",
|
|
||||||
"project.structure.last.edited": "Project",
|
|
||||||
"project.structure.proportion": "0.15",
|
|
||||||
"project.structure.side.proportion": "0.2",
|
|
||||||
"settings.editor.selected.configurable": "configurable.group.tools"
|
|
||||||
}
|
|
||||||
}]]></component>
|
|
||||||
<component name="RunManager">
|
|
||||||
<configuration name="run" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
|
||||||
<module name="ha-addon-energa-meter" />
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs>
|
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
|
||||||
</envs>
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="SDK_NAME" value="Python 3.8" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src" />
|
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/run.py" />
|
|
||||||
<option name="PARAMETERS" value="" />
|
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
|
||||||
<option name="MODULE_MODE" value="false" />
|
|
||||||
<option name="REDIRECT_INPUT" value="false" />
|
|
||||||
<option name="INPUT_FILE" value="" />
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
<recent_temporary>
|
|
||||||
<list>
|
|
||||||
<item itemvalue="Python.run" />
|
|
||||||
</list>
|
|
||||||
</recent_temporary>
|
|
||||||
</component>
|
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="8727e2a1-35f4-4c9e-8dd5-0334d3dc5b3b" name="Changes" comment="" />
|
|
||||||
<created>1698350257905</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1698350257905</updated>
|
|
||||||
</task>
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
name: EnergaMeter
|
- name: EnergaMeter
|
||||||
url: https://github.com/tcich/ha-addon-energa-meter/src
|
url: https://github.com/tcich/ha-addon-energa-meter
|
||||||
maintainer: TCICH <https://github.com/tcich/>
|
maintainer: TCICH <https://github.com/tcich/>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# EnergaMeter (dev)
|
||||||
## v0.1.3 [2023-10-31]
|
## v0.1.3 [2023-10-31]
|
||||||
- Dodano obsługę liczników wytwórcy (Uwaga: zmiana struktury JSON)
|
- Dodano obsługę liczników wytwórcy (Uwaga: zmiana struktury JSON)
|
||||||
## v0.1.2 [2023-10-23]
|
## v0.1.2 [2023-10-23]
|
||||||
|
|||||||
35
src.dev/README.md
Normal file
35
src.dev/README.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[](https://www.home-assistant.io/)
|
||||||
|
# [Energa meter](https://github.com/tcich/ha-addon-energa-meter) Home Assistant add-on
|
||||||
|
|
||||||
|
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
|
||||||
|
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
|
||||||
|
[armv6-shield]: https://img.shields.io/badge/armv6-yes-green.svg
|
||||||
|
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
|
||||||
|
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
|
||||||
|
![aarch64-shield]
|
||||||
|
![amd64-shield]
|
||||||
|
![armv6-shield]
|
||||||
|
![armv7-shield]
|
||||||
|
![i386-shield]
|
||||||
|
|
||||||
|
**Podoba Ci się?** [Postaw kawę.](https://buycoffee.to/tcich)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## O dodatku
|
||||||
|
|
||||||
|
To jest dodatek dla [Home Assistant](https://www.home-assistant.io/). Instalacja dodatku [Energa meter](https://github.com/tcich/ha-addon-energa-meter) umożliwia cykliczne pobieranie danych z aplikacji [Mój Licznik - Energa](https://mojlicznik.energa-operator.pl) udostępnianej klientom Operatora energetycznego Energa, pobierane są zarówno aktualne stany liczników jak i dane historyczne. Dzieki temu możliwe jest generowanie wykresów oraz analiza danych z użyciem zaawansowanych narzędzi, np. Grafana
|
||||||
|
|
||||||
|
## Możliwości:
|
||||||
|
* Obsługa liczników jako sensory
|
||||||
|
* Wykresy w Grafana
|
||||||
|
|
||||||
|
## Instalacja
|
||||||
|
|
||||||
|
Instrukcja instalacji jest dostępna pod adresem: [Instrukcja konfiguracji](https://github.com/tcich/ha-addon-energa-meter/blob/main/README.md)
|
||||||
|
|
||||||
|
## Motywacja
|
||||||
|
|
||||||
|
**Podoba Ci się?** [Postaw kawę.](https://buycoffee.to/tcich)
|
||||||
|
|
||||||
|
|
||||||
BIN
src.dev/icon.png
Normal file
BIN
src.dev/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
src.dev/logo.png
Normal file
BIN
src.dev/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
26
src.dev/rund.sh
Normal file
26
src.dev/rund.sh
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
USERNAME="$ENERGA_USERNAME"
|
||||||
|
PASSWORD="$ENERGA_PASSWORD"
|
||||||
|
|
||||||
|
if [ -z "$USERNAME" ]; then
|
||||||
|
echo "Błąd: Zmienna ENERGA_USERNAME jest pusta. Proszę podać wartość."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$PASSWORD" ]; then
|
||||||
|
echo "Błąd: Zmienna ENERGA_PASSWORD jest pusta. Proszę podać wartość."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Uruchamiam API"
|
||||||
|
python api.py &
|
||||||
|
echo "Uruchamiam MAIN"
|
||||||
|
python main.py
|
||||||
|
echo "Uruchamiam CRON"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
python cron.py
|
||||||
|
echo "Czekam..."
|
||||||
|
sleep 1800
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user