user58373: I am working with some sensors and sending data to a public web server via http, I was thinking this server can be possibly used by more people to send their data and server displays a chart.
I was wondering if there is a IOT industry standard when sending certain type of data, so that in future I don't need to rename this or change documentation to be more compatible or more intuitive.
For example when sending a "motion detected" ping, do I go with pir=true, pir=1, motion_detect=true ?
Then for example when sending temperature, it would be much better temp_celsius=30 then just temp=30.
It should also make developers job much easier if there is a certain standard. Is there one ?

user4143: No, there is no "industry standard". You are free to choose what you like.
If you want to be completely generic you could choose to do something like:
p1name=Temperature&p1units=celcius&p1value=23.4&p2name=Humidity&p2units=%25&p2value=43.8

(%25 is a % when URL encoded)
Or you could use:
p1=Temperature/Celcius/23.4&p2=Humidity/%25/43.8

That's just two examples. There is no end to how you could do it.

user2881: I don't think there is. It also kind of depends on how you are going to store the data.
I'd go with motion=true instead of pir=true, as it describes what you are detecting, instead of what sensor type you used. What if you decide to change the PIR sensor to a radar-based sensor. Now the variable name doesn't make sense.
Secondly, what happens if you add a second motion sensor somewhere else? I'd add something unique to the request. Something like a node-id. That way, you can differentiate between the two. Something like ?nodeid=1&motion=1. You can that also add additional info like the battery voltage for that node; ?nodeid=1&motion=1&voltage=3.1.
I don't think differentiating between C and F makes a lot of sense. But if it does you'd store this somewhere on the server, as it should never really change. Something like; the temperature value coming from nodeid 6, is the temperature in the "livingroom", and is specified in "C", and should be shown on a graph with Y-axis of "10 C" to "30 C".

user35430: Yes, there are systems designed to continuously receive such data and the data exchange is standardized, even some Units are standardized.
OPC DA
An example is OPC Data Access for real time values. It seems you want to build a graph, so OPC Historical Data Access is more what you're looking for.
One would set up the data points on the server side once, i.e. configure the type and unit that you're gonna receive on that "channel" or "port" or whatever you call it.
Unfortunately, OPC DA and OPC HDA use XML and building XML is not trivial. It's not very suitable for IoT devices.
Lessons learned: configure the unit on server side and let the client send data only. Do not use XML for data transfer.
OPC UA
Then there is OPC Unified Architecture. They also learned their lesson and removed XML and added security. They now use a binary protocol. The specification is more than 1000 pages, so understanding it will be difficult and is in fact so difficult that even OPC UA implementations of different companies do not work together well.
OPC UA defines 25 data types and ways of defining other data types.
The address space in OPC UA is hierarchical - and probably a device can exist in multiple hierarchies, e.g. physical topology like floors and rooms or logical topology that fits into the structure of the machine.
Lessons learned: make the protocol simple and think about security, i.e. if you want to do URL encoding (GET), then use HTTPS at least. AFAIK, devices ESP32 support encryption, so it's no longer a problem for tiny devices. People will use very strange data types, like 18 bit integers. Also, do not only provide a flat list of devices, but let them arrange stuff as needed.
MQTT and NodeRed
Now these were quite heavy protocols and models driven by companies. Of course there are also protocols better suited for IoT, like MQTT. MQTT is widely known and uses the also well known Node Red software for handling it. You can define workflows how the data should be handled, converted, stored and whether alarms shall be triggered above or below thresholds.
They already think of connection loss, reconnect and how to send all the data that was already recorded but could not be sent.
Lessons learned: People want more than just data storage and a graphics.
Units
openHAB tries to come up with a List of units. I am a radio amateur. I am measuring electromagnetic fields. I am still missing

SWR (standing wave ratio)
dBu (dB µW)
dBc (dB relative to the strongest signal)
dBV, dBmV (dB for Volts instead of Watts)

