[{"data":1,"prerenderedAt":315},["ShallowReactive",2],{"doc-\u002Fapi\u002Fingest-shelly":3},{"id":4,"title":5,"body":6,"description":305,"edit":306,"extension":307,"meta":308,"navigation":309,"path":310,"seo":311,"stem":312,"vertical":306,"weight":313,"__hash__":314},"content\u002Fapi\u002Fingest-shelly.md","GET \u002Fv1\u002Fingest\u002Fshelly",{"type":7,"value":8,"toc":294},"minimark",[9,28,33,45,49,182,190,194,201,210,228,232,241,245,248,270,276,280],[10,11,12,13,17,18,21,22,27],"p",{},"A query-string variant of the ingest endpoint, designed to fit inside the\nShelly H&T's URL-action template. It exists because Shelly's older\nfirmware can only do ",[14,15,16],"code",{},"GET"," with query params, not ",[14,19,20],{},"POST"," with a JSON body.\nFor everything else, use ",[23,24,26],"a",{"href":25},"\u002Fapi\u002Fingest","POST \u002Fv1\u002Fingest",".",[29,30,32],"h2",{"id":31},"endpoint","Endpoint",[34,35,37],"cmd",{"label":36},"$ method + path",[10,38,39,40],{},"GET ",[23,41,42],{"href":42,"rel":43},"https:\u002F\u002Fapi.opensense.murzin.digital\u002Fv1\u002Fingest\u002Fshelly",[44],"nofollow",[29,46,48],{"id":47},"query-parameters","Query parameters",[50,51,52,68],"table",{},[53,54,55],"thead",{},[56,57,58,62,65],"tr",{},[59,60,61],"th",{},"Param",[59,63,64],{},"Required",[59,66,67],{},"Meaning",[69,70,71,89,101,114,126,139,151,163],"tbody",{},[56,72,73,79,82],{},[74,75,76],"td",{},[14,77,78],{},"token",[74,80,81],{},"yes",[74,83,84,85,88],{},"Device token (",[14,86,87],{},"ds_live_…","). Treat as a password.",[56,90,91,96,98],{},[74,92,93],{},[14,94,95],{},"device",[74,97,81],{},[74,99,100],{},"Local device id (the one in the dashboard).",[56,102,103,108,111],{},[74,104,105],{},[14,106,107],{},"temp",[74,109,110],{},"one of",[74,112,113],{},"Temperature in °C (Shelly omits if no sensor).",[56,115,116,121,123],{},[74,117,118],{},[14,119,120],{},"hum",[74,122,110],{},[74,124,125],{},"Humidity in %.",[56,127,128,133,136],{},[74,129,130],{},[14,131,132],{},"battery",[74,134,135],{},"no",[74,137,138],{},"Battery percentage (Gen1) or volts (Gen3).",[56,140,141,146,148],{},[74,142,143],{},[14,144,145],{},"signal",[74,147,135],{},[74,149,150],{},"RSSI in dBm.",[56,152,153,158,160],{},[74,154,155],{},[14,156,157],{},"ts",[74,159,135],{},[74,161,162],{},"RFC 3339 UTC. Omit to use server-receive time.",[56,164,165,170,172],{},[74,166,167],{},[14,168,169],{},"lwt",[74,171,135],{},[74,173,174,177,178,181],{},[14,175,176],{},"online"," \u002F ",[14,179,180],{},"offline",". Used for last-will (rare).",[10,183,184,185,177,187,189],{},"\"One of\" means: at least one of ",[14,186,107],{},[14,188,120],{}," must be present.",[29,191,193],{"id":192},"example-url","Example URL",[10,195,196,197,200],{},"The URL the dashboard generates for you when you add a Shelly device.\nPaste this whole thing into the device's ",[14,198,199],{},"Reporting URL"," field:",[34,202,204],{"label":203},"$ shelly action url",[10,205,206],{},[23,207,208],{"href":208,"rel":209},"https:\u002F\u002Fapi.opensense.murzin.digital\u002Fv1\u002Fingest\u002Fshelly?token=ds_live_4f3c1a2b&device=hut01&temp=$temperature&hum=$humidity&battery=$bat&signal=$rssi",[44],[10,211,212,213,216,217,216,220,223,224,227],{},"Shelly's firmware substitutes ",[14,214,215],{},"$temperature",", ",[14,218,219],{},"$humidity",[14,221,222],{},"$bat",",\n",[14,225,226],{},"$rssi"," (and others) before issuing the request.",[29,229,231],{"id":230},"response","Response",[10,233,234,235,216,237,240],{},"Same JSON as ",[23,236,26],{"href":25},[14,238,239],{},"accepted"," count, etc.\nShelly does not parse the response body; it only checks the HTTP\nstatus. We return 200 OK on success.",[29,242,244],{"id":243},"why-a-get-and-not-a-post","Why a GET and not a POST?",[10,246,247],{},"Shelly's Gen1 firmware can be configured to issue a GET with query\nparameters; doing POST with a body is convoluted. The simpler the\nURL, the harder it is for the operator to misconfigure. The pragmatic\ntrade-off is that the token is in the URL, which means:",[249,250,251,259,262],"ul",{},[252,253,254,255,258],"li",{},"It appears in our HTTP access logs (we redact ",[14,256,257],{},"token="," server-side\nbefore persisting the log line).",[252,260,261],{},"It may appear in your home router's logs if your router logs URLs\n(most do not).",[252,263,264,265,269],{},"It is ",[266,267,268],"strong",{},"not"," transmitted in cleartext — TLS encrypts the query\nstring.",[10,271,272,273,275],{},"On Gen3 we recommend using ",[23,274,26],{"href":25}," instead with\nthe Authorization header. Gen1 customers stay on this endpoint.",[29,277,279],{"id":278},"errors","Errors",[10,281,282,283,285,286,289,290,293],{},"Identical to ",[23,284,26],{"href":25},", with one Shelly-specific\naddition: if the device sends ",[14,287,288],{},"nan"," or ",[14,291,292],{},"null"," for one of the values\n(SHT chip not yet warm), the offending field is dropped silently and\nthe rest of the reading is stored. We do not 422 a partially-broken\nShelly because the most common cause is \"still booting\".",{"title":295,"searchDepth":296,"depth":296,"links":297},"",3,[298,300,301,302,303,304],{"id":31,"depth":299,"text":32},2,{"id":47,"depth":299,"text":48},{"id":192,"depth":299,"text":193},{"id":230,"depth":299,"text":231},{"id":243,"depth":299,"text":244},{"id":278,"depth":299,"text":279},"Legacy query-string ingest for Shelly devices",null,"md",{},true,"\u002Fapi\u002Fingest-shelly",{"title":5,"description":305},"api\u002Fingest-shelly",220,"vYJUW_iL_DBglo87m3f1szGINjQ9ETfyStIX8sL8C9Y",1779022953972]