HeaterMeter Monitor and ESP8266/ESP32 Streaming Library


 

KeithC

TVWBB Member
is there a back cover somewhere I'm missing for these? it's not on the thingiverse page or the scad...
 

GSpinelli

TVWBB Member
Does your model actually need lcd_ex_offset at all? The reason I use lcd_window_offset to expand the size of the case is because I want all the spacings to be the same (EDIT: or at least the outer sides), but your model doesn't have that symmetry. Looks like I can remove lcd_ex_offset from your design without compromising the design at all right?
Admittedly, my changes were a "screw with it till it looks right" exercise and was not exactly sure the intent behind some of the variables. The issue I was running into was the the lcd_window_offset needed to be negative which was causing weird things to happen. Rather than try to figure out how to fix that, I just used a different variable. There may be a better solution.
 

GSpinelli

TVWBB Member
is there a back cover somewhere I'm missing for these? it's not on the thingiverse page or the scad...
It appears to be commented out in the SCAD as "lid()". You can turn it on by uncommenting it. I did not try to print a lid so cannot confirm if it comes out correctly.
 

KeithC

TVWBB Member
It appears to be commented out in the SCAD as "lid()". You can turn it on by uncommenting it. I did not try to print a lid so cannot confirm if it comes out correctly.
ok, thanks for the info! I ordered the same displays you did and NONE of them are marked with which color they are on the back! So trying to figure out how to light these up to check color...
 

Bryan Mayland

TVWBB Hall of Fame
Yeah I haven't tried printing the lid at all, which is why it is commented out. It may fit or it may have the bevels facing the wrong way or it might be too big or too small. I considered adding feet to it as well that slide on so it isn't so tippy but it stood up well enough I didn't finish it. I also anticipated having to get into it more times to troubleshoot, but it just worked right out of the gate.

All my LED displays weren't marked either, so I put them in randomly. I had bought 3x green for the food probes (thinking those would be easiest to read), one red for the pit probe, and then one in every other color just to see how they looked. I really like the white and blue though so I'd go with those if I were building from scratch. The secret to figuring out what color they are without plugging them in is to look at the model number on the side of the LED module itself. One of the last letters is the color code (second to last on my 0.56").

I've pushed new a HeaterMeterClient with support for pidint (onPidInt), and the values are in state.Output.Internals P, I, D, and dT and LastUpdate (millis timer when it was received). There's also a new state.UpdateUtc which contains the UTC UNIX timestamp of the data coming from the HeaterMeter's clock. Use the standard localtime() function to convert that to a parsed time. The onHmStatus and onPidInt callbacks are now deferred so there's more RAM available to you when you're called. Finally I've made sure it is compatible with ESP32.
 

KeithC

TVWBB Member
can someone please help me before I lose it? I can't get either board to flash...

Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 269048 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27385 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1528 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 1276 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 27448 ) - zeroed variables (global, static) in RAM/HEAP
Sketch uses 299237 bytes (28%) of program storage space. Maximum is 1044464 bytes.
Global variables use 30252 bytes (36%) of dynamic memory, leaving 51668 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port /dev/cu.usbserial-5D10
Connecting...Traceback (most recent call last):
File "/Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/tools/upload.py", line 66, in <module>
esptool.main(cmdline)
File "/Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/tools/esptool/esptool.py", line 3565, in main
print("Chip is %s" % (esp.get_chip_description()))
File "/Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/tools/esptool/esptool.py", line 1134, in get_chip_description
efuses = self.get_efuses()
File "/Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/tools/esptool/esptool.py", line 1127, in get_efuses
result = self.read_reg(0x3ff0005c) << 96
File "/Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/tools/esptool/esptool.py", line 564, in read_reg
raise FatalError.WithResult("Failed to read register address %08x" % addr, data)
esptool.FatalError: Failed to read register address 3ff0005c (result was 0105)
esptool.FatalError: Failed to read register address 3ff0005c (result was 0105)
 

KeithC

TVWBB Member
tried your updated heatermeterclient files and all I get is a compiler error:

Arduino: 1.8.13 (Mac OS X), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 460800"

