User Tools

Site Tools


user:jan001:intro_iot_tasmota_nig

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:jan001:intro_iot_tasmota_nig [2021/10/11 12:36] jan001user:jan001:intro_iot_tasmota_nig [2023/03/28 15:21] (current) – [Doing stuff] rolf.becker
Line 64: Line 64:
 Allons-y! Allons-y!
  
 +==== DS18B20 Pinout ====
 +
 +  * Cable VErsion: red -> 3.3V , blue -> GND , yellow -> data (1wire protocol)
 +  * Breakout board version: "+" -> 3.3V , "-" -> GND, out -> data 
 ==== Breadboard prepartion ==== ==== Breadboard prepartion ====
 So get all your stuff together and build up the breadboard. Here is the schematic. If your Programmer has male headers, you can plug it directly into the breadboard. {{ :user:jan001:intro-iot_bb.png?600 |}} So get all your stuff together and build up the breadboard. Here is the schematic. If your Programmer has male headers, you can plug it directly into the breadboard. {{ :user:jan001:intro-iot_bb.png?600 |}}
 +
 +<WRAP center round alert 60%>
 +\\
 +The data line of the 1Wire bus (blue) \\ is not connected correctly in the diagram above! 
 +</WRAP>
  
 ==== Installing the Tasmotizer ==== ==== Installing the Tasmotizer ====
Line 142: Line 151:
 ==== Making a graph ==== ==== Making a graph ====
  
-I hope yall have read the article and followed the steps there. You are going to need it.+I hope yall have read the article and followed the steps for setting up your NIG. You are going to need it.
  
 === Node-Red === === Node-Red ===
Line 150: Line 159:
 return { payload: temperature }; return { payload: temperature };
 </code> </code>
-First we create a value ''%%temperature%%''. The messages between all the nodes in Node-Red have the raw values in a key called payload. So we access+First we create a value ''%%temperature%%''. The messages between all the nodes in Node-Red have the raw values in a key called ''%%payload%%''. So we access the message with ''%%msg%%'' then in this JSON object we access the object called ''%%payload%%''. This has the message in it we found earlier in the console. So we can access the object ''%%DS18B20%%'' and last the key ''%%Temperature%%'' to get the sensor value. We then pack everything in our own little message object with just the raw number value as a payload. This will be returned, so send to the next node. 
 +The last node we need is the ''%%influxdb out%%''-node. Attach this to the output of the function node. Here you just need to select your influxdb and give the measurement a name that is easily distinguishable. I choose ''%%lab_temperature%%''. You can now deploy your flow by selecting ''%%Deploy%%''. Your flow should look something like this:
  
 +{{ :user:jan001:screenshot_from_2021-10-11_12-48-19.png?600 |}}
  
 +=== Grafana ===
 +We are nearly finished! Let's open up Grafana. Start with creating a new dashboard by hovering over "plus"-icon on the left side of the screen and select ''%%Dashboard%%''. Add a new panel. In the query-part select under ''%%FROM -> select measurement%%'' the value name you gave the measurement in Node-Red. Under ''%%SELECT%%'' remove ''%%mean()%%'' and put in ''%%distinct%%'', so you get a nice line graph. We can now do some more advanced stuff. We know that the lab temperature will always be in a range from 0 to 40 degrees. When we open up the tab ''%%Axes%%'' on the right side, we can set for ''%%Left Y%%'' (so the left Y-axis) the ''%%Y-Min%%'' to 0 and the ''%%Y-Max%%'' to 40. You can also change the name of the graph under ''%%Settings%%''-tab. Click ''%%Save%%'' and ''%%Apply%%'' if you are finished and that's it. Look at your nice little graph!
  
 +{{ :user:jan001:screenshot_from_2021-10-11_13-26-49.png?600 | Graph}}
  
 +I hope you learned something today! 
  
 ===== References ===== ===== References =====
Line 161: Line 176:
   - [[https://github.com/tasmota/tasmotizer|Tasmotizer - Jacek Ziółkowski - 2019]]   - [[https://github.com/tasmota/tasmotizer|Tasmotizer - Jacek Ziółkowski - 2019]]
   - [[https://tasmota.github.io/docs/|Tasmota Community]]   - [[https://tasmota.github.io/docs/|Tasmota Community]]
 +  - [[https://www.sensatio.io/sensors/dallas-ds18b20|Dallas DS18B20]]
user/jan001/intro_iot_tasmota_nig.1633948574.txt.gz · Last modified: 2021/10/11 12:36 by jan001