OK, address-scan function also works nicely from Function node:
27 Dec 07:52:10 - [info] Started modified nodes
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Flow:
[{"id":"ddbdc4be.f2f5b8","type":"function","z":"34aad6f7.b85c6a","name":"I2C 1 addr scan","func":"'use strict';\n\n// When run, this program will output the same information as the\n// command 'i2cdetect -y -r 1'\nvar fs = '-'; // = global.get('fs');\nconst i2c = global.get('i2c');\nconst i2c1 = i2c.openSync(11);\n\nconst EBUSY = 16; /* Device or resource busy */\n\nconst scan = (first, last) => {\n fs = ' 0 1 2 3 4 5 6 7 8 9 a b c d e f';\n\n for (let addr = 0; addr <= 127; addr += 1) {\n if (addr % 16 === 0) {\n fs += '\\n' + (addr === 0 ? '0' : '');\n fs += addr.toString(16) + ':';\n }\n\n if (addr < first || addr > last) {\n fs += ' ';\n } else {\n try {\n i2c1.receiveByteSync(addr);\n fs += ' ' + addr.toString(16); // device found, print addr\n } catch (e) {\n if (e.errno === EBUSY) {\n fs += ' UU';\n } else {\n fs += ' --';\n }\n }\n }\n }\n\n fs += '\\n';\n};\n\nscan(0x3, 0x77);\n\nconsole.log(fs);\nmsg.payload = fs;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":340,"y":520,"wires":[["c4cdd96b.8ccbf"]]},{"id":"c4cdd96b.8ccbf","type":"debug","z":"34aad6f7.b85c6a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":550,"y":520,"wires":[]},{"id":"87286abf.36c54","type":"inject","z":"34aad6f7.b85c6a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":180,"y":520,"wires":[["ddbdc4be.f2f5b8"]]}]
+1 step forward.