In file included from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantContent.hpp:11,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantSlot.hpp:11,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Memory/MemoryPool.hpp:10,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantData.hpp:7,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/SlotFunctions.hpp:8,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Array/ArrayIterator.hpp:7,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Array/ArrayRef.hpp:8,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson.hpp:17,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson.h:9,
from sketch/HeaterMeterClient.h:11,
from sketch/HeaterMeterClient.cpp:1:
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantAs.hpp: In instantiation of 'typename ArduinoJson6173_91::enable_if<(ArduinoJson6173_91::is_integral<T>::value && (! ArduinoJson6173_91::is_same<bool, T>::value)), T>::type ArduinoJson6173_91::variantAs(const ArduinoJson6173_91::VariantData*) [with T = long long int; typename ArduinoJson6173_91::enable_if<(ArduinoJson6173_91::is_integral<T>::value && (! ArduinoJson6173_91::is_same<bool, T>::value)), T>::type = long long int]':
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantAs.hpp:94:22: required from 'T ArduinoJson6173_91::variantAs(ArduinoJson6173_91::VariantData*, ArduinoJson6173_91::MemoryPool*) [with T = long long int]'
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantRef.hpp:259:24: required from 'ArduinoJson6173_91::VariantRef::eek:perator T() const [with T = long long int]'
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Object/MemberProxy.hpp:77:30: required from 'ArduinoJson6173_91::MemberProxy<TParent, TStringRef>::eek:perator T() const [with T = long long int; TObject = ArduinoJson6173_91::JsonDocument&; TStringRef = const char*]'
sketch/HeaterMeterClient.cpp:166:31: required from here
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantAs.hpp:59:3: error: static assertion failed: To use 64-bit integers with ArduinoJson, you must set ARDUINOJSON_USE_LONG_LONG to 1. See https://arduinojson.org/v6/api/config/use_long_long/
59 | ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(T);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 

Bryan Mayland

TVWBB Hall of Fame
I've never seen anything like that before. It seems like something in the Arduino build process isn't working right. I only have 1.8.12 though so I'll try it with 1.8.13 tonight. From your log it looks like there's more options in the Arduino app that I don't have. Weirdly, when I compile, I don't even see it compile ArduinoJson. Maybe try adding this to the top of MeterMonitor.ino?
Code:
#include <ArduinoJson.h>

Oh I see why I don't see it being built. ArduinoJson is entirely header files so it gets built into HeaterMeterClient.o. Not that that helps you at all. But if the above doesn't help, you might try it with Arduino 1.8.12. EDIT: 1.8.13 works fine for me too.

Wait are you trying to compile HeaterMeterClient.cpp? MeterMonitor.ino is what you're probably looking for, and the HeaterMeterClient library folder needs to be in your /Users/temp/Documents/Arduino/libraries/
 
Last edited:

KeithC

TVWBB Member
I've never seen anything like that before. It seems like something in the Arduino build process isn't working right. I only have 1.8.12 though so I'll try it with 1.8.13 tonight. From your log it looks like there's more options in the Arduino app that I don't have. Weirdly, when I compile, I don't even see it compile ArduinoJson. Maybe try adding this to the top of MeterMonitor.ino?
Code:
#include <ArduinoJson.h>

Oh I see why I don't see it being built. ArduinoJson is entirely header files so it gets built into HeaterMeterClient.o. Not that that helps you at all. But if the above doesn't help, you might try it with Arduino 1.8.12. EDIT: 1.8.13 works fine for me too.

Wait are you trying to compile HeaterMeterClient.cpp? MeterMonitor.ino is what you're probably looking for, and the HeaterMeterClient library folder needs to be in your /Users/temp/Documents/Arduino/libraries/
well I closed all the tabs, only ones open is the metermonitor.ino and segment_chars.h, still getting this:

