Please follow the instructions given in Raspberry PiOX Configuration Guide to setup the environment for PiOX Demo. Link: https://docs.google.com/document/d/1Qu8bVfiNpsoYC_bs_jVx36Xi3TYSlCmtabHmFrruvsk/edit?usp=sharing
For description of the IO Expander Protocol refer to the following link: https://geotab.github.io/sdk/hardware/developing-an-iox/messaging-protocol/