|
楼主 |
发表于 2020-8-18 17:59
|
显示全部楼层
ERROR: Print data is not Json! {"data":{"state":"online","timer":"000","version":"0.1.0","b1":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"日光模式开启"},"b2":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"夜光模式开启"},"b3":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"温馨模式开启"},"b4":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"电脑模式开启"},"b5":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"电视模式开启"},"b6":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"阅读模式开启"},"humi":{"val":56.00,"clr":"#00DE00","uni":"%RH(舒适)"},"temp":{"val":34.90,"clr":"#DC143C","uni":"℃(炎热)"}},"fromDevice":"6CE4F5666T3QL2KY7I3GMVFI","toDevice":"736542dcbc1e11ea9a655254","deviceType":"OwnApp"}
请问这是什么问题:如果用内网WIFI可以,但用4G就报错!!!!!
void heartbeat() //心跳包使得我们每次打开APP都可以看到实时的最新湿度数据
{
button_clear();
HUMI.print(humi_read);
TEMP.print(temp_read);
}
void button_clear()
{
if (openState == 1){
Button1.text("日光模式关闭");
Button1.color("#00ffFF");
Button1.icon("far fa-lightbulb-on");
Button1.print("on"); //发送按键参数
Button2.print("off");
Button3.print("off");
Button4.print("off");
Button5.print("off");
Button6.print("off");
//Button7.print("off");
//Button8.print("off");
Button2.color("#FF0000");
Button3.color("#FF0000");
Button4.color("#FF0000");
Button5.color("#FF0000");
Button6.color("#FF0000");
//Button7.color("#FF0000");
}
else if (openState == 2)
{
Button2.text("夜光模式关闭");
Button2.icon("far fa-lightbulb-on");
Button2.color("#00ffFF");
Button2.print("on"); //发送按键参数
Button1.print("off");
Button3.print("off");
Button4.print("off");
Button5.print("off");
Button6.print("off");
//Button7.print("off");
//Button8.print("off");
Button1.color("#FF0000");
Button3.color("#FF0000");
Button4.color("#FF0000");
Button5.color("#FF0000");
Button6.color("#FF0000");
// Button7.color("#FF0000");
}
else if (openState == 3)
{
Button3.text("温馨模式关闭");
Button3.icon("far fa-lightbulb-on");
Button3.color("#00ffFF");
Button3.print("on"); //发送按键参数
Button1.print("off");
Button2.print("off");
Button4.print("off");
Button5.print("off");
Button6.print("off");
//Button7.print("off");
//Button8.print("off");
Button1.color("#FF0000");
Button2.color("#FF0000");
Button4.color("#FF0000");
Button5.color("#FF0000");
Button6.color("#FF0000");
//Button7.color("#FF0000");
} |
|