logo elektroda
logo elektroda
X
logo elektroda

OpenBeken setup for hot air testing - MAX6675, logging temperature and power via HTTP

p.kaczmarek2 1893 0

TL;DR

  • A hot-air testing setup uses two OpenBeken devices: a WB3S board with MAX6675 temperature sensing and a Mycket Smart Outdoor Socket PE-01E for power monitoring.
  • Both devices run stock OpenBeken scripts that send readings to a custom HTTP server with SendGET, so no hardcoding or firmware changes were needed.
  • The MAX6675 is wired to three GPIOs with `startDriver MAX6675 24 26 6 1`, and both scripts loop every 0.5 seconds.
  • The logging script saves any GET parameters plus a timestamp, which produced temperature and power graphs for 350c and 450c tests.
  • A limitation is that the saved time is reception time, not measurement time, so the data needs postprocessing to remove duplicates and merge entries.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • Type K thermocouple with MAX6675 A/D converter module on a breadboard.
    Here I will show my setup for testing hot air stations - two OpenBeken devices, first used to measure hot air temperature with MAX6675, and second used to measure power - both reporting measurements to my HTTP server, so I can use them for futher processing. Of course, my setup was made on stock OpenBeken with no hardcoding - all reporting is done by scripts. So, let's see how I scripted them.

    First device - my WB3S dev board - MAX6675 temperature measurement
    MAX6675 can measure very high temperatures and is actually very easy to use - it can be attached to any three GPIOs. MAX6675 is using SPI protocol, but in this case SPI transaction is very simple and requires only reading just a single 16-bit word.
    K-type thermocouple with MAX6675 A/D converter module, kit.
    So, in this case, any OBK device could be easily used.
    Here is a screenshot from my panel, and I know, it's very messy, most of the stuff is not related to this project:
    Screenshot of the BK7231T_FourRelays user panel.
    The more important part is in autoexec.bat in LittleFS, see here how to make one:



    Here is my script:
    
    startDriver MAX6675 24 26 6 1
    
    again:
    
    SendGET http://192.168.0.169:8002/log.php?temperature=$CH1
    delay_s 0.5
    
    goto again
    

    Let's break down what happens here:
    - first you have MAX6675 init and pins setup, the syntax is:
    
    MAX6675 CS CLK MISO targetChannel
    

    - then you have a loop, every 0.5s the temperature is sent (to be more precise, channel 1 value) to my custom HTTP server, where a log.php script processes it futher

    Second device - Mycket Power Metering Socket - power measurement
    Here is some information on the second device I used:
    Mycket Smart Outdoor Socket PE-01E IP44 with energy measurement
    Screenshot of the OBK delay script panel with measurement data.
    However, any power-measuring socket should be good for this purpose.
    My script here is sending voltage/current/power measurements to my script every 0.5 seconds:
    
    again:
    
    SendGET http://192.168.0.169:8002/log.php?voltage=$voltage¤t=$current&power=$power
    delay_s 0.5
    
    goto again
    


    My logging script
    My logging script is actually pretty smart - it does not have any hardcoded variable names, it just saves what was received via GET. Futhermore, a timestamp is added:
    https://github.com/openshwprojects/hotair/blob/main/log.php
    The following solution may not be perfect in some cases, for example because the saved time is the time when measurement was received and not the time when it was taken, so there may be some small discrepancies, but they are acceptable for my project.

    The following setup allowed me to create those graphs:
    https://openshwprojects.github.io/hotair/350c.html
    https://openshwprojects.github.io/hotair/450c.html
    Of course, the measurements required some futher postprocessing (removing double entries and merging) but it's out of the scope of this topic.
    Futhermore, it would be obviously possible to merge my two scripts into one single device and connect MAX6675 to the power metering socket itself, but I didn't want to open the Mycket case again. Anyway, that's all for now. So far, I've used my setup to test 8 hot air stations, so stay tuned for more! Let me know if you have any questions or suggestions.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14406 posts with rating 12345, helped 650 times. Been with us since 2014 year.
  • ADVERTISEMENT
📢 Listen (AI):

FAQ

