Giter Site home page Giter Site logo

oakcli's People

Contributors

darklotus avatar ekettenburg avatar jhitze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

oakcli's Issues

OakCLI will crash with accounts having more than 32 devices

Due to usage of readlineSync.keyInSelect() to display the device list and get input, Particle accounts having more than 32 devices will cause OakCLI to crash, as readlineSync.keyInSelect() has a limit of 35 entries. Some processing needs to be added to split the device list into more management chunks, which should then mitigate the issue.

The compiled exe will throw the following message

nexe.js:43674
    { throw '`items` must be Array (max length: 35).'; }
      ^
`items` must be Array (max length: 35).

Whereas the source run through node will throw the following (similar) message:

C:\Users\Peter\Desktop\OakCLI\node_modules\readline-sync\lib\readline-sync.js:1263
    throw '`items` must be Array (max length: 35).';
    ^
`items` must be Array (max length: 35).

http://digistump.com/board/index.php/topic,2489.msg11969.html#msg11969

Refine/update documentation?

Greetings,

I just wrestled with building this for probably an hour. Would you kindly take a look at my observations/experience and consider updating the documentation if they're legitimate? I don't use nodejs, so I'm not sure if I just missed something obvious or if there are actually some missing steps in your procedure.

  1. I'm using arch linux so the contents of build-essential are not known to me. Since I have general make tools installed, I assumed I was good. While Ubuntu is obviously quite common, it would be nice to list out what's required for other distros.

  2. Install of nexe went fine, but upon running nexe -r 0.12.10 -i ./oak.js -o ./oak, I kept getting errors about missing modules. Being a noob, I just relied on the npm install -g nexe command to install the module named in the error (readline-sync, spark, ...) and re-run the nexe command. Through this cycle, it would return to complaining about a previous module I'd installed (couldn't find readline-sync, so I'd install it with npm install -r ..., then complain about spark, install that, and then back to saying it couldn't find readline-sync). In digging around I found the linux_build.sh script and saw that it didn't feature the -g option (and also I saw the general npm install which I guessed pulled in everything in one shot). Running that (npm install) worked. I'm sure you're aware of this, but I'm writing it out as it might not be obvious to others.

  3. Are you aware of how other distributions install python? For example, is it typically installed with symlinks to python2 and/or python2.x? On arch linux, python defaults to python3, so I got a bunch of barf about print statements not being valid. I tried hunting around for any #!/usr/bin/python commands to change them to /usr/bin/python2, but couldn't seem to track them all down. I ended up just deleting the default /usr/bin/python symlink and re-creating it to point to python2.

Now that I write all of that, it really doesn't seem like much but I promise it was a headache! I thought I'd note my experience here in case it can help others or serve to improve the documentation. I'd be happy to add something like a troubleshooting or other distros section to README.md if you'd want any help with the docs?

Issue with OakCLI bin on Ubuntu 14.04.3 LTS

After upgrading to 0.9.3, kept getting Config file not found at: /home/(my home dir)/.oak/config.json. Confirmed the file was writing successfully, logging in fine.

Finally tracked down that the IDE on my system was calling it at:
~/.arduino15/packages/digistump/tools/oakcli/0.9.3

Even tried the latest oak-linux-64 binary from #1
(https://github.com/digistump/OakCLI/files/128755/oak-linux-x64.zip) same issue.

Replaced ~/.arduino15/packages/digistump/tools/oakcli/0.9.3/oak binary with old copy, message doesn't show issue, confirmed upload works after replacing bin.

Build OakCLI for Linux32, Linux64, OSX

Builds clean with nexe - if anyone has a chance to build on these platforms and upload it would be much appreciated.

Install node.js
Install python
"npm install -g nexe"
Download this repository, cd to it
"npm install"
"nexe -i ./oak.js -o ./oak"
Upload executable here

Cannot read property Error

With the OakCLI 1.0.0 I get this
Logging in to Particle...
No devices available.
Press enter to exit.
With OakCLI 1.0.2 I get this
Logging in to Particle...
nexe.js:43520
if(err.code !== undefined){
^
TypeError: Cannot read property 'code' of null
at nexe.js:43520:13
at Spark.emitAndCallback (nexe.js:31377:42)
at null. (nexe.js:31505:10)
at Request.self.callback (nexe.js:28860:22)
at Request.emit (events.js:110:17)
at Request. (nexe.js:29697:10)
at Request.emit (events.js:129:20)
at IncomingMessage. (nexe.js:29624:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

I really want to use my oaks. Why am I getting these errors? I'm on OSX 10.11.4 and my oak has a local IP address.

Problem running oak CLI on Linux Mint 17.2 32-bit

I get this error when I run ./0.9.1/oak on my system:

./0.9.1/oak: /usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./0.9.1/oak)

It looks like it's compiled for a different version of glibc than I have.

$ cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.2
DISTRIB_CODENAME=rafaela
DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"

$ dpkg -l | grep libstdc
ii libstdc++6:i386 4.8.4-2ubuntu1~14.04.1 i386 GNU Standard C++ Library v3

Triple Blink achieved - but no Particle registered units?

I got final 6 OAKS today.

  • On my Phone I followed and logged onto Particle : http://rawgit.com/digistump/OakSoftAP/master/config.html
  • Went offline to the ACORN_XXX WiFi
  • Of the 6 two ended up doing the TRIPLE BLINK ready to take an IDE upload.
  • The other four went through what appeared to be the update process - various faster blinks and such, but no Triple Blink
  • In the end after hours away the only OAK I have showing or Particle dashboard is my initial BATE OAK from 2/25?

I assume I did the right URL to rawgit - it was stored in my phone, did a timeout countdown to allow the update to complete?

  • I did cheat and waited for the timeout
  • I then powered the next OAK, connect to its new ACORN_XXX WiFi
  • I then went back and did 'Retry' and it proceeded just fine without having to log in again
  • It was on the middle of these 6 units that two went to 'Triple Blink'
  • Still no new units on Particle - so I cannot select one to upload from the IDE?

I've got a few minutes again - I'll go through the six and see if they are powering up as ACORN_XXX or joining the network?

nexe.js:42967

Using OakCLI 1.0.0 on Max OS X 10.11.4

Logging in to Particle...
nexe.js:42967
if (config.devices[activeDeviceIndex].device_name !== undefined && activ
^
TypeError: Cannot read property '-1' of undefined
at nexe.js:42967:25
at Spark.emitAndCallback (nexe.js:31179:42)
at null. (nexe.js:31307:10)
at Request.self.callback (nexe.js:28662:22)
at Request.emit (events.js:110:17)
at Request. (nexe.js:29499:10)
at Request.emit (events.js:129:20)
at IncomingMessage. (nexe.js:29426:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16

I thought maybe there was an old /home/user/.oak/config.json but I couldn't find anything. I then rebuilt the file from source and had the same error.

Don't mix double quote with single quote in code

With nodeJS don't use double quote (") for text, only single quote.
I have a pull request ready but, my oak seem to be dead and i cannot test for now (i will reset oak when i will back to home).
Other changes :

  • Error messages in red,
  • check the particle cloud order (error if offline or inline messages are detected before the flashing succes message),
  • double quotes remplaced by simple quotes,
  • code reformatting.

Remark : keep the content test for 'spark/flash/status' message because you can have a failed here, not always success (i saw this message only once in the particle dashboard).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.