Personal experience
I was working for a company that made software for industry. There are devices that send a measurement value every 100 ms. Let's say this is a simple temperature value of just 1 byte, that's still 315'000'000 records per year.
How do you display such data? On a Full HD screen you would still need to combine 150'000 measurement values on a single column of pixels.
Lessons learned: you need sophisticated data crunching skills to generate the graphics. The users probably want some control over the time span they are viewing. They want zooming and panning.
Conclusion

I was thinking this server can be possibly used by more people to send their data and server displays a chart.

IMHO, sorry, it's hardly needed. People do not want to send their data to a random HTTP server. Some want to set it up at home only, so that no data ever reaches the Internet. Some people want to do more than just displaying a grpahics (especially alarms). MQTT and Node Red runs locally, on a Raspberry, on a server and even in the cloud, whatever you want.
You do not only need pir=true, pir=1, motion_detect=true, you also need

an ID for the device,
a timestamp when the data was recorded
potentially a way to send bulk data after the server was offline for an hour of maintenance
a system for units
encryption

That's quite an effort. Node Red has > 4000 commits.

58373: <p>I am working with some sensors and sending data to a public web server via http, I was thinking this server can be possibly used by more people to send their data and server displays a chart.</p>
<p>I was wondering if there is a IOT industry standard when sending certain type of data, so that in future I don't need to rename this or change documentation to be more compatible or more intuitive.</p>
<p>For example when sending a &quot;motion detected&quot; ping, do I go with <code>pir=true</code>, <code>pir=1</code>, <code>motion_detect=true</code> ?</p>
<p>Then for example when sending temperature, it would be much better <code>temp_celsius=30</code> then just <code>temp=30</code>.</p>
<p>It should also make developers job much easier if there is a certain standard. Is there one ?</p>
 4143: <p>No, there is no &quot;industry standard&quot;. You are free to choose what you like.</p>
<p>If you want to be completely generic you could choose to do something like:</p>
<pre><code>p1name=Temperature&amp;p1units=celcius&amp;p1value=23.4&amp;p2name=Humidity&amp;p2units=%25&amp;p2value=43.8
</code></pre>
<p>(<code>%25</code> is a <code>%</code> when URL encoded)</p>
<p>Or you could use:</p>
<pre><code>p1=Temperature/Celcius/23.4&amp;p2=Humidity/%25/43.8
</code></pre>
<p>That's just two examples. There is no end to how you could do it.</p>
 2881: <p>I don't think there is. It also kind of depends on how you are going to store the data.</p>
<p>I'd go with <code>motion=true</code> instead of <code>pir=true</code>, as it describes what you are detecting, instead of what sensor type you used. What if you decide to change the PIR sensor to a radar-based sensor. Now the variable name doesn't make sense.</p>
<p>Secondly, what happens if you add a second motion sensor somewhere else? I'd add something unique to the request. Something like a node-id. That way, you can differentiate between the two. Something like <code>?nodeid=1&amp;motion=1</code>. You can that also add additional info like the battery voltage for that node; <code>?nodeid=1&amp;motion=1&amp;voltage=3.1</code>.</p>
<p>I don't think differentiating between C and F makes a lot of sense. But if it does you'd store this somewhere on the server, as it should never really change. Something like; the <code>temperature</code> value coming from <code>nodeid</code> 6, is the temperature in the &quot;livingroom&quot;, and is specified in &quot;C&quot;, and should be shown on a graph with Y-axis of &quot;10 C&quot; to &quot;30 C&quot;.</p>
 35430: <p>Yes, there are systems designed to continuously receive such data and the data exchange is standardized, even some Units are standardized.</p>