TL;DR: This setup logs 2 data streams every 0.5 s and shows that "all reporting is done by scripts" on stock OpenBeken. It helps hot air station testers capture MAX6675 temperature plus socket power data over HTTP, then graph the results without hardcoded firmware changes. [#21088764]

Why it matters: It gives you a low-friction way to measure heat and electrical load together during repeatable hot air station tests.

Approach Devices Measured data Script interval Practical note
Two-device setup 2 Temperature + voltage/current/power 0.5 s Used in the thread and already working
One combined device 1 Temperature + power on one unit 0.5 s possible Possible, but not built because reopening the socket case was avoided

Key insight: Stock OpenBeken already supports this workflow with scripts alone. You can read MAX6675 on any OBK device, push values by HTTP GET, and post-process the logs later.

Quick Facts

  • MAX6675 in this setup uses 3 GPIOs and a simple SPI read of one 16-bit word, so the sensor can be attached to many OpenBeken devices. [#21088764]
  • The temperature logger sends CH1 to a custom HTTP server every 0.5 s with SendGET, using startDriver MAX6675 24 26 6 1. [#21088764]
  • The power logger sends voltage, current, and power every 0.5 s from a smart socket to the same log.php endpoint. [#21088764]
  • The PHP logger adds a timestamp on receipt, which can create small timing differences versus the exact measurement moment. [#21088764]
  • The setup has already been used to test 8 hot air stations, and example graph outputs include 350°C and 450°C runs after post-processing. [#21088764]

How do I set up an OpenBeken device to read a MAX6675 thermocouple sensor and log the temperature over HTTP?

Set up the MAX6675 driver, then loop an HTTP GET that sends CH1 every 0.5 seconds. 1. Put startDriver MAX6675 24 26 6 1 in autoexec.bat on LittleFS. 2. Add a loop with SendGET http://<server>/log.php?temperature=$CH1. 3. Add delay_s 0.5 and goto again for continuous logging. This uses stock OpenBeken with no hardcoded firmware changes. [#21088764]

What is the MAX6675, and how does it measure high temperatures in a hot air station test setup?

"MAX6675" is a thermocouple interface chip that measures high temperature, uses a very simple SPI transaction, and in this setup reads one 16-bit word through three GPIO pins. The thread uses it to capture hot air temperature from a station under test and publish the result as channel CH1 over HTTP. [#21088764]

What is LittleFS in OpenBeken, and how is autoexec.bat used to run logging scripts automatically?

"LittleFS" is the file storage used by OpenBeken that keeps script files on the device, including startup automation files such as autoexec.bat, which run commands automatically after boot. In this setup, autoexec.bat starts the MAX6675 driver and launches a loop that sends measurements every 0.5 seconds. [#21088764]

How does the OpenBeken command "startDriver MAX6675 24 26 6 1" map the CS, CLK, MISO pins and target channel?

It maps the MAX6675 as CS=24, CLK=26, MISO=6, and stores the result in target channel 1. The thread gives the syntax directly as MAX6675 CS CLK MISO targetChannel, so CH1 becomes the value sent later as $CH1 to the HTTP logger. [#21088764]

What is the best way to send OpenBeken measurements like temperature, voltage, current, and power to a custom HTTP server every 0.5 seconds?

Use a short OpenBeken script loop with SendGET, delay_s 0.5, and goto again. The thread sends temperature as temperature=$CH1 on one device and sends voltage=$voltage, current=$current, and power=$power from a power-metering socket on the other, both to the same log.php endpoint. [#21088764]

Why might HTTP log timestamps differ slightly from the actual measurement time in an OpenBeken-based logger?

The timestamps can differ because the PHP logger records when the server receives the HTTP GET, not when the device took the sample. The thread calls this acceptable for the project, but it still introduces small discrepancies, especially when two devices send separate streams every 0.5 seconds. [#21088764]

How do I write a generic PHP log.php script that stores any GET parameters from OpenBeken without hardcoded variable names?

Write log.php so it saves whatever keys arrive in the GET request and adds a timestamp. The thread states that the logger has no hardcoded variable names and simply stores received GET data, which lets the same endpoint accept temperature, voltage, current, and power from different OpenBeken devices. [#21088764]

What post-processing steps are useful for cleaning OpenBeken measurement logs, such as removing double entries and merging data streams?

Remove duplicate rows and merge the separate logs into one aligned dataset. The thread says both steps were needed before generating the published graphs, because temperature and power came from two devices and the raw records required further processing outside the OpenBeken scripts. [#21088764]

How can I combine MAX6675 temperature sensing and power metering into a single OpenBeken device instead of using two separate devices?

You can combine them by connecting the MAX6675 directly to the power-metering socket’s OpenBeken hardware and sending one unified HTTP log stream. The thread says this was clearly possible, but it was not done because reopening the Mycket socket case again was intentionally avoided. [#21088764]

OpenBeken with two devices vs one combined device: which approach is better for hot air station temperature and power logging?

The two-device approach is better if you want a working setup quickly without hardware rework. It already logged temperature plus voltage, current, and power every 0.5 seconds. A one-device build is simpler logically, but the thread chose two devices to avoid opening the Mycket case again. [#21088764]

Which OpenBeken-compatible boards can be used with a MAX6675 if I do not have a WB3S dev board?

Any OpenBeken device can be used if it gives you three usable GPIOs. The thread says MAX6675 can attach to any three GPIOs and uses a simple SPI read, so the WB3S dev board was only the author’s example, not a requirement. [#21088764]

How should I troubleshoot an OpenBeken MAX6675 setup when the reported temperature value on CH1 looks wrong or does not update?

First check the driver line, pin order, and whether CH1 is the channel you send over HTTP. The thread shows the exact format MAX6675 CS CLK MISO targetChannel, so a wrong mapping such as swapped CLK and MISO or sending the wrong channel would break updates. Also confirm your loop still runs every 0.5 seconds and reaches SendGET. [#21088764]

What is the Mycket Smart Outdoor Socket PE-01E, and how does it expose voltage, current, and power readings in OpenBeken?

It is the power-metering socket used as the second OpenBeken device in this setup. The thread uses it to expose voltage, current, and power variables, then sends those values to log.php every 0.5 seconds with a simple script loop. [#21088764]

What safety precautions matter when measuring mains power and hot air temperature at the same time with a smart socket and thermocouple setup?

The thread’s clearest precaution is to avoid unnecessary hardware reopening when the setup already works. It explicitly says a combined build was possible but rejected because reopening the Mycket socket case again was undesirable. Using two separate OpenBeken devices therefore reduced extra handling of the mains-powered socket during this project. [#21088764]

How can I turn OpenBeken HTTP logs from a hot air station test into graphs like the 350C and 450C examples?

Log both streams to HTTP, clean the records, and then plot the merged data. The thread reports two published graph examples, 350c.html and 450c.html, and says they required post-processing to remove double entries and merge measurements before final visualization. As one concise takeaway, “all reporting is done by scripts.” [#21088764]
Generated by the language model.
ADVERTISEMENT