In file included from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantContent.hpp:11,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantSlot.hpp:11,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Memory/MemoryPool.hpp:10,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantData.hpp:7,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/SlotFunctions.hpp:8,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Array/ArrayIterator.hpp:7,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Array/ArrayRef.hpp:8,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson.hpp:17,
from /Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson.h:9,
from /Users/temp/Documents/Arduino/libraries/HeaterMeterClient/src/HeaterMeterClient.h:11,
from /Users/temp/Documents/Arduino/libraries/HeaterMeterClient/src/HeaterMeterClient.cpp:1:
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantAs.hpp: In instantiation of 'typename ArduinoJson6173_91::enable_if<(ArduinoJson6173_91::is_integral<T>::value && (! ArduinoJson6173_91::is_same<bool, T>::value)), T>::type ArduinoJson6173_91::variantAs(const ArduinoJson6173_91::VariantData*) [with T = long long int; typename ArduinoJson6173_91::enable_if<(ArduinoJson6173_91::is_integral<T>::value && (! ArduinoJson6173_91::is_same<bool, T>::value)), T>::type = long long int]':
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantAs.hpp:94:22: required from 'T ArduinoJson6173_91::variantAs(ArduinoJson6173_91::VariantData*, ArduinoJson6173_91::MemoryPool*) [with T = long long int]'
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantRef.hpp:259:24: required from 'ArduinoJson6173_91::VariantRef::eek:perator T() const [with T = long long int]'
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Object/MemberProxy.hpp:77:30: required from 'ArduinoJson6173_91::MemberProxy<TParent, TStringRef>::eek:perator T() const [with T = long long int; TObject = ArduinoJson6173_91::JsonDocument&; TStringRef = const char*]'
/Users/temp/Documents/Arduino/libraries/HeaterMeterClient/src/HeaterMeterClient.cpp:166:31: required from here
/Users/temp/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Variant/VariantAs.hpp:59:3: error: static assertion failed: To use 64-bit integers with ArduinoJson, you must set ARDUINOJSON_USE_LONG_LONG to 1. See https://arduinojson.org/v6/api/config/use_long_long/
59 | ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(T);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using library HeaterMeterClient at version 1 in folder: /Users/temp/Documents/Arduino/libraries/HeaterMeterClient
Using library ESP8266WiFi at version 1.0 in folder: /Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi
Using library ESPAsyncTCP-master at version 1.2.2 in folder: /Users/temp/Documents/Arduino/libraries/ESPAsyncTCP-master
Using library ArduinoJson at version 6.17.3 in folder: /Users/temp/Documents/Arduino/libraries/ArduinoJson
Using library TM1637-1.2.0 at version 1.2.0 in folder: /Users/temp/Documents/Arduino/libraries/TM1637-1.2.0
Using library ESP8266HTTPClient at version 1.2 in folder: /Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266HTTPClient
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
 

KeithC

TVWBB Member
there's what I added and still fails compile.
 

Attachments

  • Screen Shot 2021-02-24 at 2.40.32 PM.png
    Screen Shot 2021-02-24 at 2.40.32 PM.png
    569.6 KB · Views: 5

KeithC

TVWBB Member
And I'm even trying to build on a windows 10 workstation but it's not installing python3 in the Arduino folder so I'm just stuck in the mud atm & have no idea *** to do now
 

KeithC

