
OpenHAB Lunar Calendar
- Vietnamese lunar calendar for OpenHAB by
AIoT.io.vn
. The file is based on the original repository:
https://github.com/quangvinh86/SolarLunarCalendar/blob/master/LunarSolar.py. - Adds solar terms, Buddhist calendar dates, and annual holidays and anniversaries using the algorithm by Ho Ngoc Duc.
Requirements
- Download OpenHABLunarCalendar.py .
- Create these items in OpenHAB:
AL_PhatLich- StringAL_ThangNhuan- Number (0 = not a leap month, 1 = leap month)AL_Holiday- StringAL_TietKhi- StringAL_CanChiNam- StringAL_CanChiThang- StringAL_CanChiNgay- StringAL_Today- DateTime
- Edit the information on lines
296and319-326of the script. - Create a rule that runs the script every day at 00:01.
Copy the file to OpenHAB userdata
The default userdata directory is /var/lib/openhab/; adjust it for your installation.
mkdir /var/lib/openhab/amlich
wget -O /var/lib/openhab/amlich/OpenHABLunarCalendar.py https://raw.githubusercontent.com/NghiaMaster/OpenHAB-Lunar-Calendar/refs/heads/main/OpenHABLunarCalendar.py
chown openhab:openhab /var/lib/openhab/amlich/OpenHABLunarCalendar.py


Góp Ý / Bình Luận / Đánh giá