DS18B20 ESP32 nodemanager problem
-
Hi,
I tried to used Nodemanager on ESP32 using ardruine platformIO and cannot get DS18B20 working.
I first tried Nodemaneger and a simple relay : this works fine.
I use Nodemanager 1.8.0 Development branch
and mysensors/MySensors 2.3.2
DallasTemperature 3.10.0
OneWire 2.3.7
The problem occors at boot: It simple reboots with rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
There is no other error.
I tried to change the #include <sensors/SensorDs18b20.h>
and it seems the problem starts when _sensors->begin(); is called.
As a work around I changed the following:public: SensorDs18b20(int8_t pin, uint8_t child_id = 0): Sensor(pin) { _name = "DS18B20"; // initialize the library OneWire* oneWire = new OneWire(_pin); _sensors = new DallasTemperature(oneWire); // initialize the sensors //register a new child for each sensor on the bus //for(int i = 0; i < _sensors->getDeviceCount(); i++) { // new Child(this,FLOAT,nodeManager.getAvailableChildId(child_id+i),S_TEMP,V_TEMP,_getAddress(i)); new Child(this,FLOAT,nodeManager.getAvailableChildId(child_id),S_TEMP,V_TEMP,_name); // } };
and moved the _sensors.begin to onSetup:
// define what to do during setup void onSetup() { _sensors->begin(); for (int i = 1; i <= children.size(); i++) { children.get(i); nodeManager.sendMessage(children.get(i)->getChildId(),V_ID,_getAddress(i-1)); } };
Now it works but I can only have 1 sensor per pin.
Any idea how to get this going correctly again?
Regards, A3
-
Updated the ESP-IDF from 4.4.0 to latest 5.1.1 and rebuild.
Framework updated automatically to framework-arduinoespressif32 @ 3.20004.220825 (2.0.4)
Test with 2 sensors on the same pin : Works fine.However there are two no blocking error messages:
E (1275) gpio: gpio_isr_handler_remove(480): GPIO isr service is not installed, call gpio_install_isr_service() first
Complete startup messages:
163 MCO:BGN:INIT GW,CP=R-NGF---,FQ=240,REL=255,VER=2.3.2 168 MCO:BGN:BFR 169 NM:INIT:VER=1.9-dev 171 NM:INIT:INO=Testcontroller v1.0 174 NM:INIT:LIB VER=2.3.2 CP=R-NGF--- 178 NM:BFR:INIT 1310 GWT:TIN:CONNECTING... 1313 GWT:TIN:IP: 192.168.68.28 1317 MCO:BGN:STP 1335 NM:STP:ID=0 M=0 1340 NM:LOOP:RELAY(1):SET t=2 v=0 1359 NM:MSG:SEND(2) t=42 p=2864B875D0013C99 1392 NM:MSG:SEND(3) t=42 p=28920675D0013CB4 E (1275) gpio: gpio_isr_handler_remove(480): GPIO isr service is not installed, call gpio_install_isr_service() first E (1276) gpio: gpio_isr_handler_remove(480): GPIO isr service is not installed, call gpio_install_isr_service() first 1407 NM:STP:HW V=0 F=240 M=49480 1421 NM:LOOP:RELAY(1):SET t=2 v=0 3424 MCO:REG:NOT NEEDED 3426 MCO:BGN:INIT OK,TSP=NA 3429 NM:MSG:SEND(1) t=2 p=0 3968 NM:LOOP:2864B875D0013C99(2):SET t=0 v=22.75 4537 NM:LOOP:28920675D0013CB4(3):SET t=0 v=22.19 4542 NM:MSG:SEND(2) t=0 p=22.75 4545 NM:MSG:SEND(3) t=0 p=22.19
Suggested Topics
-
💬 Sensebender Micro mk2
OpenHardware.io • 16 Nov 2016, 22:30 • openhardware.io 10 Jul 2018, 19:37 -
Permaproto MySensor
My Project • 22 Jul 2014, 17:01 • tannewt 23 Jul 2014, 12:22 -
💬 MySensor RFM69HCW micro pcb for DHT, Si7021, CNY70, ...
OpenHardware.io • 14 Mar 2017, 09:41 • openhardware.io 13 May 2017, 21:35 -
My first working Switch with Battery and Temperature ..
My Project • 29 Nov 2014, 17:12 • dzairo 30 Nov 2014, 18:43 -
[SOLVED] s17021 vs HTU21
Hardware • 30 Apr 2021, 20:22 • 4994james 3 May 2021, 05:54 -
💬 LoRa ESP32 Low Power Lerning Board
OpenHardware.io • 8 May 2019, 08:49 • openhardware.io 8 May 2019, 08:49 -
MAX6675
Development • 26 Nov 2014, 21:15 • Mrlynx 31 Jan 2017, 15:09 -
Basement Monitor
My Project • 3 Apr 2016, 21:27 • micah 8 Apr 2016, 16:43