[{"data":1,"prerenderedAt":311},["ShallowReactive",2],{"doc-\u002Ftroubleshooting\u002Fpayload-rejected":3},{"id":4,"title":5,"body":6,"description":301,"edit":302,"extension":303,"meta":304,"navigation":305,"path":306,"seo":307,"stem":308,"vertical":302,"weight":309,"__hash__":310},"content\u002Ftroubleshooting\u002Fpayload-rejected.md","Payload rejected",{"type":7,"value":8,"toc":294},"minimark",[9,22,27,36,81,85,91,136,140,143,147,154,161,262,265,269,279,287,290],[10,11,12,13,17,18,21],"p",{},"You are getting ",[14,15,16],"code",{},"422 out_of_range"," or ",[14,19,20],{},"422 unknown_kind"," on ingest. The\nsanity checker at the ingest boundary refuses physically implausible\nvalues before they reach storage.",[23,24,26],"h2",{"id":25},"out-of-range","\"Out of range\"",[10,28,29,30,35],{},"The ingest endpoint enforces per-kind bounds — see the table on\n",[31,32,34],"a",{"href":33},"\u002Fapi\u002Fingest","POST \u002Fv1\u002Fingest",". Common offenders:",[37,38,39,51,65,75],"ul",{},[40,41,42,46,47,50],"li",{},[43,44,45],"strong",{},"Temperature reported in Kelvin or Fahrenheit."," A sensor saying\n",[14,48,49],{},"294"," (K) is rejected because we treat the value as °C. Convert at\nthe device.",[40,52,53,56,57,60,61,64],{},[43,54,55],{},"Battery percent vs battery volts mixed."," Shelly Gen1 reports\npercent; Gen3 reports volts. If your device-side logic sometimes\nemits ",[14,58,59],{},"3.92"," and sometimes ",[14,62,63],{},"92",", the sanity check will trip on the\nbattery channel.",[40,66,67,70,71,74],{},[43,68,69],{},"NaN, Infinity, null in JSON."," RFC 8259 forbids these as JSON\nnumbers; we 400 with ",[14,72,73],{},"bad_json",", not 422. Stringify them yourself\nor drop them.",[40,76,77,80],{},[43,78,79],{},"Pressure in Pa instead of hPa."," Standard sea-level pressure is\n~1013 hPa = 101 325 Pa. The latter trips the sanity ceiling of\n1100. Divide by 100 at the device.",[23,82,84],{"id":83},"unknown-kind","\"Unknown kind\"",[10,86,87,88,90],{},"Only the kinds in ",[31,89,34],{"href":33}," are accepted. If you\nhave a sensor reporting something exotic (TVOC, PM2.5, soil moisture),\nyou have three options:",[92,93,94,112,126],"ol",{},[40,95,96,99,100,103,104,107,108,111],{},[43,97,98],{},"Map to the closest existing kind"," + use the ",[14,101,102],{},"label"," field. A\nsoil moisture sensor reporting 0–100 % can use ",[14,105,106],{},"humidity"," with\n",[14,109,110],{},"label = \"soil\"",". The display unit is the same; only the\ncontextual interpretation changes.",[40,113,114,117,118,121,122,125],{},[43,115,116],{},"Map to a generic numeric kind."," We support ",[14,119,120],{},"voltage"," and\n",[14,123,124],{},"current"," as the catch-alls for \"analog reading\"; if your sensor's\nvalue can be reasonably expressed as one of these, use it.",[40,127,128,131,132,135],{},[43,129,130],{},"Open a ticket."," New kinds are added on request; we will not\nforce a roundabout mapping if your sensor is genuinely a new kind.\nSo far we have added ",[14,133,134],{},"co2"," (2026-04) on request from a school\npilot.",[23,137,139],{"id":138},"out-of-range-but-the-reading-is-honest","\"Out of range\" but the reading is honest",[10,141,142],{},"If the value is physically valid but outside our sanity bounds — e.g.\na cryogenic freezer reporting –90 °C, or a power meter on a 100 kW\nindustrial circuit — open a ticket. We will widen the bounds for\nyour account. We do not silently expand them for everyone because\nthe bound exists to catch real device failures (a corroded thermistor\nreading +200 °C, an ADC bit-flip).",[23,144,146],{"id":145},"how-to-handle-422-on-the-device","How to handle 422 on the device",[10,148,149,150,153],{},"Do ",[43,151,152],{},"not"," retry a 422. The same payload will be rejected again. Log\nlocally, drop the reading, continue with the next cycle. If your\ndevice buffers, do not pile up rejected payloads in the buffer; the\nbuffer will fill with garbage and block honest readings.",[10,155,156,157,160],{},"For ESPHome devices, the recommended pattern is to apply a\n",[43,158,159],{},"filter"," on the sensor before sending:",[162,163,168],"pre",{"className":164,"code":165,"language":166,"meta":167,"style":167},"language-yaml shiki shiki-themes github-dark github-dark","sensor:\n  - platform: bme280_i2c\n    temperature:\n      filters:\n        - throttle: 60s\n        - clamp:\n            min_value: -40\n            max_value: 80\n","yaml","",[14,169,170,183,199,207,215,229,239,251],{"__ignoreMap":167},[171,172,175,179],"span",{"class":173,"line":174},"line",1,[171,176,178],{"class":177},"sxg3X","sensor",[171,180,182],{"class":181},"suv1-",":\n",[171,184,186,189,192,195],{"class":173,"line":185},2,[171,187,188],{"class":181},"  - ",[171,190,191],{"class":177},"platform",[171,193,194],{"class":181},": ",[171,196,198],{"class":197},"s4wv1","bme280_i2c\n",[171,200,202,205],{"class":173,"line":201},3,[171,203,204],{"class":177},"    temperature",[171,206,182],{"class":181},[171,208,210,213],{"class":173,"line":209},4,[171,211,212],{"class":177},"      filters",[171,214,182],{"class":181},[171,216,218,221,224,226],{"class":173,"line":217},5,[171,219,220],{"class":181},"        - ",[171,222,223],{"class":177},"throttle",[171,225,194],{"class":181},[171,227,228],{"class":197},"60s\n",[171,230,232,234,237],{"class":173,"line":231},6,[171,233,220],{"class":181},[171,235,236],{"class":177},"clamp",[171,238,182],{"class":181},[171,240,242,245,247],{"class":173,"line":241},7,[171,243,244],{"class":177},"            min_value",[171,246,194],{"class":181},[171,248,250],{"class":249},"s8ozJ","-40\n",[171,252,254,257,259],{"class":173,"line":253},8,[171,255,256],{"class":177},"            max_value",[171,258,194],{"class":181},[171,260,261],{"class":249},"80\n",[10,263,264],{},"Out-of-bounds physical readings become \"ignore this cycle\" client-side\nrather than \"argue with the server\".",[23,266,268],{"id":267},"audit-trail","Audit trail",[10,270,271,272,274,275,278],{},"A 422 is ",[43,273,152],{}," recorded in the audit trail — it is rejected before\nbecoming a measurement. If you need to know that a sensor failed\nduring a period (for HACCP), look at the per-channel ",[14,276,277],{},"gaps"," endpoint:",[162,280,285],{"className":281,"code":283,"language":284},[282],"language-text","GET \u002Fv1\u002Fchannels\u002Fchn_…\u002Fgaps?from=…&to=…\n","text",[14,286,283],{"__ignoreMap":167},[10,288,289],{},"A continuous run of 422s shows up as a gap in the data, which is\naudit-visible.",[291,292,293],"style",{},"html pre.shiki code .sxg3X, html code.shiki .sxg3X{--shiki-default:#85E89D;--shiki-dark:#85E89D}html pre.shiki code .suv1-, html code.shiki .suv1-{--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .s4wv1, html code.shiki .s4wv1{--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .s8ozJ, html code.shiki .s8ozJ{--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":167,"searchDepth":201,"depth":201,"links":295},[296,297,298,299,300],{"id":25,"depth":185,"text":26},{"id":83,"depth":185,"text":84},{"id":138,"depth":185,"text":139},{"id":145,"depth":185,"text":146},{"id":267,"depth":185,"text":268},"HTTP 422 — sanity checks failed",null,"md",{},true,"\u002Ftroubleshooting\u002Fpayload-rejected",{"title":5,"description":301},"troubleshooting\u002Fpayload-rejected",460,"yfztPf_J_zURw2wLDuEBn6wnYH6kdmCFcZLnZLnmKbw",1779022955489]