If you really want to do it by yourself then I recommend you to look at my project https://github.com/alex-konshin/f007th-rpi
It basically does what you need but for the different sensor (Ambient Weather F007TH). Of course, in your case the protocol is different but you will get an idea how such things should be implemented.
Actually I will update this project soon because I have implemented a driver that should simplify implementation of such utilities. Basically the driver will replace and eliminate the need of pigpio library and will make possible to write a code that will work on other platforms (Banana Pi M3 and MinnowBoard Turbot https://store.netgate.com/Turbot4.aspx
in my nearest plans). The driver already works but I am still debugging it.