<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ricardo Costa, Author at Blog IT</title>
	<atom:link href="https://blogit.create.pt/author/ricardocosta/feed/" rel="self" type="application/rss+xml" />
	<link>https://blogit.create.pt/author/ricardocosta/</link>
	<description>Create IT blogger community</description>
	<lastBuildDate>Wed, 18 Nov 2020 23:00:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>WLED &#8211; Check how I built my first TV led strip super easy</title>
		<link>https://blogit.create.pt/ricardocosta/2020/11/18/wled-check-how-i-built-my-first-tv-led-strip-super-easy/</link>
					<comments>https://blogit.create.pt/ricardocosta/2020/11/18/wled-check-how-i-built-my-first-tv-led-strip-super-easy/#comments</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Wed, 18 Nov 2020 23:00:44 +0000</pubDate>
				<category><![CDATA[IoT]]></category>
		<category><![CDATA[iot]]></category>
		<category><![CDATA[led]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=12141</guid>

					<description><![CDATA[<p>WLED is a really cool project found here. It&#8217;s a web server to run on ESP8266/ESP32 that can control a lot of different kind of leds. In the next paragraphs I will show you how did I build my first TV led strip. I will show you the parts that I&#8217;ve used, how to install [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2020/11/18/wled-check-how-i-built-my-first-tv-led-strip-super-easy/">WLED &#8211; Check how I built my first TV led strip super easy</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>WLED is a really cool project found <a rel="noreferrer noopener" href="https://github.com/Aircoookie/WLED" data-type="URL" data-id="https://github.com/Aircoookie/WLED" target="_blank">here</a>. It&#8217;s a web server to run on ESP8266/ESP32 that can control a lot of different kind of leds.</p>



<p>In the next paragraphs I will show you how did I build my first TV led strip. I will show you the parts that I&#8217;ve used, how to install the software, and also the way I&#8217;ve assembled everything in a small box on the back of my TV.</p>



<p>The first thing that I did was to buy an ESP8266. I bought this <a rel="noreferrer noopener" href="https://mauser.pt/catalog/product_info.php?cPath=1667_2889_2619&amp;products_id=096-6784" target="_blank">one</a> from Mauser.</p>



<figure class="wp-block-image size-large is-resized is-style-default"><img fetchpriority="high" decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/ESP8266.jpg" alt="ESP8266" class="wp-image-12144" width="512" height="290" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/ESP8266.jpg 1024w, https://blogit.create.pt/wp-content/uploads/2020/11/ESP8266-300x170.jpg 300w, https://blogit.create.pt/wp-content/uploads/2020/11/ESP8266-768x435.jpg 768w, https://blogit.create.pt/wp-content/uploads/2020/11/ESP8266-696x394.jpg 696w, https://blogit.create.pt/wp-content/uploads/2020/11/ESP8266-742x420.jpg 742w" sizes="(max-width: 512px) 100vw, 512px" /><figcaption>ESP8266</figcaption></figure>



<p>I&#8217;ve connected the ESP8266 to my PC with the USB cable. And uploaded to the device. How did I do that?</p>



<p>The WLED binary that I&#8217;ve used was <em><strong>WLED_0.10.2_ESP8266.bin</strong></em> that I&#8217;ve downloaded from the <a rel="noreferrer noopener" href="https://github.com/Aircoookie/WLED/releases" target="_blank">releases page</a>.</p>



<p>I use this great tool esphome-flasher. Downloaded the latest release <a rel="noreferrer noopener" href="https://github.com/esphome/esphome-flasher/releases" target="_blank">here</a>. Just run the tool and choose the previous downloaded binary. Don&#8217;t forget to have the device connected to the USB port of your computer.</p>



<figure class="wp-block-image size-large is-resized is-style-default"><img decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/esphome-flasher-wled.png" alt="esphome flasher wled" class="wp-image-12148" width="704" height="637" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/esphome-flasher-wled.png 703w, https://blogit.create.pt/wp-content/uploads/2020/11/esphome-flasher-wled-300x271.png 300w, https://blogit.create.pt/wp-content/uploads/2020/11/esphome-flasher-wled-696x630.png 696w, https://blogit.create.pt/wp-content/uploads/2020/11/esphome-flasher-wled-464x420.png 464w" sizes="(max-width: 704px) 100vw, 704px" /><figcaption>esphome flasher wled</figcaption></figure>



<p>In my computer the device shows up in COM4 port.</p>



<p>After that your newly flashed WLED device should give you an access point named WLED-AP. Connect to it with wled1234 password. I connected with my phone and I was immediately redirected to the first time configuration web page. If this doesn&#8217;t happen to you, open the browser and go to 4.3.2.1 you should see this page.</p>



<figure class="wp-block-image size-large is-resized is-style-default"><img decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/wled-first-configuration-732x1024.jpg" alt="wled first configuration" class="wp-image-12150" width="549" height="768" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/wled-first-configuration-732x1024.jpg 732w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-first-configuration-214x300.jpg 214w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-first-configuration-768x1075.jpg 768w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-first-configuration-696x974.jpg 696w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-first-configuration-1068x1495.jpg 1068w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-first-configuration-300x420.jpg 300w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-first-configuration.jpg 1076w" sizes="(max-width: 549px) 100vw, 549px" /><figcaption>wled first configuration</figcaption></figure>



<p>Insert your home wifi SSID and password, click Save &amp; Connect. </p>



<figure class="wp-block-image size-large is-resized is-style-default"><img decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-489x1024.jpg" alt="wled wifi settings" class="wp-image-12151" width="367" height="768" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-489x1024.jpg 489w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-143x300.jpg 143w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-768x1607.jpg 768w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-734x1536.jpg 734w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-979x2048.jpg 979w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-696x1456.jpg 696w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-1068x2235.jpg 1068w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings-201x420.jpg 201w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-settings.jpg 1080w" sizes="(max-width: 367px) 100vw, 367px" /><figcaption>wled wifi settings</figcaption></figure>



<p>Your device will reboot and connect to your wifi network. </p>



<figure class="wp-block-image size-large is-resized is-style-default"><img decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-connect-1024x412.jpg" alt="wled wifi connect" class="wp-image-12152" width="512" height="206" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-connect-1024x412.jpg 1024w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-connect-300x121.jpg 300w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-connect-768x309.jpg 768w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-connect-696x280.jpg 696w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-connect-1068x430.jpg 1068w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-connect-1043x420.jpg 1043w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wifi-connect.jpg 1080w" sizes="(max-width: 512px) 100vw, 512px" /><figcaption>wled wifi connect</figcaption></figure>



<p>Find the IP address of your device using one of the thousands of network tools available on the internet and open your browser with that IP address.  </p>



<figure class="wp-block-image size-large is-resized is-style-default"><img decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/wled-488x1024.jpg" alt="wled" class="wp-image-12153" width="366" height="768" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/wled-488x1024.jpg 488w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-143x300.jpg 143w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-768x1611.jpg 768w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-732x1536.jpg 732w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-977x2048.jpg 977w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-696x1460.jpg 696w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-1068x2240.jpg 1068w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-200x420.jpg 200w, https://blogit.create.pt/wp-content/uploads/2020/11/wled.jpg 1080w" sizes="(max-width: 366px) 100vw, 366px" /><figcaption>wled</figcaption></figure>



<p>And that&#8217;s it. You have your WLED device installed and ready to use. </p>



<p>For the LED strip I bought from <a rel="noreferrer noopener" href="https://pt.aliexpress.com/item/2036819167.html?spm=a2g0s.9042311.0.0.fd36b90avJwEnK" target="_blank">AliExpress</a>. It&#8217;s a 5 meter WS2810 LED strip (individually addressable leds). The next configuration is the LED count. For that, I needed to measure my TV, cut the strip and count the number of LEDs that I was going to control. For my TV I have 18 leds on each side and 32 leds, top and bottom. That gives me a total led count of 100.</p>



<figure class="wp-block-image size-large is-resized is-style-default"><img decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/wled-led-count-473x1024.jpg" alt="wled led count" class="wp-image-12155" width="473" height="1024" /><figcaption>wled led count</figcaption></figure>



<p>Now for the wire connection, this is how you should do it. Im using a 5V led strip so I followed the first option in the schematics picture below.</p>



<figure class="wp-block-image size-large is-resized is-style-default"><img decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/wled-wire-connection.png" alt="wled wire connection" class="wp-image-12157" width="640" height="426" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/wled-wire-connection.png 640w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wire-connection-300x200.png 300w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-wire-connection-631x420.png 631w" sizes="(max-width: 640px) 100vw, 640px" /><figcaption>wled wire connection</figcaption></figure>



<p>I took this picture from projectwiki &#8211; <a rel="noreferrer noopener" href="https://github.com/Aircoookie/WLED/wiki" target="_blank">https://github.com/Aircoookie/WLED/wiki</a></p>



<p>If the distance between the device and the led strip is long you should use a level shifter. That was not my case so I didnt have the need to include one in my solution. I used the 470 ohm resistor and and the 1000 uF capacitor.</p>



<p>Because I used the nodemcu, it is an ESP8266 device, I connected the D4 pin to the data input on the led strip. The led strip has3 conductors, 5V, GND and DATA.</p>



<p>I connected the 5V and GND not only in the beginning of the led strip but also in the end. The data input, that is connected to D4 pin, it is only connected in the beginning of the strip, and there is an arrow on the strip pointing to the data signal flow direction. </p>



<figure class="wp-block-image size-large is-resized is-style-default"><img decoding="async" src="https://blogit.create.pt/wp-content/uploads/2020/11/wled-power-data-1.jpg" alt="wled power data" class="wp-image-12164" width="512" height="384" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/wled-power-data-1.jpg 1024w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-power-data-1-300x225.jpg 300w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-power-data-1-768x576.jpg 768w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-power-data-1-696x522.jpg 696w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-power-data-1-560x420.jpg 560w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-power-data-1-80x60.jpg 80w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-power-data-1-265x198.jpg 265w" sizes="(max-width: 512px) 100vw, 512px" /><figcaption>wled power data</figcaption></figure>



<p>And that&#8217;s it! I can know control my TV led strip thru the web interface and I can also use the WLED mobile that I&#8217;ve installed on my smartphone.</p>



<p>Enjoy!</p>



<figure class="wp-block-image size-large is-style-default"><img decoding="async" width="1024" height="815" src="https://blogit.create.pt/wp-content/uploads/2020/11/wled-show.jpg" alt="wled show" class="wp-image-12165" srcset="https://blogit.create.pt/wp-content/uploads/2020/11/wled-show.jpg 1024w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-show-300x239.jpg 300w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-show-768x611.jpg 768w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-show-696x554.jpg 696w, https://blogit.create.pt/wp-content/uploads/2020/11/wled-show-528x420.jpg 528w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>wled show</figcaption></figure>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2020/11/18/wled-check-how-i-built-my-first-tv-led-strip-super-easy/">WLED &#8211; Check how I built my first TV led strip super easy</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2020/11/18/wled-check-how-i-built-my-first-tv-led-strip-super-easy/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Home Assistant template sensor, adding two sensor explained</title>
		<link>https://blogit.create.pt/ricardocosta/2020/10/28/home-assistant-template-sensor-adding-two-sensor-explained/</link>
					<comments>https://blogit.create.pt/ricardocosta/2020/10/28/home-assistant-template-sensor-adding-two-sensor-explained/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Wed, 28 Oct 2020 15:28:40 +0000</pubDate>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[home assistant]]></category>
		<category><![CDATA[shelly]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=12103</guid>

					<description><![CDATA[<p>This post explain how to add a template sensor in Home Assistant that is the sum of two other sensors that measure the power.</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2020/10/28/home-assistant-template-sensor-adding-two-sensor-explained/">Home Assistant template sensor, adding two sensor explained</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I&#8217; going to show you how to configure a template sensor in home assistant that adds two power sensors. I&#8217;m using Home Assistant to automate lights, sensors, leds, TV, and other devices in my home. I have some <a href="https://shelly.cloud/products/shelly-25-smart-home-automation-relay/">Shelly 2.5 switches</a> and these switches have dual power metering, one for each switch because Shelly 2.5 is a dual switch.</p>



<p>And I wanted to have a sensor that measures the total power instead of having 2 sensors separately.</p>



<p>So let&#8217;s see how I&#8217;ve configured a template sensor in home assistant that adds two power sensors. In the next yaml code you can see the sensors.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
  - platform: mqtt
    unique_id: sensor_potencia_sala_jantar_tecto
    name: &quot;Potência da luz do tecto da sala de jantar&quot;
    state_topic: &quot;shellies/sala_tecto/relay/0/power&quot;
    unit_of_measurement: &#039;W&#039;
  - platform: mqtt
    unique_id: sensor_potencia_sala_estar_tecto
    name: &quot;Potência da luz do tecto da sala de estar&quot;
    state_topic: &quot;shellies/sala_tecto/relay/1/power&quot;
    unit_of_measurement: &#039;W&#039;

</pre></div>


<p>And for the custom sensor that has the sum of the two previous sensors, this is how I&#8217;ve configured the yaml</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; highlight: [5,6]; title: ; notranslate">
  - platform: template
    sensors:
      sensor_potencia_sala:
        unit_of_measurement: &quot;W&quot;
        value_template: &quot;{{ (states(&#039;sensor.sensor_potencia_sala_jantar_tecto&#039;) | float) +
 (states(&#039;sensor.sensor_potencia_sala_estar_tecto&#039;) | float)}}&quot;

</pre></div>


<p>Check out my <a href="https://blogit.create.pt/ricardocosta/2020/10/20/home-assistant-with-shelly-2-5-switch-the-easy-way/">previous post</a> about configuring the Shelly 2.5 switch in Home Assistant.</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2020/10/28/home-assistant-template-sensor-adding-two-sensor-explained/">Home Assistant template sensor, adding two sensor explained</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2020/10/28/home-assistant-template-sensor-adding-two-sensor-explained/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Home Assistant with Shelly 2.5 switch the easy way</title>
		<link>https://blogit.create.pt/ricardocosta/2020/10/20/home-assistant-with-shelly-2-5-switch-the-easy-way/</link>
					<comments>https://blogit.create.pt/ricardocosta/2020/10/20/home-assistant-with-shelly-2-5-switch-the-easy-way/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Tue, 20 Oct 2020 10:40:36 +0000</pubDate>
				<category><![CDATA[IoT]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[home assistant]]></category>
		<category><![CDATA[iot]]></category>
		<category><![CDATA[mqtt]]></category>
		<category><![CDATA[shelly]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=12052</guid>

					<description><![CDATA[<p>How-to configure Home Assistant configuration.yaml file for your Shelly 2.5 switch. The 2.5 switch is a double relay switch and roller shutter.</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2020/10/20/home-assistant-with-shelly-2-5-switch-the-easy-way/">Home Assistant with Shelly 2.5 switch the easy way</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve recently bought a Shelly 2.5 switch and this is how I&#8217;ve setup my Home Assistant. Here is my configuration.yaml for the switches. I&#8217;m controlling lights as a result I&#8217;m using the lights objects</p>



<p>I use the Home Assistant add-on named mosquitto as MQTT for everything so I can keep the communication system the same for all my devices and keep the management system simple.</p>



<p>First of all I configured my Shelly 2.5 thru the web interface to use MQTT. This is done in the &#8220;Internet &amp; Security&#8221; configuration settings, &#8220;Advance Developer &#8211; Settings&#8221;.</p>



<p>I configured the username and password that was set in Mosquitto MQTT server in Home Assistant. Don&#8217;t forget the IP address of the Home Assistant server (port 1883).</p>



<p>I&#8217;ve used a custom MQTT prefix as you can see in the yaml files configuration below. I use this prefix as a way to give a name to my switch</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="792" height="930" src="https://blogit.create.pt/wp-content/uploads/2020/10/shelly-2.5-mqtt.png" alt="Shelly 2.5 web interface for configuring MQTT" class="wp-image-12064" srcset="https://blogit.create.pt/wp-content/uploads/2020/10/shelly-2.5-mqtt.png 792w, https://blogit.create.pt/wp-content/uploads/2020/10/shelly-2.5-mqtt-255x300.png 255w, https://blogit.create.pt/wp-content/uploads/2020/10/shelly-2.5-mqtt-768x902.png 768w, https://blogit.create.pt/wp-content/uploads/2020/10/shelly-2.5-mqtt-696x817.png 696w, https://blogit.create.pt/wp-content/uploads/2020/10/shelly-2.5-mqtt-358x420.png 358w" sizes="(max-width: 792px) 100vw, 792px" /></figure></div>



<p></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
# lights
light:
  - platform: mqtt
    unique_id: luz_sala_jantar_tecto
    name: &quot;Luz do tecto da sala de jantar&quot;
    state_topic: &quot;shellies/sala_tecto/relay/0&quot;
    command_topic: &quot;shellies/sala_tecto/relay/0/command&quot;
    payload_on: &#039;on&#039;
    payload_off: &#039;off&#039;
    retain: false
    qos: 1
  - platform: mqtt
    unique_id: luz_sala_estar_tecto
    name: &quot;Luz do tecto da sala de estar&quot;
    state_topic: &quot;shellies/sala_tecto/relay/1&quot;
    command_topic: &quot;shellies/sala_tecto/relay/1/command&quot;
    payload_on: &#039;on&#039;
    payload_off: &#039;off&#039;
    retain: false
    qos: 1

</pre></div>


<p>The Shelly 2.5 has temperature sensor so I&#8217;ve configured it like this</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
sensor:
  - platform: mqtt
    unique_id: sensor_temperatura_sala_tecto
    name: &quot;Temperatura da luz do tecto da sala&quot;
    state_topic: &quot;shellies/sala_tecto/temperature&quot;
    unit_of_measurement: &#039;ºC&#039;

</pre></div>


<p>There is a power sensor so check the configuration here </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
sensor:
  - platform: mqtt
    unique_id: sensor_potencia_sala_jantar_tecto
    name: &quot;Potência da luz do tecto da sala de jantar&quot;
    state_topic: &quot;shellies/sala_tecto/relay/0/power&quot;
    unit_of_measurement: &#039;W&#039;

</pre></div>


<p>And for the energy sensor, this is the way I&#8217;ve set it up. </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
sensor
  - platform: mqtt
    unique_id: sensor_energia_sala_jantar_tecto
    name: &quot;Energia da luz do tecto da sala de jantar&quot;
    state_topic: &quot;shellies/sala_tecto/relay/0/energy&quot;
    unit_of_measurement: &#039;Wh&#039;

</pre></div>


<p>And I&#8217;ve used a binary sensor for the the temperature alert. </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
binary_sensor:
  - platform: mqtt
    unique_id: alerta_temperatura_luz_sala_tecto
    name: &quot;Alerta de temperatura da luz do tecto da sala&quot;
    state_topic: &quot;shellies/sala_tecto/overtemperature&quot;
    device_class: &quot;heat&quot;
    payload_off: &quot;0&quot;
    payload_on: &quot;1&quot;
</pre></div>


<p>If you want you can check the Shelly 2.5 specification here at the official Selly <a href="https://shelly.cloud/products/shelly-25-smart-home-automation-relay/" target="_blank" rel="noreferrer noopener">website</a>.</p>



<p>And I&#8217;m a <a href="https://www.mauser.pt">Mauser.pt</a> store fan so go check the site. </p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2020/10/20/home-assistant-with-shelly-2-5-switch-the-easy-way/">Home Assistant with Shelly 2.5 switch the easy way</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2020/10/20/home-assistant-with-shelly-2-5-switch-the-easy-way/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Raven.Studio.zip Index.html not available</title>
		<link>https://blogit.create.pt/ricardocosta/2018/10/10/raven-studio-zip-index-html-not-available/</link>
					<comments>https://blogit.create.pt/ricardocosta/2018/10/10/raven-studio-zip-index-html-not-available/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Wed, 10 Oct 2018 14:52:19 +0000</pubDate>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[.NET]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=7580</guid>

					<description><![CDATA[<p>I had RavenDb embedded in a aspnet.core web api and I was getting this error when I tried to reach Raven Studio: The following file was not available: index.html. Please make sure that the Raven.Studio.zip file exist in the main directory (near the Raven.Server.exe). The solution was to copy Raven.Studio.zip to the root directory of [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2018/10/10/raven-studio-zip-index-html-not-available/">Raven.Studio.zip Index.html not available</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I had RavenDb embedded in a aspnet.core web api and I was getting this error when I tried to reach Raven Studio: The following file was not available: index.html. Please make sure that the Raven.Studio.zip file exist in the main directory (near the Raven.Server.exe).</p>
<p>The solution was to copy Raven.Studio.zip to the root directory of the web api.</p>
<p><img decoding="async" class="size-medium wp-image-7582" src="https://blogit.create.pt////wp-content/uploads/2018/10/Raven-Studio-Zip-300x73.png" alt="Raven Studio Zip" width="300" height="73" srcset="https://blogit.create.pt/wp-content/uploads/2018/10/Raven-Studio-Zip-300x73.png 300w, https://blogit.create.pt/wp-content/uploads/2018/10/Raven-Studio-Zip.png 458w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>&nbsp;</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2018/10/10/raven-studio-zip-index-html-not-available/">Raven.Studio.zip Index.html not available</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2018/10/10/raven-studio-zip-index-html-not-available/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>git-askpass.exe: No such file or directory. Visual Studio</title>
		<link>https://blogit.create.pt/ricardocosta/2018/09/06/git-askpass-no-such-file-visual-studio/</link>
					<comments>https://blogit.create.pt/ricardocosta/2018/09/06/git-askpass-no-such-file-visual-studio/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Thu, 06 Sep 2018 12:57:44 +0000</pubDate>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[BitBucket]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[visual studio]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=7432</guid>

					<description><![CDATA[<p>I was getting an error when I tried to sync to my Git BitBucket repository with Visual Studio 2017: git-askpass.exe: No such file or directory. To resolve this I had to: Remove Git from Control Panel -&#62; Uninstall Remove Git Windows Credential Manager from Control Panel -&#62; Uninstall With Visual Studio 2017 Installer, remove Git [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2018/09/06/git-askpass-no-such-file-visual-studio/">git-askpass.exe: No such file or directory. Visual Studio</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I was getting an error when I tried to sync to my Git BitBucket repository with Visual Studio 2017:</p>
<p><em>git-askpass.exe: No such file or directory.</em></p>
<p>To resolve this I had to:</p>
<ol>
<li>Remove Git from Control Panel -&gt; Uninstall</li>
<li>Remove Git Windows Credential Manager from Control Panel -&gt; Uninstall</li>
<li>With Visual Studio 2017 Installer, remove Git for Windows</li>
<li>Install Git</li>
<li>Install Git Windows Credential Manager</li>
<li>With Visual Studio 2017 Installer, install Git for Windows</li>
</ol>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2018/09/06/git-askpass-no-such-file-visual-studio/">git-askpass.exe: No such file or directory. Visual Studio</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2018/09/06/git-askpass-no-such-file-visual-studio/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>RavenDB embedded with ASP NET Core web API</title>
		<link>https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/</link>
					<comments>https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Tue, 04 Sep 2018 21:38:46 +0000</pubDate>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET Core]]></category>
		<category><![CDATA[RavenDB]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=7417</guid>

					<description><![CDATA[<p>This post describes how you can set up a simple ASP NET Core web API with Visual Studio 2017 to use an embedded RavenDB. This is a step by step tutorial. a) You need to create a new ASP.NET Core Web Application with Visual Studio 2017 b) Choose .NET Core; ASP.NET Core 2.1; API c) [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/">RavenDB embedded with ASP NET Core web API</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This post describes how you can set up a simple ASP NET Core web API with Visual Studio 2017 to use an embedded RavenDB. This is a step by step tutorial.</p>
<p>a) You need to create a new ASP.NET Core Web Application with Visual Studio 2017<br />
b) Choose .NET Core; ASP.NET Core 2.1; API<br />
c) Right click the new project -&gt; Manage NuGet packages<br />
d) You have to add a new package source. Settings. New package source.</p>
<p style="padding-left: 30px">Name: <a href="https://www.myget.org/F/ravendb/api/v3/index.json">MyGet</a><br />
Source: https://www.myget.org/F/ravendb/api/v3/index.json</p>
<p>e) Choose the new source. Add:</p>
<p style="padding-left: 30px">RavenDB.Embedded &#8211; 4.1.1-nightly-20180904-0430<br />
RavenDB.Client &#8211; 4.1.1-nightly-20180904-0430</p>
<p>f) Create a DocumentStoreHolder class</p>
<pre class="brush: csharp; title: ; notranslate">

internal class DocumentStoreHolder
{
    private static Lazy&lt;IDocumentStore&gt; store = new Lazy&lt;IDocumentStore&gt;(CreateStore);

    public static IDocumentStore Store =&gt; store.Value;

    private static IDocumentStore CreateStore()
    {
        var serverOptions = new ServerOptions()
        {
            ServerUrl = &quot;http://127.0.0.1:60956/&quot;,
        };
        EmbeddedServer.Instance.StartServer(serverOptions);

        return EmbeddedServer.Instance.GetDocumentStore(&quot;MyRavenDBStore&quot;);
    }
}

</pre>
<p>g) And that&#8217;s it 🙂</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/">RavenDB embedded with ASP NET Core web API</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Azure Search Index with 2 datasources</title>
		<link>https://blogit.create.pt/ricardocosta/2017/11/10/azure-search-index-with-2-datasources/</link>
					<comments>https://blogit.create.pt/ricardocosta/2017/11/10/azure-search-index-with-2-datasources/#comments</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Fri, 10 Nov 2017 15:24:02 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/ricardocosta/?p=1834</guid>

					<description><![CDATA[<p>Recently I had the need to index documents stored in Azure Storage Blobs. Additionally I wanted to use the blob storage metadata also to add some information to those documents. Because I needed rich text information on the metadata I could use blob storage metadata directly. Se here why. So I had to use 2 [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/11/10/azure-search-index-with-2-datasources/">Azure Search Index with 2 datasources</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Recently I had the need to index documents stored in Azure Storage Blobs. Additionally I wanted to use the blob storage metadata also to add some information to those documents. Because I needed rich text information on the metadata I could use blob storage metadata directly. Se <a href="http://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/" target="_blank" rel="noopener">here</a> why.</p>
<p>So I had to use 2 different data sources. One for the documents and another to the metadata. So I chose Azure Blob Storage and Azure Table Storage. This is the full diagram of the final solution:</p>
<p><a href="http://blogit-create.com/wp-content/uploads/2017/11/AzureSearch01.png"><img decoding="async" class="aligncenter wp-image-1974 size-full" src="http://blogit-create.com/wp-content/uploads/2017/11/AzureSearch01.png" alt="" width="807" height="456" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/AzureSearch01.png 807w, https://blogit.create.pt/wp-content/uploads/2017/11/AzureSearch01-300x170.png 300w, https://blogit.create.pt/wp-content/uploads/2017/11/AzureSearch01-768x434.png 768w, https://blogit.create.pt/wp-content/uploads/2017/11/AzureSearch01-696x393.png 696w, https://blogit.create.pt/wp-content/uploads/2017/11/AzureSearch01-743x420.png 743w" sizes="(max-width: 807px) 100vw, 807px" /></a></p>
<p>The indexers are responsible for updating the index with the contents of the 2 different data sources. There is a very important field that in my case it&#8217;s called the <span style="text-decoration: underline"><strong>UniqueIdentifier</strong></span> field because this field is marked with the <span style="text-decoration: underline"><strong>key</strong></span> property. This is the field that uniquely identifies each document on the Azure Search Index.</p>
<p>And it&#8217;s this field that is responsible for correlating the items that come from one data source (documents from blob storage) and items that come from the other data source (records from table storage).</p>
<p>Every document inserted in blob storage has a custom metadata property named also UniqueIdentifier that will have a table storage record associated with the corresponding metadata.</p>
<p><span id="more-1834"></span></p>
<pre class="brush: csharp; highlight: [15]; title: ; notranslate">

// Retrieve storage account from connection string.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
                CloudConfigurationManager.GetSetting(&quot;StorageConnectionString&quot;));

// Create the blob client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();

// Retrieve a reference to a container.
CloudBlobContainer container = blobClient.GetContainerReference(&quot;mycontainer&quot;);

// Create the container if it doesn't already exist.
container.CreateIfNotExists();

// Add some metadata to the container.
container.Metadata.Add(&quot;UniqueIdentifier&quot;, &quot;bla bla bla&quot;);

</pre>
<p>The table storage records have these values stored on the RowKey and the indexer have a mapping instruction to map the origin (RowKey) to the destination (UniqueIdentifier). You can check this mapping instruction later in the indexer schema.</p>
<p>First of all I created the Index:</p>
<p>(I&#8217;ve highlighted the <span style="text-decoration: underline"><strong>UniqueIdentifier</strong></span> field wiht the <span style="text-decoration: underline"><strong>Key</strong></span> property set to <span style="text-decoration: underline"><strong>TRUE</strong></span>)</p>
<pre class="brush: plain; highlight: [19,20,21,22,23,24,25,26,27,28,29,30,31]; title: ; notranslate">

{
  &quot;@odata.context&quot;: &quot;https://something.search.windows.net/$metadata#indexes/$entity&quot;,
  &quot;@odata.etag&quot;: &quot;\&quot;0x8D477848BDEFA50\&quot;&quot;,
  &quot;name&quot;: &quot;full-index&quot;,
  &quot;fields&quot;: &#x5B;
    {
      &quot;name&quot;: &quot;ClientCode&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: true,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: true,
      &quot;facetable&quot;: true,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;UniqueIdentifier&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: true,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: true,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;ETag&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: false,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;Timestamp&quot;,
      &quot;type&quot;: &quot;Edm.DateTimeOffset&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: false,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;Key&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: false,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;Opportunity&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: true,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: &quot;pt-Pt.lucene&quot;
    },
    {
      &quot;name&quot;: &quot;OpportunityCode&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;DocumentExtension&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: true,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: true,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;DocumentType&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: true,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: true,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;ClientName&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: true,
      &quot;filterable&quot;: true,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: true,
      &quot;facetable&quot;: true,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: &quot;pt-Pt.lucene&quot;
    },
    {
      &quot;name&quot;: &quot;Year&quot;,
      &quot;type&quot;: &quot;Edm.Int32&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: true,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: true,
      &quot;facetable&quot;: true,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;Path&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;LocalPath&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;Name&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: true,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: true,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: &quot;pt-Pt.lucene&quot;
    },
    {
      &quot;name&quot;: &quot;content&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: true,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: false,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: &quot;pt-Pt.lucene&quot;
    },
    {
      &quot;name&quot;: &quot;metadata_storage_content_type&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_storage_size&quot;,
      &quot;type&quot;: &quot;Edm.Int64&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_storage_last_modified&quot;,
      &quot;type&quot;: &quot;Edm.DateTimeOffset&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_storage_content_md5&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_storage_name&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_storage_path&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_author&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_content_type&quot;,
      &quot;type&quot;: &quot;Edm.String&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_creation_date&quot;,
      &quot;type&quot;: &quot;Edm.DateTimeOffset&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    },
    {
      &quot;name&quot;: &quot;metadata_last_modified&quot;,
      &quot;type&quot;: &quot;Edm.DateTimeOffset&quot;,
      &quot;searchable&quot;: false,
      &quot;filterable&quot;: false,
      &quot;retrievable&quot;: true,
      &quot;sortable&quot;: false,
      &quot;facetable&quot;: false,
      &quot;key&quot;: false,
      &quot;indexAnalyzer&quot;: null,
      &quot;searchAnalyzer&quot;: null,
      &quot;analyzer&quot;: null
    }
  ],
  &quot;scoringProfiles&quot;: &#x5B;],
  &quot;defaultScoringProfile&quot;: &quot;&quot;,
  &quot;corsOptions&quot;: null,
  &quot;suggesters&quot;: &#x5B;
    {
      &quot;name&quot;: &quot;temp-suggester&quot;,
      &quot;searchMode&quot;: &quot;analyzingInfixMatching&quot;,
      &quot;sourceFields&quot;: &#x5B;
        &quot;ClientCode&quot;,
        &quot;Opportunity&quot;,
        &quot;ClientName&quot;,
        &quot;Name&quot;
      ]
    }
  ],
  &quot;analyzers&quot;: &#x5B;],
  &quot;tokenizers&quot;: &#x5B;],
  &quot;tokenFilters&quot;: &#x5B;],
  &quot;charFilters&quot;: &#x5B;]
}

</pre>
<p>After the index was created I&#8217;ve created the container and uploaded my files. This is the corresponding data source:</p>
<pre class="brush: plain; title: ; notranslate">

{
  &quot;@odata.context&quot;: &quot;https://something.search.windows.net/$metadata#datasources/$entity&quot;,
  &quot;@odata.etag&quot;: &quot;\&quot;0x8D526E01DDB35F4\&quot;&quot;,
  &quot;name&quot;: &quot;opportunities-datasource&quot;,
  &quot;description&quot;: &quot;&quot;,
  &quot;type&quot;: &quot;azureblob&quot;,
  &quot;subtype&quot;: null,
  &quot;credentials&quot;: {
    &quot;connectionString&quot;: null
  },
  &quot;container&quot;: {
    &quot;name&quot;: &quot;opportunities&quot;,
    &quot;query&quot;: null
  },
  &quot;dataChangeDetectionPolicy&quot;: null,
  &quot;dataDeletionDetectionPolicy&quot;: null
}

</pre>
<p>I&#8217;ve also create the Table Storage and inserted the metadata records. This is the data source:</p>
<pre class="brush: plain; title: ; notranslate">

{
  &quot;@odata.context&quot;: &quot;https://something.search.windows.net/$metadata#datasources/$entity&quot;,
  &quot;@odata.etag&quot;: &quot;\&quot;0x8D526E01DB70AF2\&quot;&quot;,
  &quot;name&quot;: &quot;ecmcreatemeta&quot;,
  &quot;description&quot;: &quot;&quot;,
  &quot;type&quot;: &quot;azuretable&quot;,
  &quot;subtype&quot;: null,
  &quot;credentials&quot;: {
    &quot;connectionString&quot;: null
  },
  &quot;container&quot;: {
    &quot;name&quot;: &quot;opportunities&quot;,
    &quot;query&quot;: null
  },
  &quot;dataChangeDetectionPolicy&quot;: null,
  &quot;dataDeletionDetectionPolicy&quot;: null
}

</pre>
<p>And these are the indexers. The documents indexer:</p>
<pre class="brush: plain; title: ; notranslate">

{
  &quot;@odata.context&quot;: &quot;https://something.search.windows.net/$metadata#indexers/$entity&quot;,
  &quot;@odata.etag&quot;: &quot;\&quot;0x8D477862D23289E\&quot;&quot;,
  &quot;name&quot;: &quot;full-indexer-blob&quot;,
  &quot;description&quot;: &quot;&quot;,
  &quot;dataSourceName&quot;: &quot;opportunities-datasource&quot;,
  &quot;targetIndexName&quot;: &quot;full-index&quot;,
  &quot;schedule&quot;: null,
  &quot;parameters&quot;: {
    &quot;batchSize&quot;: 10,
    &quot;maxFailedItems&quot;: 10,
    &quot;maxFailedItemsPerBatch&quot;: 10,
    &quot;base64EncodeKeys&quot;: false,
    &quot;configuration&quot;: {
      &quot;dataToExtract&quot;: &quot;contentAndMetadata&quot;,
      &quot;failOnUnsupportedContentType&quot;: false,
      &quot;indexedFileNameExtensions&quot;: &quot;.pdf, .docx, .doc, .xlsx, .xls, .pptx, .ppt, .msg, .html, .htm, .xml, .zip, .eml, .txt, .json, .csv&quot;
    }
  },
  &quot;fieldMappings&quot;: &#x5B;],
  &quot;disabled&quot;: null
}

</pre>
<p>And the metadata indexer:</p>
<pre class="brush: plain; highlight: [22,23,24,25,26]; title: ; notranslate">

{
  &quot;@odata.context&quot;: &quot;https://something.search.windows.net/$metadata#indexers/$entity&quot;,
  &quot;@odata.etag&quot;: &quot;\&quot;0x8D47784D3CE80DF\&quot;&quot;,
  &quot;name&quot;: &quot;full-indexer-meta&quot;,
  &quot;description&quot;: &quot;&quot;,
  &quot;dataSourceName&quot;: &quot;ecmcreatemeta&quot;,
  &quot;targetIndexName&quot;: &quot;full-index&quot;,
  &quot;schedule&quot;: null,
  &quot;parameters&quot;: {
    &quot;batchSize&quot;: null,
    &quot;maxFailedItems&quot;: 0,
    &quot;maxFailedItemsPerBatch&quot;: 0,
    &quot;base64EncodeKeys&quot;: false,
    &quot;configuration&quot;: {}
  },
  &quot;fieldMappings&quot;: &#x5B;
    {
      &quot;sourceFieldName&quot;: &quot;PartitionKey&quot;,
      &quot;targetFieldName&quot;: &quot;ClientCode&quot;,
      &quot;mappingFunction&quot;: null
    },
    {
      &quot;sourceFieldName&quot;: &quot;RowKey&quot;,
      &quot;targetFieldName&quot;: &quot;UniqueIdentifier&quot;,
      &quot;mappingFunction&quot;: null
    }
  ],
  &quot;disabled&quot;: null
}

</pre>
<p>That is the RowKey UniqueIdentifier mapping function. That is how Azure Search will map the records from table storage to documents inside the index.</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/11/10/azure-search-index-with-2-datasources/">Azure Search Index with 2 datasources</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2017/11/10/azure-search-index-with-2-datasources/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Azure Blob Storage Metadata 400 Bad Request</title>
		<link>https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/</link>
					<comments>https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Fri, 10 Nov 2017 13:52:28 +0000</pubDate>
				<category><![CDATA[Storage]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/ricardocosta/?p=1864</guid>

					<description><![CDATA[<p>I was getting a 400 Bad Request when inserting blobs in Azure Blob Storage because I was setting metadata with non-ASCII characters. // Retrieve storage account from connection string. CloudStorageAccount storageAccount = CloudStorageAccount.Parse( CloudConfigurationManager.GetSetting(&#34;StorageConnectionString&#34;)); // Create the blob client. CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); // Retrieve a reference to a container. CloudBlobContainer container = blobClient.GetContainerReference(&#34;mycontainer&#34;); // Create [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/">Azure Blob Storage Metadata 400 Bad Request</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I was getting a 400 Bad Request when inserting blobs in Azure Blob Storage because I was setting metadata with non-ASCII characters.</p>
<pre class="brush: csharp; highlight: [15]; title: ; notranslate">

// Retrieve storage account from connection string.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting(&quot;StorageConnectionString&quot;));

// Create the blob client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();

// Retrieve a reference to a container.
CloudBlobContainer container = blobClient.GetContainerReference(&quot;mycontainer&quot;);

// Create the container if it doesn't already exist.
container.CreateIfNotExists();

// Add some metadata to the container.
container.Metadata.Add(&quot;docType&quot;, &quot;textDocuments&quot;);

</pre>
<p>According to Microsfot documentation:</p>
<p><em>&#8220;You will receive a 400 Bad Request if any name/value pairs contain non-ASCII characters. Metadata name/value pairs are valid HTTP headers, and so must adhere to all restrictions governing HTTP headers. It is therefore recommended that you use URL encoding or Base64 encoding for names and values containing non-ASCII characters.&#8221;</em></p>
<p><a href="https://docs.microsoft.com/en-us/azure/storage/blobs/storage-properties-metadata">https://docs.microsoft.com/en-us/azure/storage/blobs/storage-properties-metadata</a></p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/">Azure Blob Storage Metadata 400 Bad Request</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using KeywordQuery with CSOM SharePoint Online</title>
		<link>https://blogit.create.pt/ricardocosta/2017/10/25/using-keywordquery-with-csom-sharepoint-online/</link>
					<comments>https://blogit.create.pt/ricardocosta/2017/10/25/using-keywordquery-with-csom-sharepoint-online/#comments</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Wed, 25 Oct 2017 14:27:12 +0000</pubDate>
				<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[CSOM]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/ricardocosta/?p=1744</guid>

					<description><![CDATA[<p>string username = &#34;***********&#34;; string pwd = &#34;*********&#34;; string siteURL = &#34;**********&#34;; ClientContext context = new ClientContext(siteURL); Web web = context.Web; SecureString pass = new SecureString(); foreach (char c in pwd.ToCharArray()) pass.AppendChar(c); context.Credentials = new SharePointOnlineCredentials(username, passWord); try { KeywordQuery query = new KeywordQuery(context); query.QueryText = &#34;ContentType:Factura AND PrecoOWSCURR&#62;10000&#34;; query.RowLimit = 10; query.RowsPerPage = 10; [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/10/25/using-keywordquery-with-csom-sharepoint-online/">Using KeywordQuery with CSOM SharePoint Online</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<pre class="brush: csharp; title: ; notranslate">

string username = &quot;***********&quot;;
string pwd = &quot;*********&quot;;
string siteURL = &quot;**********&quot;;

ClientContext context = new ClientContext(siteURL);
Web web = context.Web;
SecureString pass = new SecureString();
foreach (char c in pwd.ToCharArray()) pass.AppendChar(c);
context.Credentials = new SharePointOnlineCredentials(username, passWord);
try
{
    KeywordQuery query = new KeywordQuery(context);
    query.QueryText = &quot;ContentType:Factura AND PrecoOWSCURR&gt;10000&quot;;
    
    query.RowLimit = 10;
    query.RowsPerPage = 10;
    SearchExecutor search = new SearchExecutor(context);
    ClientResult&lt;ResultTableCollection&gt; results = search.ExecuteQuery(query);
    context.ExecuteQuery();

    foreach (var resultRow in results.Value&#x5B;0].ResultRows)
    {
        Console.WriteLine(&quot;{0}&quot;, resultRow&#x5B;&quot;Title&quot;]);
    }
}
catch (Exception e)
{
    Console.WriteLine(e.ToString());
    Console.ReadKey();
}

</pre>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/10/25/using-keywordquery-with-csom-sharepoint-online/">Using KeywordQuery with CSOM SharePoint Online</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2017/10/25/using-keywordquery-with-csom-sharepoint-online/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Move modules &#8211; Remove IPP &#8211; OutSystems</title>
		<link>https://blogit.create.pt/ricardocosta/2017/08/01/move-modules-remove-ipp-outsystems/</link>
					<comments>https://blogit.create.pt/ricardocosta/2017/08/01/move-modules-remove-ipp-outsystems/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Tue, 01 Aug 2017 13:02:46 +0000</pubDate>
				<category><![CDATA[OutSystems]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/ricardocosta/?p=1584</guid>

					<description><![CDATA[<p>I needed to move some modules from one infrastructure to another so first I needed to remove IPP  (Intellectual Property Protection). 1 &#8211; In Service Studio, open your module and goto Module -&#62; Export -&#62; Save As&#8230; 2 &#8211; Navigate to Intellectual Property Protection (IPP) Rights Validation Here you need to enter your email, the destination [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/08/01/move-modules-remove-ipp-outsystems/">Move modules &#8211; Remove IPP &#8211; OutSystems</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I needed to move some modules from one infrastructure to another so first I needed to remove <a href="https://www.outsystems.com/IPP/" target="_blank" rel="noopener">IPP </a> (Intellectual Property Protection).</p>
<p>1 &#8211; In Service Studio, open your module and goto Module -&gt; Export -&gt; Save As&#8230;</p>
<p><figure id="attachment_1594" aria-describedby="caption-attachment-1594" style="width: 721px" class="wp-caption alignnone"><a href="http://blogit-create.com/wp-content/uploads/2017/08/saveOML.png"><img decoding="async" class="wp-image-1594 size-full" title="Export OML" src="http://blogit-create.com/wp-content/uploads/2017/08/saveOML.png" alt="Export" width="721" height="559" srcset="https://blogit.create.pt/wp-content/uploads/2017/08/saveOML.png 721w, https://blogit.create.pt/wp-content/uploads/2017/08/saveOML-300x233.png 300w, https://blogit.create.pt/wp-content/uploads/2017/08/saveOML-696x540.png 696w, https://blogit.create.pt/wp-content/uploads/2017/08/saveOML-542x420.png 542w" sizes="(max-width: 721px) 100vw, 721px" /></a><figcaption id="caption-attachment-1594" class="wp-caption-text">Export OML</figcaption></figure></p>
<p>2 &#8211; Navigate to <a href="https://www.outsystems.com/homeipp/ipp_page.aspx" target="_blank" rel="noopener">Intellectual Property Protection (IPP) Rights Validation</a></p>
<p>Here you need to enter your email, the destination activation code for your target infrastructure, and upload your OML</p>
<p><figure id="attachment_1614" aria-describedby="caption-attachment-1614" style="width: 848px" class="wp-caption alignnone"><a href="http://blogit-create.com/wp-content/uploads/2017/08/IPP.png"><img decoding="async" class="wp-image-1614 size-full" title="IPP Validation" src="http://blogit-create.com/wp-content/uploads/2017/08/IPP.png" alt="" width="848" height="391" srcset="https://blogit.create.pt/wp-content/uploads/2017/08/IPP.png 848w, https://blogit.create.pt/wp-content/uploads/2017/08/IPP-300x138.png 300w, https://blogit.create.pt/wp-content/uploads/2017/08/IPP-768x354.png 768w, https://blogit.create.pt/wp-content/uploads/2017/08/IPP-696x321.png 696w" sizes="(max-width: 848px) 100vw, 848px" /></a><figcaption id="caption-attachment-1614" class="wp-caption-text">IPP Validation</figcaption></figure></p>
<p>3 &#8211; You will receive an email with the OML file without IPP protection. Download the file.</p>
<p>4 &#8211; In Service Studio goto Module -&gt; Open File&#8230;</p>
<p><figure id="attachment_1624" aria-describedby="caption-attachment-1624" style="width: 283px" class="wp-caption alignnone"><a href="http://blogit-create.com/wp-content/uploads/2017/08/open-OML.png"><img decoding="async" class="wp-image-1624 size-full" title="Open module" src="http://blogit-create.com/wp-content/uploads/2017/08/open-OML.png" alt="" width="283" height="92" /></a><figcaption id="caption-attachment-1624" class="wp-caption-text">Open module</figcaption></figure></p>
<p>5 &#8211; Publish your module</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/08/01/move-modules-remove-ipp-outsystems/">Move modules &#8211; Remove IPP &#8211; OutSystems</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2017/08/01/move-modules-remove-ipp-outsystems/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
