I need some of your help, I am very understand SPARK protocols, including file:
spark_protocol.h and spark_protocol.cpp.it is the http protocol to achieve it?
give me some tips or an overall framework flowchart or diagram you?
I guess you are Chinese?
core <ā> Cloud(server) with SSL encryption <ā> REST API for mobile/web Apps
Itās using COAP Protocolā¦
Files to handle communication is here: https://github.com/spark/core-communication-lib
yes you must be Chinese
Can tell me a email,Facilitate communicationć
Hi @linjinxing,
Good question, I have a post here where I talk about the core -> cloud connection, and the security protocol: https://community.spark.io/t/how-does-sparkcore-maintain-connection-to-cloud-api/2300/2?u=dave
Thanks,
David
hi @Dave @bko @FelipePlets
SPARK protocols use COAP why not use some Open Sourceļ¼Why not use open source, and write their own code to achieve COAP agreementćSuch asļ¼libcoapļ¼http://sourceforge.net/projects/libcoap/developļ¼
moreļ¼http://en.wikipedia.org/wiki/Constrained_Application_Protocol
Thanks
LIN
Hi @linjinxing,
CoAP is an open specification like HTTP. We do use Open Source libraries for CoAP on the server side, and we wrote our own byte-specific implementation on the Core due to the constraints of the system and so that as much space was leftover as possible. CoAP as is didnāt have an encryption layer we felt was usable / strong enough, so thatās why we added an AES layer on top of it. We hope to contribute back improvements we make along the way back if we can.
Thanks,
David
Do you maybe have any sketches, diagrams, any documentation about how the protocol works or how was it designed?
Iām kind of hacking home automation and want to integrate Spark Core with existing system. I need to omit the cloud as Iām going to control my bedroom lights (through both Android and capacity sensors), but the internet in my area breaks too often.
Have you considered setting up a local cloud? It can run on a raspberry pi and provide you with all the cool Cloud functions, without the need for an internet connection. Definitely take a look at it. Depending on what youāre running your H.A. on, this might even be neater to implement
Have you had a look into the āLocal Cloud Serverā?
Or you could do direkt TCP/UDP communication with the out-if-the-box TCPServer/TCPClient and UDP objects (which may still have some childhood issues).
You might like to look into SEMI_AUTOMATIC
or MANUAL
mode, too.
Darn, @Moors7 has beaten me to it
@Moors7: Yes. Right now Iām running spark-server on Raspberry Pi, but there are dozen other things running on it and sometimes itās a bit slow.
@ScruffR: Thanks, Iām aware of all of these and Iām using it. I like Spark Protocol in case I want to switch back or so.
Being a hacker at heart I want to hack my own solution
Hi @orian,
The local Spark Server and Spark protocol are there so you can hack your own solution at home. Iād recommend diving into the source code and digging around, thatās the easiest and fastest way to learn the protocols and services.
Thanks,
David