P8 there isn't one, do you mean P5 ?
How many motor wires are there, 8 or 9 ?
8 wires means it has no internal speed sensor and will need an external wheel sensor and spoke magnet, if 9 wires then it will have an internal speed sensor.
Hub most likely a copy of a Bafang SWX type, go with 1:4:3...