After scanning the "User and Safety guide" for the Shelly 3EM
[1], what you may be seeing is (in their words), momentary. Per the user guide,
the display of Watt Usage is the Watt being used at that moment. In the app shown in the user guide, they did not sum or average it for you. From what you wrote, I think you already got that. They didn't sum or aggregate data form you. You have to get the data frequently and sum it yourself.
If my interpretation of the user guide is right that the data reported is "momentary" data, this is the scenario:
Think of it this way, if you have a 100 watt light bulb and that is the only thing being monitored.
At the start of 1am, it was off, it turned on at 1:30am. At 2:00 am, the data is read.
So
at 2:00am it shows 100W, you don't know that
it was not ON between 1:00am to 1:30am.
Since it read 100 Watts and if you assumed 100Watt-Hour used, you would be exactly 100% off. You used only 50 Watt-Hour.
If my interpretation is indeed correct, you should probably read the data more frequent and sum it yourself. Say if you read it 1 second interval:
1:00:00am = 0
1:00:01am = 0
1:00:02am = 0
...
1:29:59am = 0
1:30:00am = 100W (this second) = 100/3600 watt hour (3600 seconds/hour)
1:30:01am = 100W (this second) = 100/3600 watt hour (3600 seconds/hour)
...
So at the end, you have 1800 seconds (readings) of 100W/3600 Watt-Hour. Which would give you 50WattHour.
You should test my interpretation that the number transmitted is "momentary". User Guides are often difficult to decode. Hook that darn thing up with something that use a constant amount (like a light bulb), keep it on for the whole hour and see what it reads. Then, do 1/2 hour on and 1/2 hour off and see what it reads.
Personally, I would prefer to go to 1 second instead of 15 seconds interval -- unless the data collection time is sluggish and need more that 1 second to do. Going 15 seconds would expose you to 15 seconds worth of wattage error if something just turned on immediately after a reading is done. With a longer duration, you may have to worry above averaging last and current reading. A 1 second (or even 0.1 second), that reduces the need to worry about that. Your max error would be "max watt thing you can turn on or off" divide by 3600 for the 1 second read. Your program needs to do more summing, but your program likely wont complain about have to do so much more arithmetic. So, sum it as quickly as the data collection / transmission time permits.
If you do want to stick to 15 seconds, each hour has 240 chunks of 15 second (3600/15=240), so read the watt and you have watt/240 WattHour.
Reference:
[1] The User Guide I found on line:
https://kb.shelly.cloud/__attachments/63832224/User%20and%20Safety%20Guide?inst-v=1ab960e4-071b-4043-9129-82bd66a757fc