Reading the datasheet, I don’t think your code is doing this correctly. When you do the read, you’re sending 0x04 as the first databyte - not the address - then reading 2 bytes. The datasheet indicates that if there’s no read command sent (and you’re not sending one) any read will read from offset 128, so that’s likely what you’re reading.
The first 2 bytes are “frame index”, which increment on every read, so you should see the number increase every 5 seconds. Do you see that?
What you seem to need to do is to read the “output digital scaling” value (bytes 10 & 11), and the “sensor baseline” value (bytes 41 and 42), and use these, combined with the sensor reading, to work out the force.
To read these two, you need to send a read command to the chip as noted in section 2.4.2. Something like this should work:
// Get output digital scaling 16 bit value
i2c.write(i2cAddress, "\x01\x0a\x02\xff"); // read command, 2 bytes at offset 10
local ods_raw = i2c.read(i2cAddress, "", 2);
local outputdigitalscaling = (ods_raw[0]<<8)+ods_raw[1];
// Get sensor baseline 16 bit value
i2c.write(i2cAddress, "\x01\x29\x02\xff"); // read command, 2 bytes at offset 41
local bl_raw = i2c.read(i2cAddress, "", 2);
local baseline = (bl_raw[0]<<8)+bl_raw[1];
// Now read the actual value; no read command is required to be sent first, but we'll read 6 bytes to fetch registers 128-133 inclusive
local reading = i2c.read(i2cAddress, "", 6);
local frameindex = (reading[0]<<8)+reading[1];
local timestamp = (reading[2]<<8)+reading[3];
local sensoroutput = (reading[4]<<8)+reading[5];
// calculate singletact_output per datasheet section 2.5. Note multiplication of outputdigitalscaling by a float to ensure a float division happens
local output = ( (sensoroutput - baseline) / (1.0 * outputdigitalscaling) ) + 255;
server.log(format("frameindex %d, timestamp %fs, output %f", frameindex, timestamp*0.0001, output));