I've noticed there's a bunch of people running into the same issues when trying to control their MegaPi from a RPi3 so I've created a Github where I've documented the instructions & fixed some of the code to work correctly.
I plan to keep updating it as I have time to experiment and play, for myself and others if they need. If anyone is feeling frisky and would like to help out, just let me know and we can add you to the repo.
Right now it's just the Sketch firmware for the MegaPi on the repo but I will add the Python and Node files if necessary. All of the documentation is on the README and will get better over time but if you have any questions or feedback in the mean-time let me know. Keep in mind this is a hobby in my spare time please! I'm not claiming to be an expert so if you are you, you should be added to the GIT repo.