You personal assistant
Project description
Energy bot to work with differents energy providers
- poe
- energy_ua (old-version)
Energy providers configuration
You can add own energy provider
- create energy provider worker in providers folder for example poe.py
- this provider must contains two function:
- get_queue_info() - for get current info about queue
- print_queue_info() for output info about queue to console (for debugging)
- provider must use load_data() and save_data() function for bot working correctly with other modules
- you can use html parce to get info about queue and output this data to dict format like:
specific_datetime = {
'text': 'OFF/ON',
'id':n,
'value': False/True
}
Bot configuration
Create .env file
BOT_TOKEN=token
ADMIN_CHAT_ID=adminid
TIMEOUT=15
TURN_ON_NOTIFY=True
PROVIDER=
PROVIDER_URL=
Run bot as service for pooling
Loggin as root to the VM:
systemctl edit --force --full energybot.service
create this unit:
[Unit]
Description=E-Energy Bot Service
Wants=network.target
After=network.target
[Service]
WorkingDirectory=/opt/e-energy
ExecStartPre=/bin/sleep 1
ExecStart=/opt/e-energy/venv/bin/energybot
Restart=always
[Install]
WantedBy=multi-user.target
Eneable service:
systemctl enable energybot.service
Check status:
systemctl status energybot.service
Start if needed:
systemctl start energybot.service
Run worker to process notification and sync to sync information about energy schedule. Schedule it using cron: crontab -e
*/30 * * * * cd /opt/e-energy/ && venv/bin/energybot --run sync # e-energy sync service
*/15 * * * * cd /opt/e-energy/ && venv/bin/energybot --run worker # e-energy worker service
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file energybot-1.1-py3-none-any.whl.
File metadata
- Download URL: energybot-1.1-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37fa3737d8919d4bfe9532d86ae6f1746a4ee7577692dc284669cfad4c9d8ed5
|
|
| MD5 |
521231188aa851cda7c71ef20f320a2e
|
|
| BLAKE2b-256 |
e3bd57714a82077718628f100f8a90b3d597f8e49b4469e1e7083cd205ec9fa9
|