Coder Social home page Coder Social logo

Comments (11)

dtex avatar dtex commented on August 26, 2024

In the event that the device is unreachable using opts.host and opts.port will it:

  1. Fail and notify user of the likely cause

or

  1. Automatically hit the cloud for the new host info and warn the user (and emit the event).

Both seem reasonable, just wondering.

from particle-io.

BrianGenisio avatar BrianGenisio commented on August 26, 2024

Here is what I think:

If we go with the explicit bypassCloud: true, then failure will be failure.
If we go with the implicit {host, port}, then failure will try to get it from the cloud endpoint

The code currently makes it seem like you can define the host and port, but right now, it doesn't actually use the user-supplied values. The more I think about it, the more I like the implicit mechanism.

from particle-io.

BrianGenisio avatar BrianGenisio commented on August 26, 2024

To argue with myself, this feature could create chaos.

Scenario: The internet becomes unreliable at an event, and the organizer tells them to use the known IP address. The IP addresses change for some reason. People are now controlling each others' bots.

I can see that being a pretty big problem. A deviceId/handshake could help with that... but now it gets complicated.

from particle-io.

dtex avatar dtex commented on August 26, 2024

Whoah! I didn't know that. You don't need some kind of key or unique identifier to connect to a device via VoodooSpark?

from particle-io.

BrianGenisio avatar BrianGenisio commented on August 26, 2024

No. If you have the IP:Port, that is all you need to know to control the device. You need the deviceID/accessToken in order to retrieve the IP:Port from the cloud endpoint... but not to connect to the device on the local network. So the bypassCloud option could solve one problem, and create another at a big event.

from particle-io.

rwaldron avatar rwaldron commented on August 26, 2024

If...

new Particle({
  host: ...,
  port: ...
});

Can that imply "bypass the cloud"?

from particle-io.

dtex avatar dtex commented on August 26, 2024

No. If you have the IP:Port, that is all you need to know to control the device.

I wish I had known this when battling @makenai in Sumobots

from particle-io.

BrianGenisio avatar BrianGenisio commented on August 26, 2024

@rwaldron Most definitely. I'm just trying to figure out if we want an implicit or explicit interface. Or if this is something I should do at all.

from particle-io.

rwaldron avatar rwaldron commented on August 26, 2024

@BrianGenisio got it. It's definitely worth investigating

from particle-io.

canda avatar canda commented on August 26, 2024

Perhaps we may use the cloud service to confirm the ip address if
available, or add a new function to the firmware to get the device id

El lun, 28 de septiembre de 2015 12:21, Rick Waldron <
[email protected]> escribió:

@BrianGenisio https://github.com/BrianGenisio got it. It's definitely
worth investigating


Reply to this email directly or view it on GitHub
#67 (comment)
.

from particle-io.

tylergraf avatar tylergraf commented on August 26, 2024

How do I get the port of my photon on a local cloud? Is it the CoAP port defaulting to 5683?

from particle-io.

Related Issues (20)

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.