Difference between revisions of "ESP8266-DS18S20"

From Hackerspace ACKspace
Jump to: navigation, search
m (made code block collapsible)
m (fixed wiki link)
 
(4 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 265: Line 267:
 
</div>
 
</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