Comments (11)
In the event that the device is unreachable using opts.host and opts.port will it:
- Fail and notify user of the likely cause
or
- 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.
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.
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.
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.
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.
If...
new Particle({
host: ...,
port: ...
});
Can that imply "bypass the cloud"?
from particle-io.
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.
@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.
@BrianGenisio got it. It's definitely worth investigating
from particle-io.
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.
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)
- Unable to connect to spark cloud.: code: 404 HOT 3
- Add mDNS support for Robustness. HOT 5
- Add tests for internalRGB HOT 1
- internalRGB should return current color when no params HOT 1
- throw error if bad values passed to internalRGB
- pulseIn HOT 3
- Support for Serial on Particle devices HOT 3
- Incompatibilities with Spark CLI 1.2.0 HOT 30
- new five.Button ( TypeError: pin.replace is not a function ) HOT 7
- Support I2C devices HOT 6
- Error connecting to particle cloud HOT 9
- Allow connecting to devices via device name HOT 2
- pin normalization issue when using particle-io and oled-js HOT 2
- pin.replace is not a function HOT 4
- Detect restart of photon HOT 1
- MPU6050 example not working HOT 4
- Board disconnect event HOT 3
- Cloud API not getting stream
- Voodoospark Code copied would not compile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from particle-io.