Difference between revisions of "ESP8266-DS18S20"

From Hackerspace ACKspace
Jump to: navigation, search
(added category)
m (fixed wiki link)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Marked as outdated|The system-to-be-installed uses Tasmota firmware combined with an [[MQTT]] script}}
 
{{Project
 
{{Project
 +
|Featured=No
 
|State=Completed
 
|State=Completed
 
|Members=xopr
 
|Members=xopr
 
|Description=Creating a wireless SpaceAPI-like sensor
 
|Description=Creating a wireless SpaceAPI-like sensor
 +
|Picture=ESP8166-DS18S20-PCB.png
 
}}
 
}}
  
This code is deprecated and had been replaced by the [[SpaceAPI#new_version|new SpaceAPI's]] space state
+
This code is '''deprecated''' and had been replaced by the [[SpaceAPI#the_firmware|new SpaceAPI's]] space state
  
 
Also, the code is somewhat ugly, but it worked..
 
Also, the code is somewhat ugly, but it worked..
[[Image:ESP8166-DS18S20-PCB.png|right|350px|thumb|the PCB that powers the ESP8266]]
 
  
 
=== synopsis ===
 
=== synopsis ===
Line 38: Line 40:
  
 
=== code ===
 
=== code ===
<pre>
+
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-ESP8266-DS18S20_ino">
 +
==== ESP8266-DS18S20.ino ====
 +
<div class="mw-customtoggle-ESP8266-DS18S20_ino mw-code">Click here to view the source code</div>
 +
<pre class="mw-collapsible-content">
 
/*
 
/*
 
   2015-07-04: Created by xopr
 
   2015-07-04: Created by xopr
Line 260: Line 265:
 
}
 
}
 
</pre>
 
</pre>
 +
</div>
  
[[Category:ESP8266]]
+
[[Category:ESP8266]][[Category:SpaceAPI]][[Category:Network]]
[[Category:SpaceAPI]]
 

Latest revision as of 17:37, 19 May 2022


Marked as outdated
The system-to-be-installed uses Tasmota firmware combined with an MQTT script


Project: ESP8266-DS18S20
Featured: No
State Completed
Members xopr
GitHub No GitHub project defined. Add your project here.
Description Creating a wireless SpaceAPI-like sensor
Picture
ESP8166-DS18S20-PCB.png


This code is deprecated and had been replaced by the new SpaceAPI's space state

Also, the code is somewhat ugly, but it worked..

synopsis

This sketch provides a webserver-like interface and provides a json file (somewhat compatible with SpaceAPI).

The json will provide the DS18S20 temperature sensor's address and temperature in °C, and will look like:

{
  "sensors":{
    "ext_temp_count":2,
    "temperature":[
      {
        "ext_index":0,
        "value":-127.0,
        "unit":"°C",
        "ext_address":"00112233445566"
      },
      {
        "ext_index":0,
        "value":85.0,
        "unit":"°C",
        "ext_address":"99AABBCCDDEEFF"
      }
    ]
  }
}

Note: the ext_temp_count and ext_index fields are only visible in debug mode (GPIO0 pulled to ground)

code

ESP8266-DS18S20.ino

Click here to view the source code