<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Using Codesys WebClinet to talk to Sensibo API</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b58577f91/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b58577f91/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/0b58577f91/</id><updated>2021-07-20T04:53:19.900000Z</updated><subtitle>Recent posts to Using Codesys WebClinet to talk to Sensibo API</subtitle><entry><title>Using Codesys WebClinet to talk to Sensibo API</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b58577f91/?limit=25#0aaa" rel="alternate"/><published>2021-07-20T04:53:19.900000Z</published><updated>2021-07-20T04:53:19.900000Z</updated><author><name>bernie-bbq</name><uri>https://forge.codesys.com/u/bernie-bbq/</uri></author><id>https://forge.codesys.comde42c7465f9cc89f8de972a054fede06f3ff8aae</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK, success at last! "{$"acState$":{$"on$":true}}" instead of "{"acState":{"on":TRUE}}" does work with the following sURL: &lt;/p&gt;
&lt;p&gt;'https://home.sensibo.com/api/v2/pods/{deviceID}/acStates?apiKey={API_key_supplied_by_Sensibo}' &lt;/p&gt;
&lt;p&gt;I can now control my AC from a RPI 2 utilisng Codesys and its webClient. Usernames or passwords are not required. I modified the BasicAuthWebClient function as shown.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using Codesys WebClinet to talk to Sensibo API</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b58577f91/?limit=25#728a" rel="alternate"/><published>2021-07-18T09:08:57.356000Z</published><updated>2021-07-18T09:08:57.356000Z</updated><author><name>bernie-bbq</name><uri>https://forge.codesys.com/u/bernie-bbq/</uri></author><id>https://forge.codesys.combb93f2829adaf42fd3f45a058b09c98a168dd780</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The saga continues: So I can now send a Json string to Sensibo the from Codesys webClient if I send:&lt;/p&gt;
&lt;p&gt;"{$"acState$":{$"on$":true}}" instead of "{"acState":{"on":TRUE}}" &lt;/p&gt;
&lt;p&gt;But Sensibo does not respond to this string !!!! Apparently using \ instead of the $ is recognised by Sensibo, but Codesys rejects the \ in the WSTRING. &lt;br/&gt;
Any (polite)suggestions would be gratefully received.&lt;/p&gt;
&lt;p&gt;Bernie_BBQ&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using Codesys WebClinet to talk to Sensibo API</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b58577f91/?limit=25#6355" rel="alternate"/><published>2021-07-09T05:19:59.126000Z</published><updated>2021-07-09T05:19:59.126000Z</updated><author><name>bernie-bbq</name><uri>https://forge.codesys.com/u/bernie-bbq/</uri></author><id>https://forge.codesys.com6123bfe85971b6f6c5c431d54cba543c8defa1d3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Just updating my understanding till now. The WebClient wsPostValue ie'load' required to Post instructions is written as a WSTRING. In Codesys, WSTRINGS must be written between double quote marks " ". However, Jason also requires the use of double quotes around "names" &amp;amp; "values". The clash is, Codesys will not accept a double quote mark inside a WSTRING and so a valid Json command cannot be written as a WSTRING in the Codesys WebClient. I read on one post that placing a $ sign before the inner double quote solves this but that has not worked for me. Json apparently uses a back slash for this purpose also, but Codesys rejects that too. Any ideas guys?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using Codesys WebClinet to talk to Sensibo API</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0b58577f91/?limit=25#5644" rel="alternate"/><published>2021-06-29T10:48:30.771000Z</published><updated>2021-06-29T10:48:30.771000Z</updated><author><name>bernie-bbq</name><uri>https://forge.codesys.com/u/bernie-bbq/</uri></author><id>https://forge.codesys.comc506f12863b5bb95b13aada838c11c6e39722e8b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I have being attempting to send the instructions "ON' &amp;amp; "OFF' to my air-conditioner utilising the Codesys WebClient and a Sensibo controller. Sensibo's RESTful API is built on HTTP and it accepts and returns JSon in the HTTP body. &lt;/p&gt;
&lt;p&gt;Whilst I can log into the Sensibo site  &lt;a href="https://home.sensibo.com/api/v2/users/me/pods?fields=" rel="nofollow"&gt;https://home.sensibo.com/api/v2/users/me/pods?fields=&lt;/a&gt;*&amp;amp;apiKey={api_key}&lt;code&gt;utilising with my API key issued by Sensibo, I cannot send the ON/Off instructions. I believe this is meant to happen via the wsPostValue : WSTRING(100) in WebClient but I cannot make this work. The 'curl-X POST' expression supplied by Sensibo is:&lt;/code&gt;curl -X POST &lt;a href="https://home.sensibo.com/api/v2/pods/" rel="nofollow"&gt;https://home.sensibo.com/api/v2/pods/&lt;/a&gt;/acStates?apiKey={api_key} -d "{\"acState\":{\"on\":true}}"` &lt;/p&gt;
&lt;p&gt;I have tried every variation of "{\"acState\":{\"on\":true}}" as a string in wsPostValue to no avail.... but as is probably becoming obvious, I am no programmer.&lt;/p&gt;
&lt;p&gt;I am using SP17 &amp;amp; a RPi and receive no errors accept those relating to the wsPostValue. This issue stands between me and a successful home heating automation outcome. Any help would be appreciated.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>