so I’m trying to get the Plotly library working but somehow openStream() hangs my Photon. It keeps breathing Cyan but doesn’t accept app installs until I manually go into safe mode. I tried directly using the .cpp and .h file from the github version with the same result https://github.com/bigmacd/spark-plotly
I’m using an up to date firmware and other apps work finde. Any pointers or someone else using this library?
It sounds like that app interferes with receiving updates, but isn’t hanging your photon. If it’s breathing cyan, that means it’s online and connected, and your app is running. Sometimes when apps put the device into extended delays, or use up tons of resources, they can impact the ability to receive OTA updates. We’re working on a multi-threading firmware for the photon that should make it harder to negatively impact the ability to receive updates while apps are blocking.
Yes but it also doesn’t work and interestingly the version in the Web IDE hangs in openStream() while the one from github does output updates on the Serial but neither actually work.
Ahh okay, it sounds like maybe some updates to the library might be required for it to work with the latest firmware. I think some people on the team ( @jgoggins and others) are compiling a list of libraries needing updates, Joe can you include this one?
Yep, totally, we’ve collected test results against Core and Photon for the top 100 most popular libraries–spark-plotly is in this list. Slowly but surely we’re hoping to work with library authors and the community to get the examples bundled with popular library to compile correctly. Here are the test results below, they illustrate that this library is definitely in need of some …
Improving the quality of the libraries is a very distributed and self-organizing type of endeavor. @spacenick88 , if you or someone else reading this wants to tackle the task of fixing this library (by collaborating with the author or forking the repo above and getting the library examples to compile) that would be rad.
Spark Plotly Library Example Test Results
[ Tue Aug 25 10:02:31 MDT 2015 ] trying to compile: spark-plotly.
Processing spark-plotly 0.0.10
spark-plotly.ino
photon ✗
core ✗
---
:name: spark-plotly
:version: 0.0.10
:github_url: bigmacd/spark-plotly
:build_url: https://build.particle.io/libs/53c9bb7d3ddde1dee70001fb
:author: martin.cooley@gmail.com
:includes: 84
:test_results:
spark-plotly.ino:
:photon:
:passed: false
:cloud_compiler_response:
ok: false
code: 200
app_id: 55dc919e834be875d2000001
output: App code was invalid
stdout: "make -C ../../../user \nmake[1]: Entering directory `/spark/compile_service/shared/workspace/6_photon_17_3/firmware/user'\nBuilding
file: /spark/compile_service/shared/workspace/6_photon_17_3/firmware/2f4df07adf533e42c6a5864e9f3f5e995214425a9a372e79fb33f7872126/spark-plotly.ino.cpp\nInvoking:
ARM GCC CPP Compiler\nmkdir -p ../build/target/user/platform-6-m/2f4df07adf533e42c6a5864e9f3f5e995214425a9a372e79fb33f7872126/\narm-none-eabi-gcc
-DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon
-DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM
-DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=17 -DUSE_STDPERIPH_DRIVER
-DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.4.4 -DRELEASE_BUILD -I./inc
-I../wiring/inc -I../system/inc -I../services/inc -I../communication/lib/tropicssl/include
-I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon
-I../hal/src/stm32f2xx -I../hal/src/photon/api -I../platform/shared/inc
-I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include
-I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc
-I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc
-I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc
-I../dynalib/inc -I/spark/compile_service/shared/workspace/6_photon_17_3/firmware/2f4df07adf533e42c6a5864e9f3f5e995214425a9a372e79fb33f7872126/
-I./libraries -I. -MD -MP -MF ../build/target/user/platform-6-m/2f4df07adf533e42c6a5864e9f3f5e995214425a9a372e79fb33f7872126/spark-plotly.ino.o.d
-ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations
-fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400
-DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=BCM9WCDUSI09
-fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x20000
-DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=3
-DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,5 -g3 -gdwarf-2
-Os -mcpu=cortex-m3 -mthumb -std=gnu++11 -fno-exceptions -fno-rtti -fcheck-new
-c -o ../build/target/user/platform-6-m/2f4df07adf533e42c6a5864e9f3f5e995214425a9a372e79fb33f7872126/spark-plotly.ino.o
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/2f4df07adf533e42c6a5864e9f3f5e995214425a9a372e79fb33f7872126/spark-plotly.ino.cpp\nmake[1]:
Leaving directory `/spark/compile_service/shared/workspace/6_photon_17_3/firmware/user'\n"
errors:
- |
spark-plotly.ino.cpp:1:26: fatal error: spark-plotly.h: No such file or directory
#include "spark-plotly.h"
^
compilation terminated.
make[1]: *** [../build/target/user/platform-6spark-plotly.ino.o] Error 1
make: *** [user] Error 2
sizeInfo:
modules:
:core:
:passed: false
:cloud_compiler_response:
ok: false
code: 200
app_id: 55dc919e834be875d2000001
output: App code was invalid
stdout: "Building core-common-lib\nmake[1]: Nothing to be done for `all'.\n\nBuilding
core-communication-lib\nmake[1]: Nothing to be done for `all'.\n\nBuilding
user file: ../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly/spark-plotly.cpp\narm-none-eabi-g++
-DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -DDFU_BUILD_ENABLE -DSPARK -I\"../../core-common-lib/CMSIS/Include\"
-I\"../../core-common-lib/CMSIS/Device/ST/STM32F10x/Include\" -I\"../../core-common-lib/STM32F10x_StdPeriph_Driver/inc\"
-I\"../../core-common-lib/STM32_USB-FS-Device_Driver/inc\" -I\"../../core-common-lib/CC3000_Host_Driver\"
-I\"../../core-common-lib/SPARK_Firmware_Driver/inc\" -I\"../../core-common-lib/SPARK_Services/inc\"
-I\"../libraries\" -I\"../../core-communication-lib/lib/tropicssl/include\"
-I\"../../core-communication-lib/src\" -I\"../inc\" -Os -ffunction-sections
-Wall -std=gnu++0x -fno-exceptions -fno-rtti -c -fmessage-length=0 -MMD
-MP -MF\"../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly/spark-plotly.d\"
-MT\"../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly/spark-plotly.d\"
-mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o \"../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly/spark-plotly.o\"
\"../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly/spark-plotly.cpp\"\nFinished
building: ../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly/spark-plotly.cpp\n
\nBuilding user file: ../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly.ino.cpp\narm-none-eabi-g++
-DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -DDFU_BUILD_ENABLE -DSPARK -I\"../../core-common-lib/CMSIS/Include\"
-I\"../../core-common-lib/CMSIS/Device/ST/STM32F10x/Include\" -I\"../../core-common-lib/STM32F10x_StdPeriph_Driver/inc\"
-I\"../../core-common-lib/STM32_USB-FS-Device_Driver/inc\" -I\"../../core-common-lib/CC3000_Host_Driver\"
-I\"../../core-common-lib/SPARK_Firmware_Driver/inc\" -I\"../../core-common-lib/SPARK_Services/inc\"
-I\"../libraries\" -I\"../../core-communication-lib/lib/tropicssl/include\"
-I\"../../core-communication-lib/src\" -I\"../inc\" -Os -ffunction-sections
-Wall -std=gnu++0x -fno-exceptions -fno-rtti -c -fmessage-length=0 -MMD
-MP -MF\"../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly.ino.d\"
-MT\"../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly.ino.d\"
-mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o \"../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly.ino.o\"
\"../96ed5e84075bb5b619756be24d75f0474a03a48a6360b2dd16e700c96d80/spark-plotly.ino.cpp\"\n"
errors:
- |
In file included from ../inc/spark_wiring.h:29:0,
from ../inc/application.h:29,
from spark-plotly/spark-plotly.h:4,
from spark-plotly/spark-plotly.cpp:2:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
#warning "Defaulting to Release Build"
^
spark-plotly/spark-plotly.cpp: In constructor 'plotly::plotly(char*, char*, char**, char*, int)':
spark-plotly/spark-plotly.cpp:19:14: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
timezone = "America/Montreal";
^
spark-plotly/spark-plotly.cpp:20:13: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
fileopt = "overwrite";
^
spark-plotly/spark-plotly.cpp: In member function 'bool plotly::init()':
spark-plotly/spark-plotly.cpp:43:46: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("POST /clientresp HTTP/1.1\r\n"));
^
spark-plotly/spark-plotly.cpp:44:41: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("Host: 107.21.214.199\r\n"));
^
spark-plotly/spark-plotly.cpp:45:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("User-Agent: SparkCore/0.0.1\r\n"));
^
spark-plotly/spark-plotly.cpp:47:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("Content-Length: "));
^
spark-plotly/spark-plotly.cpp:74:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("\r\n\r\n"));
^
spark-plotly/spark-plotly.cpp:77:61: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("version=2.3&origin=plot&platform=arduino&un="));
^
spark-plotly/spark-plotly.cpp:79:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("&key="));
^
spark-plotly/spark-plotly.cpp:81:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("&args=["));
^
spark-plotly/spark-plotly.cpp:84:93: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("{\"y\": [], \"x\": [], \"type\": \"scatter\", \"stream\": {\"token\": \""));
^
spark-plotly/spark-plotly.cpp:86:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("\", \"maxpoints\": "));
^
spark-plotly/spark-plotly.cpp:88:23: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("}}"));
^
spark-plotly/spark-plotly.cpp:90:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F(", "));
^
spark-plotly/spark-plotly.cpp:93:42: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("]&kwargs={\"fileopt\": \""));
^
spark-plotly/spark-plotly.cpp:95:37: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("\", \"filename\": \""));
^
spark-plotly/spark-plotly.cpp:97:41: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("\", \"world_readable\": "));
^
spark-plotly/spark-plotly.cpp:99:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_("true");
^
spark-plotly/spark-plotly.cpp:101:23: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_("false");
^
spark-plotly/spark-plotly.cpp:103:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("}"));
^
spark-plotly/spark-plotly.cpp:105:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("\r\n"));
^
spark-plotly/spark-plotly.cpp:113:10: warning: unused variable 'error' [-Wunused-variable]
char error[] = "\"error\": \"";
^
spark-plotly/spark-plotly.cpp:120:9: warning: unused variable 'urlLower' [-Wunused-variable]
int urlLower = 0;
^
spark-plotly/spark-plotly.cpp:121:9: warning: unused variable 'urlUpper' [-Wunused-variable]
int urlUpper = 0;
^
spark-plotly/spark-plotly.cpp: In member function 'void plotly::openStream()':
spark-plotly/spark-plotly.cpp:220:36: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("POST / HTTP/1.1\r\n"));
^
spark-plotly/spark-plotly.cpp:221:42: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("Host: arduino.plot.ly\r\n"));
^
spark-plotly/spark-plotly.cpp:222:39: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("User-Agent: Python\r\n"));
^
spark-plotly/spark-plotly.cpp:223:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("Transfer-Encoding: chunked\r\n"));
^
spark-plotly/spark-plotly.cpp:224:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("Connection: close\r\n"));
^
spark-plotly/spark-plotly.cpp:226:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("plotly-convertTimestamp: \""));
^
spark-plotly/spark-plotly.cpp:228:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("\"\r\n"));
^
spark-plotly/spark-plotly.cpp:230:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("\r\n"));
^
spark-plotly/spark-plotly.cpp: In member function 'void plotly::closeStream()':
spark-plotly/spark-plotly.cpp:236:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(F("0\r\n\r\n"));
^
spark-plotly/spark-plotly.cpp: In member function 'void plotly::jsonStart(int)':
spark-plotly/spark-plotly.cpp:253:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_("\r\n{\"x\": ");
^
spark-plotly/spark-plotly.cpp: In member function 'void plotly::jsonMiddle()':
spark-plotly/spark-plotly.cpp:256:23: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(", \"y\": ");
^
spark-plotly/spark-plotly.cpp: In member function 'void plotly::jsonEnd(char*)':
spark-plotly/spark-plotly.cpp:259:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_(", \"streamtoken\": \"");
^
spark-plotly/spark-plotly.cpp:261:23: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
print_("\"}\n\r\n");
^
spark-plotly.ino.cpp:1:26: fatal error: spark-plotly.h: No such file or directory
#include "spark-plotly.h"
^
compilation terminated.
make: *** [spark-plotly.ino.o] Error 1
sizeInfo:
modules: