Howto write modules to storage? #1689
Replies: 11 comments
-
Posted at 2024-04-19 by @gfwilliams You can upload them using the normal I don't think the IDE is smart enough to know that the modules are actually installed on the device and to not re-upload them, but nothing stops you from renaming it |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-19 by @MaBecker Many thanks for your quick response. Yes the WebIDE will always reload the module. Small modules I manually store and add Copy paste from browser to the WebIDE does not look nice. Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-19 by @MaBecker use
Now you can use it like this:
As this does not happen to often, I am fine with those manual steps ;-) Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-19 by @MaBecker Hmm, ist does not work with MQTT.min.js
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-20 by @MaBecker ok, there are 3 line of code in MQTT.js that cause this. line 234
line 320
line 386
Just created a pr for this and added a screenshot using it as Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-22 by @gfwilliams I merged that PR as the code looks like an improvement, but the original code isn't broken. Uploading by copy/pasting into a templated str is a pretty bad idea as if you have any escape characters in strings they need double-escaping like Upload via the IDE menu is much safer |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-23 by @MaBecker This is the way I try to use:
Did the upload and got errors, guess I am missing something.
Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-23 by @gfwilliams I think you've misunderstood - there is an actual button for uploads!
Uploading your way will work but as you noted it's messy! In your case, you can ignore the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-23 by @MaBecker Wow, way to easy - many thanks for clarification! Is this possible via command line too? Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-23 by @gfwilliams
yes!
I think that works - can't remember for sure now - it's possible it attempts to write using |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-23 by @MaBecker Yes, perfect. Many thanks for implementing all this super helpfull stuff.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-19 by @MaBecker
Sometimes uploading is taking too long because you use larges modules like MQTT. Is there an easy way to save the loaded module to storage. So next time you uses
mqtt = require("MQTTS")
.Beta Was this translation helpful? Give feedback.
All reactions