Notification Service for Chia Farm
The notification service consists of two main parts: the local program and the server. The server has already been deployed on notif.xch.wiki, which you can directly use, or you can deploy your own server.
Important Note
- This program is free and open source. Please configure it according to this documentation. Do not run any pre-compiled versions from other individuals, as it may pose risks of coin theft or mnemonic phrase theft.
- Under no circumstances should any files within the "ssl" folder be disclosed to anyone, as the consequences are the same as mentioned above👆.
- Disclaimer: I do not assume any responsibility for any consequences resulting from the use of this program.
Installation methods are omitted.
If you're using Windows, remember to add the environment variable during installation for easier operations later: check
Add install dir to PATH
.
git clone git@github.com:nongyehezuoshe/chia-farm-notif.git
Alternatively, you can visit https://github.com/nongyehezuoshe/chia-farm-notif, download the compressed package directly, and then extract it locally.
Install Python dependencies:
pip install websockets requests uuid pySMART
Install system dependencies:
sudo apt install smartmontools
For Windows systems, please visit https://www.smartmontools.org/wiki/Download#InstalltheWindowspackage to download and install.
For Windows installation, make sure to check (default checked)
Add install dir to PATH
Navigate to the chia-farm-notif/config directory
, copy the options_en_sample.json
file and rename it to options.json
, then edit it:
cd chia-farm-notif/client/config
sudo cp options_zh_CN_sample.json options.json
sudo vi options.json
Windows users can open it with any text editor to make modifications.
Below are explanations for each option in the configuration file (brief explanations are already provided in the file). Make the necessary modifications (modify the value field) based on your specific situation.
chia_server
: The address of the Chia service, usually no need to modify.
chia_ssl
: The path to the SSL certificate folder. The folder path is usually in the current user directory. For Ubuntu systems, if the current user is root
, it would be /root/.chia/mainnet/config/ssl
, while regular users may find it at /home/<username>/.chia/mainnet/config/ssl
. For Windows users, it is generally located at C:\Users\<username>\.chia\mainnet\config\ssl
.
Note: Please replace
<username>
with your own username. In Linux paths, use/
as the slash, while in Windows paths, use\
. Please pay attention to this distinction, which will not be further explained.
lang
: Language. en
for English, zh_CN
for Simplified Chinese.
url_wechat
: The URL of the WeChat push service. Here, it is recommended to use the service at https://xz.qqoq.net. Follow the instructions on the website, scan the QR code to subscribe, then go to the webpage backend's "Single Push" > "Push Information" > "Interface"
, and copy the URL from there.
url_serve
: The URL for server-side push, which refers to the server of this program. If you are using the server deployed by the author, keep it as https://notif.xch.wiki without modifications. Otherwise, enter the URL of your own deployed server.
name
: Customized name for each machine to distinguish them.
enable_wechat
: Enable WeChat push. If not needed, change it to false
.
enable_email
: Enable email push. If not needed, change it to false
. Email push relies on the server. The relevant information will be sent to the server, which will handle the email sending.
email
: The receiving email address for email push.
notif_reward
: Enable block found notifications. If not needed, change it to false
.
notif_point
: Enable plotting point notifications. If not needed, change it to false
.
notif_point_interval
: If the sieved points passed in the current hour decrease by this percentage compared to the previous hour, a notification will be pushed. The default value of 0.2
means a 20% decrease in plotting point will trigger the notification.
notif_offline
: Enable offline notifications. If not needed, change it to false
. This notification relies on the server.
notif_offline_interval
: Interval for offline detection, in minutes. If not needed, change it to false
. The minimum interval required is 30 minutes.
notif_sync
: Enable full node synchronization anomaly notifications. If not needed, change it to false
.
notif_sync_interval
: Interval for rechecking full node synchronization anomaly, in minutes.
notif_temperature
: Enable disk temperature anomaly notifications. If not needed, change it to false
.
notif_temperature_interval
: Interval for checking disk temperature, in minutes.
notif_temperature_temp
: Threshold temperature for disk temperature anomaly notifications, in °C.
temperature_content
: Include disk temperature information in all notifications. If not needed, change it to false
. When this option is enabled, disk temperature information will be attached after each notification.
Since obtaining the hard drive temperature relies on the third-party software "smartmontools," it may be necessary to run this software with administrator privileges in order to obtain the hard drive temperature. Otherwise, it may not be possible to retrieve the temperature information.
Go back to the chia-farm-notif/client folder
, then run notif.py
:
For Linux, if it's a server system, it is recommended to use screen
to keep the program running continuously:
screen -R notif
For desktop systems, simply run:
cd ..
./notif.py
For Windows:
cd ..
python notif.py
Once the program is running, it will send a prompt message. Please check and confirm.
1、Submit bugs.
2、Share your requirements.
3、If this program has been helpful to you, donations are welcome.
xch19arzhau6gjs6lamn6qzy8ene9kt2sdvtkxfujeac34ycjte4l64qse8rg6