codetunez / mock-devices Goto Github PK
View Code? Open in Web Editor NEWA desktop simulator for running mock devices connecting to an Azure IoT Hub
License: MIT License
A desktop simulator for running mock devices connecting to an Azure IoT Hub
License: MIT License
Hi,
First off - nice tool. Using it for a demo and it's working well. I've written a couple of plug-ins for it and I'm testing them.
One thing I noticed is that if I have a plan with a loop that sends a value on a regular interval, the time in which the message is sent is consistently about 6-7 seconds longer than specified.
For example, with my plugin, I'm sending 'presence' every 30 seconds (or at least I think I am - the docs are a little vague)
If you look at the timing of the sends, they are generally in the 36-37 second range
I see this consistent delay regardless of the frequency with which I send messages (i.e. if I send every 5 seconds, they get sent every 11-12 -- 6-7 second delay)
It's not a major deal, as my data doesn't need to be precise, but I'm just curious if it's a bug? by design? javascript overhead? am I using it wrong?
Like in Quickstarts SimulatedDevice.js:
// Add a custom application property to the message.
// An IoT hub can filter on these properties without access to the message body.
message.properties.add('temperatureAlert', (temperature > 30) ? 'true' : 'false');
Hi Team, I need help, I am not able to build the project, I uninstall/install the modules and follow up all of the instructions (clean, rebuild node-sass, etc.), but I've got the same error:
npm ERR! code 1
npm ERR! path C:\Users\dell\mock-devices-master\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\dell\mock-devices-master\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\Program Files\nodejs\node.exe',
npm ERR! gyp verb cli 'C:\Users\dell\mock-devices-master\node_modules\node-gyp\bin\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb which
failed Error: not found: python2
npm ERR! gyp verb which
failed at getNotFoundError (C:\Users\dell\mock-devices-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb which
failed at F (C:\Users\dell\mock-devices-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb which
failed at E (C:\Users\dell\mock-devices-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb which
failed at C:\Users\dell\mock-devices-master\node_modules\which\which.js:89:16
npm ERR! gyp verb which
failed at C:\Users\dell\mock-devices-master\node_modules\isexe\index.js:42:5
npm ERR! gyp verb which
failed at C:\Users\dell\mock-devices-master\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb which
failed python2 Error: not found: python2
npm ERR! gyp verb which
failed at getNotFoundError (C:\Users\dell\mock-devices-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb which
failed at F (C:\Users\dell\mock-devices-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb which
failed at E (C:\Users\dell\mock-devices-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb which
failed at C:\Users\dell\mock-devices-master\node_modules\which\which.js:89:16
npm ERR! gyp verb which
failed at C:\Users\dell\mock-devices-master\node_modules\isexe\index.js:42:5
npm ERR! gyp verb which
failed at C:\Users\dell\mock-devices-master\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb which
failed code: 'ENOENT'
npm ERR! gyp verb which
failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb which
succeeded python C:\Python310\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Python310\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\dell\mock-devices-master\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\dell\mock-devices-master\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dell\AppData\Local\npm-cache_logs\2021-12-07T12_16_10_319Z-debug.log
Tks a lot!
2021-12-07T10_15_22_547Z-debug.log
Hi,
Do (or will) you have support for csv files? So I can emulate devices but based on real data from the machine?
I was super excited to see this project, but then I noticed that you only support working through IoT Central - but pure IoT hub is in your plans, it seems. What help would be needed to get this working directly with an IoT hub? I'm open to helping with a PR if there's a rough plan for what needs doing...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.