The objective of this study is to design a comprehensive energy simulator to estimate the lifetime and energy consumption of IoT nodes. The design of WirelessEnergySim relies on the empirical data obtained from wireless sensor nodes with energy harvesters. The inputs of the simulator are: the measurements of the power for MCU operation, data transmission, listening/reception, LED activation and characteristics of the in-house electromagnetic energy harvester recorded under different node duty cycles. The outputs are the power consumption of each component of the node, current flow variations, the operation lifetime and the amount of harvested energy. WirelessEnergySim predictions agree with experimental observations of the power level and the lifetime of the IoT node.