Piezoelectric energy harvesting is a promising technology that increases the autonomy of low power IoT devices in scenarios that are subjected to mechanical vibrations. This work shows the potential of this technology to power IoT devices with the energy that is harvested from vibrations occurred during air and road transportation. Adjusting the natural resonance frequency of the piezoelectric generator (PEG) to the mechanical acceleration frequency that has the highest power spectral density is key to increase the harvested energy. Therefore, in this work a commercial PEG is tuned to the best spectrogram frequency of a real vibration signal following a two-phase tuning process. The harvested power generated by the PEG has been validated in real scenarios, providing 2.4 μ Wh during flight (take-off, cruise flight, and landing), 11.3 μ Wh during truck transportation in urban areas, and 4.8 μ Wh during intercity transportation. The PEG has been embedded in an ultra-low power IoT device to validate how much this harvested energy can increase the autonomy in a real scenario that is subjected to similar vibrations. An NFC temperature data logger is developed for perishable products that are transported by air and road transports. The energy harvested by the PEG tuned with the methodology proposed in this work has increased the autonomy of the data logger 16.7% during a real use case of 30 h, which validates the potential of the piezoelectric energy harvesting technology to increase the autonomy of future low power IoT devices used in scenarios with aperiodic vibrations.