TVWBB Member
soooo.... I rolled the hm client library back to the Feb 6 version & got something to evidently work....

Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 268620 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27385 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1528 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 1268 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 27416 ) - zeroed variables (global, static) in RAM/HEAP
Using library HeaterMeterClient at version 1 in folder: /Users/temp/Documents/Arduino/libraries/HeaterMeterClient
Using library ESP8266WiFi at version 1.0 in folder: /Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi
Using library ESPAsyncTCP-master at version 1.2.2 in folder: /Users/temp/Documents/Arduino/libraries/ESPAsyncTCP-master
Using library ArduinoJson at version 6.17.3 in folder: /Users/temp/Documents/Arduino/libraries/ArduinoJson
Using library TM1637-1.2.0 at version 1.2.0 in folder: /Users/temp/Documents/Arduino/libraries/TM1637-1.2.0
Using library ESP8266HTTPClient at version 1.2 in folder: /Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266HTTPClient
/Users/temp/Documents/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-size -A /var/folders/3t/_6fzx0vn201bf7c2bmpzx4380000gn/T/arduino_build_856435/MeterMonitor.ino.elf
Sketch uses 298801 bytes (28%) of program storage space. Maximum is 1044464 bytes.
Global variables use 30212 bytes (36%) of dynamic memory, leaving 51708 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port /dev/cu.usbserial-FD130
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: XXXXXXXXXXXXX
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 302960 bytes to 220381...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (14 %)
Writing at 0x00008000... (21 %)
Writing at 0x0000c000... (28 %)
Writing at 0x00010000... (35 %)
Writing at 0x00014000... (42 %)
Writing at 0x00018000... (50 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (64 %)
Writing at 0x00024000... (71 %)
Writing at 0x00028000... (78 %)
Writing at 0x0002c000... (85 %)
Writing at 0x00030000... (92 %)
Writing at 0x00034000... (100 %)
Wrote 302960 bytes (220381 compressed) at 0x00000000 in 5.5 seconds (effective 441.3 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
 

KeithC

TVWBB Member
now the new code works?!?!?!

there must have been something missing on the first go. I do not know GitHub all that well and was pulling the files manually because I didn't see a download zip button. I don't know why your site doesn't have this, other do but many don't. anyway I dug into the page and finally found through the history page it takes you to one that has that stupid button so you can download the repository as a zip. again, I don't know what triggers this thing but it needs to be a thing...

thanks.
 

Attachments

  • Screen Shot 2021-02-24 at 3.41.11 PM.png
    Screen Shot 2021-02-24 at 3.41.11 PM.png
    27.7 KB · Views: 2

Bryan Mayland

TVWBB Hall of Fame
Huh I dunno. I even tried logging out and I still get the download zip option right on the main page. Maybe GitHub was having a moment or something but glad you were able to get it working. Arduino does some really wacky stuff in the way it crams a bunch of files together and then adds code to them and tries to compile it, so maybe something got corrupted along the way at some point.

1614203793609.png
 

GSpinelli

TVWBB Member
ok, thanks for the info! I ordered the same displays you did and NONE of them are marked with which color they are on the back! So trying to figure out how to light these up to check color...
If you look at the part number of on the side of the white LED block, the parts ending in:
BS=Red
BY=Yellow
BG=Green
BH=White
BB=Blue
 

GSpinelli

TVWBB Member
Yeah I haven't tried printing the lid at all, which is why it is commented out. It may fit or it may have the bevels facing the wrong way or it might be too big or too small. I considered adding feet to it as well that slide on so it isn't so tippy but it stood up well enough I didn't finish it. I also anticipated having to get into it more times to troubleshoot, but it just worked right out of the gate.

All my LED displays weren't marked either, so I put them in randomly. I had bought 3x green for the food probes (thinking those would be easiest to read), one red for the pit probe, and then one in every other color just to see how they looked. I really like the white and blue though so I'd go with those if I were building from scratch. The secret to figuring out what color they are without plugging them in is to look at the model number on the side of the LED module itself. One of the last letters is the color code (second to last on my 0.56").

I've pushed new a HeaterMeterClient with support for pidint (onPidInt), and the values are in state.Output.Internals P, I, D, and dT and LastUpdate (millis timer when it was received). There's also a new state.UpdateUtc which contains the UTC UNIX timestamp of the data coming from the HeaterMeter's clock. Use the standard localtime() function to convert that to a parsed time. The onHmStatus and onPidInt callbacks are now deferred so there's more RAM available to you when you're called. Finally I've made sure it is compatible with ESP32.
Thanks for the update, greatly appreciated!
 

KeithC

TVWBB Member
@Bryan Mayland I warned you I was an idiot lol thanks again. In case anyone else is having issues, here's a couple of things to try:

First, doing the manual board install via terminal. Others have had issues in other forums with other projects, so I went ahead and did the manual board setup instead of installing via the GUI. https://arduino-esp8266.readthedocs.io/en/latest/installing.html

Next, I did toss this installer on to help with the serial connection, a USB to UART driver that works with these esp8266 boards from Silicon Labs. Since they are the official resource on the original FTDI chips & software, figured it was worth a try. Their connection option is the one that I used to flash mine from the Port selection in the Arduino menu. https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers

And now the stupid things to try: different cables and different boards yielded the same issues. After re-downloading the repository (for the Arduino libraries) & reloaded them, I had also switched from USB ports directly on the computer to a USB hub on my desk with yet a 3rd cable swap & it all finally worked, so I don't have a clue what the actual fix was but that was the madness which was my life yesterday.

Hope this helps anyone having issues like me.
 

Steve_M

TVWBB Guru
I've been burned by USB cables that don't have data pins/wires that are only used for charging things. It's really annoying when you see the USB gadget light up, but aren't able to communicate with it!
 

Andrew F

TVWBB Super Fan
I think I have done everything correctly, but because I have no temps being displayed I must have screwed something up.
Here is what I can verify
1. The Wemos is showing up on my router as connected to wifi
2. The power light on the LED panel is lit

Is there a way to check that the wemos is finding the Heatermeter and getting the information?
 

Top