• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
case NodeMCU 3D Printer File Image 1
case NodeMCU 3D Printer File Image 2
case NodeMCU 3D Printer File Image 3
case NodeMCU 3D Printer File Image 4
case NodeMCU 3D Printer File Image 5
case NodeMCU 3D Printer File Image 6
case NodeMCU 3D Printer File Image 7
case NodeMCU 3D Printer File Image 8
case NodeMCU 3D Printer File Image 9
case NodeMCU 3D Printer File Image 10
case NodeMCU 3D Printer File Thumbnail 1
case NodeMCU 3D Printer File Thumbnail 2
case NodeMCU 3D Printer File Thumbnail 3
case NodeMCU 3D Printer File Thumbnail 4
case NodeMCU 3D Printer File Thumbnail 5
case NodeMCU 3D Printer File Thumbnail 6
case NodeMCU 3D Printer File Thumbnail 7
case NodeMCU 3D Printer File Thumbnail 8
case NodeMCU 3D Printer File Thumbnail 9
case NodeMCU 3D Printer File Thumbnail 10

case NodeMCU

tomas avatartomas

July 21, 2024

printables-icon
DescriptionCommentsTags

Description

This project contains a box to hide the nodeMCU esp8266 together with a 0.96" oled display. The box is then connected to an external usb power supply that is on the nodeMCU board.

First, the nodeMCU board is slid into the bottom box on four sticks, attached with a melt gun, and then the display is attached to the lid using a melt gun. The lid is slid onto the box. The box can be attached anywhere using double-sided adhesive tape. The lid can be removed from the box at any time.

If you want to use this case as it is in the photo to display PV data from a Solax inverter, you can download the source code below. You will need Home assistant and the ESPHome add-on installed for this. You can also use the icons, which are also downloadable.

esphome:
  name: photovoltaics
  friendly_name: photovoltaics

esp8266:
  board: nodemcuv2

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "yourkey"

ota:
  platform: esphome
  password: "yourpassword"
#  num_attempts: 3
#  safe_mode: no

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Photovoltaics  Fallback Hotspot"
    password: "password"
 
#switch:
#  - platform: gpio
#    pin: D4 #interni led
#    inverted: True
#    name: "NodeMCU internal LED"
#    id: internal_led

time:
  - platform: homeassistant
    id: homeassistant_time      
    timezone: Europe/Prague

image:      # The folder for images is (create) on HA in \config\esphome\_icons
  - file: "_icons/pv.png"
    id: imgPV
  - file: "_icons/bat.png"
    id: imgBat
  - file: "_icons/grid.png"
    id: imgGrid
  - file: "_icons/house.png"
    id: imgDum

sensor:
  - platform: homeassistant
    id: fve_production
    entity_id: sensor.solax_pv_power_total
    internal: true

  - platform: homeassistant
    id: fve_consumption
    entity_id: sensor.solax_house_load
    internal: true

  - platform: homeassistant
    id: fve_battery
    entity_id: sensor.solax_battery_power_charge
    internal: true

  - platform: homeassistant
    id: fve_battery_soc
    entity_id: sensor.solax_battery_capacity
    internal: true

  - platform: homeassistant
    id: fve_grid
    entity_id: sensor.solax_grid_import
    internal: true

font:
  - file: 'arial.ttf'
    id: font1
    size: 13

  - file: 'arial.ttf'
    id: font2
    size: 12

i2c:
   sda: D2
   scl: D1
   scan: false

display:
  - platform: ssd1306_i2c
    model: SSD1306_128X64
    address: 0x3C
    id: my_display
    lambda: |-
      it.image(0, 2, id(imgPV));
      if (id(fve_production).state <= 999) {
        it.printf(15, 0, id(font1), TextAlign::TOP_LEFT, "%.0f W", id(fve_production).state);  
      } else {
        it.printf(15, 0, id(font1), TextAlign::TOP_LEFT, "%.2f kW", id(fve_production).state/1000);  
      }

      it.image(0, 19, id(imgDum));
      if (id(fve_consumption).state <= 999) {
        it.printf(15, 33, id(font1), TextAlign::BOTTOM_LEFT, "%.0f W", id(fve_consumption).state); 
      } else {
        it.printf(15, 33, id(font1), TextAlign::BOTTOM_LEFT, "%.2f kW", id(fve_consumption).state/1000);  
      }  

      it.image(0, 35, id(imgGrid));
      if (id(fve_grid).state <= 999) {
        it.printf(15, 49, id(font1), TextAlign::BOTTOM_LEFT, "%.0f W", id(fve_grid).state);
      } else {
        it.printf(15, 49, id(font1), TextAlign::BOTTOM_LEFT, "%.2f kW", id(fve_grid).state/1000);
      }  

      it.strftime(0, 51, id(font1), "  %d.%m.%Y   %H:%M", id(homeassistant_time).now());

      it.image(116, 2, id(imgBat));
      it.printf(115, 0, id(font1), TextAlign::TOP_RIGHT, "%.0f%%", id(fve_battery_soc).state);

      it.image(116, 19, id(imgBat));
      if ((id(fve_consumption).state) >= 0) {
        if ((id(fve_consumption).state) <= 999) {
          it.printf(115, 19, id(font2), TextAlign::TOP_RIGHT, "%.0f W", id(fve_battery).state);
        } else {
          it.printf(115, 19, id(font2), TextAlign::TOP_RIGHT, "%.2fkW", id(fve_battery).state/1000);
        }  
      } else {
        if ((id(fve_consumption).state) >= -999) {
          it.printf(115, 19, id(font2), TextAlign::TOP_RIGHT, "-%.0f W", id(fve_battery).state);
        } else {
          it.printf(115, 19, id(font2), TextAlign::TOP_RIGHT, "-%.2fkW", id(fve_battery).state/1000);
        }  
      }
captive_portal:    

License:

Creative Commons — Public Domain

Related Models

Thor Mjolnir Hammer Bic Pen preview image

Thor Mjolnir Hammer Bic Pen

effektz profile image

effektz

9,085

Diverse Schilder / various labels  for hobby & makers preview image

Diverse Schilder / various labels for hobby & makers

RPK profile image

RPK

2

Customizable EU License Plate Keychain preview image

Customizable EU License Plate Keychain

John_M profile image

John_M

34

Vorpal The Hexapod Walking Robot preview image

Vorpal The Hexapod Walking Robot

vorpal profile image

vorpal

4,982

MakerZ – Open Source 1/28 RC Drift Chassis by Fails & Makes | Açık Kaynak 1/28 RC Drift Şasisi preview image

MakerZ – Open Source 1/28 RC Drift Chassis by Fails & Makes | Açık Kaynak 1/28 RC Drift Şasisi

Fails&Makes profile image

Fails&Makes

Cacciavite Portachiavi - Scewdriver keychain preview image

Cacciavite Portachiavi - Scewdriver keychain

Butti Maker Studio profile image

Butti Maker Studio

22

Snap-Together Mini Minecraft Jack-O-Lantern with integrated LED preview image

Snap-Together Mini Minecraft Jack-O-Lantern with integrated LED

scottrlindsey profile image

scottrlindsey

4,448

Small Parts Storage Drawers - Organizer preview image

Small Parts Storage Drawers - Organizer

GT 3D Makers profile image

GT 3D Makers

29

8