<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[REXYGEN Community Forum / JSON - String formatting]]></title>
	<link rel="self" href="https://www.rexygen.com/oldforum/extern.php?action=feed&amp;tid=295&amp;type=atom"/>
	<link href="http://www.rexygen.com/oldforum/viewtopic.php?id=295"/>
	<updated>2017-11-18T19:08:52Z</updated>
	<generator>FluxBB</generator>
	<id>http://www.rexygen.com/oldforum/viewtopic.php?id=295</id>
	<entry>
		<title type="html"><![CDATA[Re: JSON - String formatting]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1822#p1822"/>
		<content type="html"><![CDATA[<p>Json is a text string which contains the data. So for automation I would opt for Modbus..... With Json you need the convert your integers and booleans first into a string and afterwards another conversion is needed.....not so efficient.</p><p>In this topic I was just showing how you can use it to store some data in a database every few seconds/minutes.....</p><p>Do you have an example of the data which you would like to send? This might give us a better idea what you are trying to achieve....</p>]]></content>
		<author>
			<name><![CDATA[scoobsalamander]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=6</uri>
		</author>
		<updated>2017-11-18T19:08:52Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1822#p1822</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: JSON - String formatting]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1821#p1821"/>
		<content type="html"><![CDATA[<p>Is there possible to implement Jason on Modbus protocol ? <br />In that way, it might send both control command and data at the same time.<br />Most importantly, using Jason to define tags for others undefined devices of automation and IoTs.</p>]]></content>
		<author>
			<name><![CDATA[100m@modbus_asic]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=176</uri>
		</author>
		<updated>2017-11-17T02:10:51Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1821#p1821</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: JSON - String formatting]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1292#p1292"/>
		<content type="html"><![CDATA[<p>Hi scoobsalamander,</p><p>thank you for sharing your project with the community - it can be valuable source for someone else. Your pace is incredible <img src="http://www.rexygen.com/oldforum/img/smilies/wink.png" width="15" height="15" alt="wink" /> Keep up!</p><p>Cheers, Tomas</p>]]></content>
		<author>
			<name><![CDATA[tomáš čechura]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=39</uri>
		</author>
		<updated>2016-12-16T13:11:27Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1292#p1292</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: JSON - String formatting]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1290#p1290"/>
		<content type="html"><![CDATA[<p>....after a good sleep I had some success with storing values directly into a Influx DB.</p><p><span class="postimg"><img src="https://www.rexygen.com/oldforum/img/members/6/2016-12-16-09_32_07-REX.png" alt="2016-12-16-09_32_07-REX.png" /></span></p><p><span class="postimg"><img src="https://www.rexygen.com/oldforum/img/members/6/2016-12-16-09_33_32-REX.png" alt="2016-12-16-09_33_32-REX.png" /></span></p><br /><p><del>(Only the conversion of the values I still have to check because something has gone wrong .....see for example the values 2,3 &amp; 5...they do not correspond)</del><br />** EDIT : changed settings of RTOS function blocks inside the Subsystem. Now the values are OK. (corrected in example as well...)</p><p><span class="bbu">Example :</span><br /><a href="https://www.rexygen.com/oldforum/img/members/6/InfluxDB.zip" rel="nofollow">InfluxDB.zip</a></p><p>Influx database used in example : REXmeas<br />IP-address of InfluxDB : localhost</p><p><a href="https://docs.influxdata.com/influxdb/v1.1/write_protocols/line_protocol_reference/" rel="nofollow">Influx info - data format</a> --&gt; &#039;line protocol&#039; is used instead of JSON (deprecated as of InfluxDB 0.9.1), if you use Node-RED then you still can use JSON.</p>]]></content>
		<author>
			<name><![CDATA[scoobsalamander]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=6</uri>
		</author>
		<updated>2016-12-16T08:44:54Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1290#p1290</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: JSON - String formatting]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1288#p1288"/>
		<content type="html"><![CDATA[<p>...thanks for the link. My locally stored Github forked files of the examples seemed to be outdated......ok now. :-)</p><p>I&#039;m trying to send some sensor data to an external storage engine (influxdb running on the same device). With node-red it is working fine but now I would like to send it straight from REXcontrols to this time series database.</p><p>I tried already a lot but I always get an error....the parser on influx&#039; side is throwing errors all the time.</p><p>If someone has an idea how I should format the data (4 floats) to get it into my database???</p><p>I already tried with single points and multiple.....tried also a string which I found on their website but only errors are being send back.<br />Is it because it is not real Json (they are using line protocol now instead of Json)?</p><p><a href="https://docs.influxdata.com/influxdb/v1.1/guides/writing_data/" rel="nofollow">https://docs.influxdata.com/influxdb/v1 … ting_data/</a></p>]]></content>
		<author>
			<name><![CDATA[scoobsalamander]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=6</uri>
		</author>
		<updated>2016-12-15T22:44:56Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1288#p1288</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: JSON - String formatting]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1284#p1284"/>
		<content type="html"><![CDATA[<p>Hi scoobsalamander,</p><p>thank you for your question about our new feature - Strings. If I understood correctly, the function block you are looking for is &quot;CONCAT&quot; from &quot;STRING&quot; library. This block concatenates input strings according to given pattern. The functionality you would like to achieve is shown in <a href="https://github.com/rexcontrols/REXexamples/tree/v2.50/HowTo_solutions/REST_API_example" rel="nofollow">REST API example</a> on our GitHub.</p><p>There is also suitable function in REXLANG called &quot;strcat(dest,src)&quot;, which appends &quot;src&quot; string to &quot;dest&quot; string.</p><p>Hope that I answered your question. If you require any further information, feel free to contact me.</p><p>Cheers, Tomas</p>]]></content>
		<author>
			<name><![CDATA[tomáš čechura]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=39</uri>
		</author>
		<updated>2016-12-15T14:46:05Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1284#p1284</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[JSON - String formatting]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1280#p1280"/>
		<content type="html"><![CDATA[<p>I would like to use a HTTP API to send some data to another application, this data should be placed in the body of the POST url. </p><p>The data string (JSON like) looks something like this...</p><div class="codebox"><pre><code>[
  {
    &quot;name&quot; : &quot;temperatures&quot;,
    &quot;columns&quot; : [&quot;bedRoom&quot;, &quot;kitchen&quot;, &quot;bathRoom&quot;],
    &quot;points&quot; : [
      [sensor0, sensor1, sensor2]
    ]
  }
]</code></pre></div><br /><p>How do I get my my data (sensor0, sensor1, sensor3) inside this string? Can I accomplish this in the REXLANG function block?</p>]]></content>
		<author>
			<name><![CDATA[scoobsalamander]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=6</uri>
		</author>
		<updated>2016-12-13T14:24:25Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1280#p1280</id>
	</entry>
</feed>
