Code Monkey home page Code Monkey logo

Comments (5)

0x67 avatar 0x67 commented on September 24, 2024

Did you manage to find a way to fix this?
I also have the same error.

from bolt-iot-wrapper.

rishabhAjay avatar rishabhAjay commented on September 24, 2024

Did you manage to find a way to fix this?
I also have the same error.

No I couldn't find a way of getting it to work. I used Axios instead to fetch the Bolt Cloud API.
Something like this:

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://cloud.boltiot.com/remote/'+ process.env.DEVICE_API + '/isOnline?&deviceName=' + process.env.DEVICE_ID,
  headers: { }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

If you want to read more, here is the source: axios API Bolt

from bolt-iot-wrapper.

0x67 avatar 0x67 commented on September 24, 2024

My previous workaround was using the python version of bolt-iot + socketio to transfer data in real-time, but it was a hassle configuring the serial (for both sending data & making the device actually do something), plus I reach the API limit easily while testing it so I switch to Johnny-Five instead.

Here's my sample code, just in case anyone else come here with the same problem.
carbon

I think it's a very hacky implementation (the socket-io part), but it works for my case, so if you know the better implementation let me know.

from bolt-iot-wrapper.

rishabhAjay avatar rishabhAjay commented on September 24, 2024

My previous workaround was using the python version of bolt-iot + socketio to transfer data in real-time, but it was a hassle configuring the serial (for both sending data & making the device actually do something), plus I reach the API limit easily while testing it so I switch to Johnny-Five instead.

Here's my sample code, just in case anyone else come here with the same problem.
carbon

I think it's a very hacky implementation (the socket-io part), but it works for my case, so if you know the better implementation let me know.

Thanks! Will try Johnny-Five npm package.

from bolt-iot-wrapper.

0x67 avatar 0x67 commented on September 24, 2024

Thanks! Will try Johnny-Five npm package.

Glad to be a help!

from bolt-iot-wrapper.

Related Issues (2)

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.