<h3>OPC DA</h3>
<p>An example is <a href="https://en.wikipedia.org/wiki/OPC_Data_Access" rel="nofollow noreferrer">OPC Data Access</a> for real time values. It seems you want to build a graph, so <a href="https://en.wikipedia.org/wiki/OPC_Historical_Data_Access" rel="nofollow noreferrer">OPC Historical Data Access</a> is more what you're looking for.</p>
<p>One would set up the data points on the server side once, i.e. configure the type and unit that you're gonna receive on that &quot;channel&quot; or &quot;port&quot; or whatever you call it.</p>
<p>Unfortunately, OPC DA and OPC HDA use XML and building XML is not trivial. It's not very suitable for IoT devices.</p>
<p><em>Lessons learned</em>: configure the unit on server side and let the client send data only. Do not use XML for data transfer.</p>
<h3>OPC UA</h3>
<p>Then there is <a href="https://en.wikipedia.org/wiki/OPC_Unified_Architecture" rel="nofollow noreferrer">OPC Unified Architecture</a>. They also learned their lesson and removed XML and added security. They now use a binary protocol. The specification is more than 1000 pages, so understanding it will be difficult and is in fact so difficult that even OPC UA implementations of different companies do not work together well.</p>
<p>OPC UA defines 25 data types and ways of defining other data types.</p>
<p>The address space in OPC UA is hierarchical - and probably a device can exist in multiple hierarchies, e.g. physical topology like floors and rooms or logical topology that fits into the structure of the machine.</p>
<p><em>Lessons learned</em>: make the protocol simple and think about security, i.e. if you want to do URL encoding (<code>GET</code>), then use HTTP<strong>S</strong> at least. AFAIK, devices ESP32 support encryption, so it's no longer a problem for tiny devices. People will use very strange data types, like 18 bit integers. Also, do not only provide a flat list of devices, but let them arrange stuff as needed.</p>
<h3>MQTT and NodeRed</h3>
<p>Now these were quite heavy protocols and models driven by companies. Of course there are also protocols better suited for IoT, like <a href="https://mqtt.org/" rel="nofollow noreferrer">MQTT</a>. MQTT is widely known and uses the also well known <a href="https://nodered.org/" rel="nofollow noreferrer">Node Red</a> software for handling it. You can define workflows how the data should be handled, converted, stored and whether alarms shall be triggered above or below thresholds.</p>
<p>They already think of connection loss, reconnect and how to send all the data that was already recorded but could not be sent.</p>
<p><em>Lessons learned</em>: People want more than just data storage and a graphics.</p>
<h2>Units</h2>
<p>openHAB tries to come up with a <a href="https://www.openhab.org/docs/concepts/units-of-measurement.html#list-of-units" rel="nofollow noreferrer">List of units</a>. I am a radio amateur. I am measuring electromagnetic fields. I am still missing</p>
<ul>
<li>SWR (standing wave ratio)</li>
<li>dBu (dB µW)</li>
<li>dBc (dB relative to the strongest signal)</li>
<li>dBV, dBmV (dB for Volts instead of Watts)</li>
</ul>
<h3>Personal experience</h3>
<p>I was working for a company that made software for industry. There are devices that send a measurement value every 100 ms. Let's say this is a simple temperature value of just 1 byte, that's still 315'000'000 records per year.</p>
<p>How do you display such data? On a Full HD screen you would still need to combine 150'000 measurement values on a single column of pixels.</p>
<p><em>Lessons learned</em>: you need sophisticated data crunching skills to generate the graphics. The users probably want some control over the time span they are viewing. They want zooming and panning.</p>
<h3>Conclusion</h3>
<blockquote>
<p>I was thinking this server can be possibly used by more people to send their data and server displays a chart.</p>
</blockquote>
<p>IMHO, sorry, it's hardly needed. People do not want to send their data to a random HTTP server. Some want to set it up at home only, so that no data ever reaches the Internet. Some people want to do more than just displaying a grpahics (especially alarms). MQTT and Node Red runs locally, on a Raspberry, on a server and even in the cloud, whatever you want.</p>
<p>You do not only need <code>pir=true, pir=1, motion_detect=true</code>, you also need</p>
<ul>
<li>an ID for the device,</li>
<li>a timestamp when the data was recorded</li>
<li>potentially a way to send bulk data after the server was offline for an hour of maintenance</li>
<li>a system for units</li>
<li>encryption</li>
</ul>
<p>That's quite an effort. Node Red has &gt; 4000 commits.</p>
