Giter Club home page Giter Club logo

jstore-demo's People

Contributors

nliviu avatar

Watchers

 avatar  avatar

jstore-demo's Issues

Error with sending items when you connect and disconnect Internet cable from router

Hello

I was playing around with your example of mqtt frame buffering and as I started disconnecting and reconnecting the WAN cable from the router the mqtt querry started to throw errors, any idea how to fix it?

`


Internet cable disconected from router


[Jan 28 19:18:21.931]
[Jan 28 19:18:21.931] I (100871) wifi:AP's beacon interval = 102400 us, DTIM period = 1
[Jan 28 19:18:21.938] mgos_wifi.c:86 WiFi STA: Connected, BSSID f8:fb:56:16:ea:65 ch 11 RSSI -37
[Jan 28 19:18:21.947] mgos_net.c:93 WiFi STA: connected
[Jan 28 19:18:22.266] W (101211) wifi:idx:0 (ifx:0, f8:fb:56:16:ea:65), tid:0, ssn:0, winSize:64
[Jan 28 19:18:22.372] main.c:263 Uptime: 100.65, free_heap: 68396, min_free_heap: 51420
[Jan 28 19:18:22.378] mqtt_queue.c:171 Cloud not connected. Queueing message.
[Jan 28 19:18:22.384] mqtt_queue.c:137 jstore_add - added: <100-409178113>
*
*
*
[Jan 28 19:18:32.372] main.c:263 Uptime: 110.65, free_heap: 69940, min_free_heap: 51420
[Jan 28 19:18:32.378] mqtt_queue.c:171 Cloud not connected. Queueing message.
[Jan 28 19:18:32.384] mqtt_queue.c:137 jstore_add - added: <110-114136444>
[Jan 28 19:18:33.737] W (112681) wifi:idx:1 (ifx:0, f8:fb:56:16:ea:65), tid:6, ssn:0, winSize:64
[Jan 28 19:18:34.276] Free: 69696


Connect Internet cable to router, device connect to AWS MQTT and send massages from queue


[Jan 28 19:18:39.646]
[Jan 28 19:18:39.646] I (118591) wifi:AP's beacon interval = 102400 us, DTIM period = 1
[Jan 28 19:18:39.653] mgos_wifi.c:86 WiFi STA: Connected, BSSID f8:fb:56:16:ea:65 ch 11 RSSI -33
[Jan 28 19:18:39.662] mgos_net.c:93 WiFi STA: connected
[Jan 28 19:18:39.687] W (118631) wifi:idx:0 (ifx:0, f8:fb:56:16:ea:65), tid:0, ssn:0, winSize:64
[Jan 28 19:18:40.105] I (119051) esp_netif_handlers: sta ip: 192.168.1.100, mask: 255.255.255.0, gw: 192.168.1.1
[Jan 28 19:18:40.114] mgos_wifi_sta.c:699 Saving AP connectiq f8:fb:56:16:ea:65 ch 11
[Jan 28 19:18:40.660] mgos_sys_config.c:323 Saved to conf9.json
[Jan 28 19:18:40.666] mgos_mongoose.c:66 New heap free LWM: 51396
[Jan 28 19:18:40.670] mgos_net.c:104 WiFi STA: ready, IP 192.168.1.100, GW 192.168.1.1, DNS 8.8.8.8, NTP 0.0.0.0
[Jan 28 19:18:40.679] mgos_provision_state:44 Current state: 1 -> 2
[Jan 28 19:18:40.685] mgos_mdns.c:143 Listening on udp://:5353... 0x3ffec4dc
[Jan 28 19:18:40.769] mgos_sntp.c:64 SNTP reply from 216.239.35.0: time 1674933520.863136, local 119.131670, delta 1674933401.731466
[Jan 28 19:18:40.963] mgos_mongoose.c:66 New heap free LWM: 48268
[Jan 28 19:18:41.044] mgos_mongoose.c:66 New heap free LWM: 42436
[Jan 28 19:18:41.691] mgos_mongoose.c:66 New heap free LWM: 40820
[Jan 28 19:18:42.370] mgos_mongoose.c:66 New heap free LWM: 38264
[Jan 28 19:18:42.373] main.c:263 Uptime: 120.65, free_heap: 40476, min_free_heap: 38264
[Jan 28 19:18:42.381] mqtt_queue.c:171 Cloud not connected. Queueing message.
[Jan 28 19:18:42.386] mqtt_queue.c:137 jstore_add - added: <1674933522-1234906227>
[Jan 28 19:18:42.466] mgos_mongoose.c:66 New heap free LWM: 37476
[Jan 28 19:18:43.069] mgos_mongoose.c:66 New heap free LWM: 36432
[Jan 28 19:18:44.088] mgos_mongoose.c:66 New heap free LWM: 35816
[Jan 28 19:18:44.276] Free: 40032
[Jan 28 19:18:44.284] Config timestamp 0
[Jan 28 19:18:44.333] == Publishing to dt/v1/0/0/Box_v1_9BC3D4/status/1674933524377:{"input":"counter0","event":"start"}
[Jan 28 19:18:44.347] false
[Jan 28 19:18:45.346] mgos_mongoose.c:66 New heap free LWM: 34804
[Jan 28 19:18:47.211] W (126151) wifi:idx:1 (ifx:0, f8:fb:56:16:ea:65), tid:6, ssn:0, winSize:64
[Jan 28 19:18:48.210] mgos_mongoose.c:66 New heap free LWM: 32824
[Jan 28 19:18:48.503] mgos_mqtt_conn.c:189 MQTT0 TCP connected ok (0)
[Jan 28 19:18:48.625] mgos_mqtt_conn.c:242 MQTT0 CONNACK 0
[Jan 28 19:18:48.633] Cloud Connected!
[Jan 28 19:18:48.640] mqtt_queue.c:149 cloud_cb - Cloud connected (MGOS_CLOUD_MQTT)
[Jan 28 19:18:48.646] mqtt_queue.c:153 cloud_cb - ctx->interval: 100
[Jan 28 19:18:48.649] mgos_provision_state:44 Current state: 2 -> 3
[Jan 28 19:18:48.654] mgos_mqtt_conn.c:169 MQTT0 sub cd/status/Box_v1_9BC3D4 @ 1
[Jan 28 19:18:48.660] mgos_mqtt_conn.c:169 MQTT0 sub cd/config_get/Box_v1_9BC3D4 @ 1
[Jan 28 19:18:48.746] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 10.65, "free_heap": 71056, "min_free_heap": 51452}}
[Jan 28 19:18:48.846] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 20.65, "free_heap": 72040, "min_free_heap": 51420}}
[Jan 28 19:18:48.946] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 30.65, "free_heap": 71200, "min_free_heap": 51420}}
[Jan 28 19:18:49.050] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 40.65, "free_heap": 70976, "min_free_heap": 51420}}
[Jan 28 19:18:49.147] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 50.65, "free_heap": 70848, "min_free_heap": 51420}}
[Jan 28 19:18:49.246] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 60.65, "free_heap": 70688, "min_free_heap": 51420}}
[Jan 28 19:18:49.346] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 70.65, "free_heap": 70516, "min_free_heap": 51420}}
[Jan 28 19:18:49.447] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 80.65, "free_heap": 69968, "min_free_heap": 51420}}
[Jan 28 19:18:49.546] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 90.65, "free_heap": 70248, "min_free_heap": 51420}}
[Jan 28 19:18:49.650] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 100.65, "free_heap": 68396, "min_free_heap": 51420}}
[Jan 28 19:18:49.750] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 110.65, "free_heap": 69940, "min_free_heap": 51420}}
[Jan 28 19:18:49.846] mqtt_queue.c:81 jstore_play_timer_cb - data: {"subfolder": "topic", "data": {"uptime": 120.65, "free_heap": 40476, "min_free_heap": 38264}}
[Jan 28 19:18:51.140] mgos_rpc_channel_ws.:54 0x3ffd1cac WS handshake resp 101
[Jan 28 19:18:51.144] Cloud Connected!
[Jan 28 19:18:51.156] mqtt_queue.c:149 cloud_cb - Cloud connected (MGOS_CLOUD_DASH)
[Jan 28 19:18:51.162] mqtt_queue.c:153 cloud_cb - ctx->interval: 100
[Jan 28 19:18:51.193] mg_rpc.c:315 Sys.GetInfo via WSS_out 157.90.34.55:443
[Jan 28 19:18:51.404] mg_rpc.c:315 FS.Get via WSS_out 157.90.34.55:443
[Jan 28 19:18:51.515] mg_rpc.c:315 FS.Rename via WSS_out 157.90.34.55:443
[Jan 28 19:18:51.613] mg_rpc.c:315 FS.Get via WSS_out 157.90.34.55:443
[Jan 28 19:18:52.372] main.c:263 Uptime: 130.65, free_heap: 65696, min_free_heap: 32824
[Jan 28 19:18:52.378] mqtt_queue.c:174 Cloud connected. Sending message.
[Jan 28 19:18:54.274] Free: 65680
[Jan 28 19:19:02.372] main.c:263 Uptime: 140.65, free_heap: 65696, min_free_heap: 32824
[Jan 28 19:19:02.378] mqtt_queue.c:174 Cloud connected. Sending message.
[Jan 28 19:19:04.276] Free: 65680


Disconnect Internet cable from router, device think that AWS is connected, MQTT buffer massages


[Jan 28 19:19:12.372] main.c:263 Uptime: 150.65, free_heap: 65696, min_free_heap: 32824
[Jan 28 19:19:12.378] mqtt_queue.c:174 Cloud connected. Sending message.
[Jan 28 19:19:14.276] Free: 65680
*
*
*
[Jan 28 19:21:14.625] mgos_mqtt_conn.c:442 MQTT0 connecting to a3nwozygiu07vs-ats.iot.eu-west-1.amazonaws.com:8883
[Jan 28 19:21:18.571] Cloud Disconnected!
[Jan 28 19:21:18.578] mqtt_queue.c:157 cloud_cb - Cloud disconnected (MGOS_CLOUD_DASH)
[Jan 28 19:21:22.373] main.c:263 Uptime: 280.65, free_heap: 63920, min_free_heap: 32824
[Jan 28 19:21:22.378] mqtt_queue.c:171 Cloud not connected. Queueing message.
[Jan 28 19:21:22.385] mqtt_queue.c:137 jstore_add - added: <1674933682-1516320060>
[Jan 28 19:21:23.585] mgos_rpc_channel_ws:269 0x3ffd1cac Connecting to wss://mdash.net/api/v2/rpc, SSL? 1
[Jan 28 19:21:24.271] mongoose.c:12127 Failed to resolve 'xx-ats.iot.eu-west-1.amazonaws.com', server 8.8.8.8
[Jan 28 19:21:24.280] mgos_mqtt_conn.c:189 MQTT0 TCP connected error (-1)
[Jan 28 19:21:24.285] mgos_mqtt_conn.c:221 MQTT0 disconnected
[Jan 28 19:21:42.373] main.c:263 Uptime: 300.65, free_heap: 69060, min_free_heap: 32824
[Jan 28 19:21:42.378] mqtt_queue.c:171 Cloud not connected. Queueing message.
[Jan 28 19:21:42.385] mqtt_queue.c:137 jstore_add - added: <1674933702-1417098276>
[Jan 28 19:21:43.312] mgos_rpc_channel_ws:269 0x3ffd1cac Connecting to wss://mdash.net/api/v2/rpc, SSL? 1
[Jan 28 19:21:44.277] Free: 65008
[Jan 28 19:21:47.196] mgos_mqtt_conn.c:442 MQTT0 connecting to x-ats.iot.eu-west-1.amazonaws.com:8883
[Jan 28 19:22:04.334] == Publishing to dt/v1/0/0/Box_v1_9BC3D4/status/1674933724376:{"input":"counter0","event":"start"}
[Jan 28 19:22:04.347] false
[Jan 28 19:22:12.373] main.c:263 Uptime: 330.65, free_heap: 68552, min_free_heap: 32824
[Jan 28 19:22:12.379] mqtt_queue.c:171 Cloud not connected. Queueing message.
[Jan 28 19:22:12.385] mqtt_queue.c:137 jstore_add - added: <1674933732-15970526>
[Jan 28 19:22:14.276] Free: 68368


Connect Internet cable to router, device connect to AWS MQTT and send massages from queue


[Jan 28 19:22:14.348] mgos_rpc_channel_ws:269 0x3ffd1cac Connecting to wss://mdash.net/api/v2/rpc, SSL? 1
[Jan 28 19:22:15.285] mgos_mqtt_conn.c:442 MQTT0 connecting to x-ats.iot.eu-west-1.amazonaws.com:8883
[Jan 28 19:22:21.088] mgos_rpc_channel_ws.:54 0x3ffd1cac WS handshake resp 101
[Jan 28 19:22:21.098] Cloud Connected!
[Jan 28 19:22:21.104] mqtt_queue.c:149 cloud_cb - Cloud connected (MGOS_CLOUD_DASH)
[Jan 28 19:22:21.110] mqtt_queue.c:153 cloud_cb - ctx->interval: 100
[Jan 28 19:22:21.140] mg_rpc.c:315 Sys.GetInfo via WSS_out 157.90.34.55:443


mqtt_queue can't find item to send queued items


[Jan 28 19:22:21.211] mqtt_queue.c:65 jstore_play_timer_cb - mgos_jstore_item_get error: item not found
[Jan 28 19:22:21.237] mg_rpc.c:315 FS.Get via WSS_out 157.90.34.55:443
[Jan 28 19:22:21.311] mqtt_queue.c:65 jstore_play_timer_cb - mgos_jstore_item_get error: item not found
[Jan 28 19:22:21.339] mg_rpc.c:315 FS.Rename via WSS_out 157.90.34.55:443
[Jan 28 19:22:21.411] mqtt_queue.c:65 jstore_play_timer_cb - mgos_jstore_item_get error: item not found
[Jan 28 19:22:21.437] mg_rpc.c:315 FS.Get via WSS_out 157.90.34.55:443
[Jan 28 19:22:21.511] mqtt_queue.c:65 jstore_play_timer_cb - mgos_jstore_item_get error: item not found
[Jan 28 19:22:21.611] mqtt_queue.c:65 jstore_play_timer_cb - mgos_jstore_item_get error: item not found
[Jan 28 19:22:21.711] mqtt_queue.c:65 jstore_play_timer_cb - mgos_jstore_item_get error: item not found
[Jan 28 19:22:21.811] mqtt_queue.c:65 jstore_play_timer_cb - mgos_jstore_item_get error: item not found
[Jan 28 19:22:21.911] mqtt_queue.c:65 jstore_play_timer_cb - mgos_jstore_item_get error: item not found`

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.