With the rapid development of high speed railway all around the world, the real-time monitoring is absolutely necessary for the safety running of high speed train. However, traditional monitoring method requires external power supply, and wired system makes the monitoring messy. Here, we reported a self-powered wireless smart sensor, powered by vibration energy of trains via a maglev porous nanogenerator (MPNG) when the train is running. Integrated MPNG including a triboelectric nanogenerator (TENG), which delivers a peak power density of 0.34mW/g at 50MΩ, and an electromagnetic generator (EMG), which delivers a peak power density of 0.12mW/g at 700Ω. Through a power management circuit (PMC), the MPNG is proved to power 400 commercial light-emitting diodes (LEDs). What's more, various supercapacitors and Li-ion battery can be charged by MPNG arrays, where the supercapacitor of 0.1F can be charged from 0V to 3V in approximately 350s. A wireless smart sensor can be sustainably powered by MPNG arrays, transmitting real-time data to a cellphone, demonstrating the capability for Internet of Things, especially in the train monitoring system.