tagyoureit / nodejs-poolController

An application to control pool equipment from various manufacturers.
GNU Affero General Public License v3.0
315 stars 94 forks source link

[BUG] Errors trying to configure 10k thermistor temperature probe in REM #976

Closed dkossman closed 1 month ago

dkossman commented 1 month ago

nodejs-poolController Version/commit

n/a

nodejs-poolController-dashPanel Version/commit

n/a

relayEquipmentManager Version/commit

8.0.0

Node Version

20.14.0

Platform

Linux njspcPi 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux

RS485 Adapter

n/a

Are you using Docker?

OCP

None

Pump(s)

Intelliflo 2 VS (not connected yet)

Chlorinator(s)

None

What steps will reproduce the bug?

Note: this error seems to have started since i pulled REM (this morning, after the Steinhard-Hart option was added (so this is arguably my own fault :-)).

I haven't yet fired up NJSPC or Dashpanel, just trying to get REM working.

In REM

[15/06/2024, 13:41:22] error: Error creating generic device factoryCreate: mod[sName] is not a constructor [15/06/2024, 13:41:22] error: Factory error creating device for undefined

This log starts at resetting the server, i attempted to set up the probe using both Steinhart-Hart and the lookup table, same issue. This makes it impossible to feed the ADS1115 voltage to the 10k probe device

[15/06/2024, 13:40:41] info: [1:40:41 PM] 10.0.1.36 GET /config/options/general?null {}
[15/06/2024, 13:40:44] info: [1:40:44 PM] 10.0.1.36 PUT /config/reset {"controllerType":"raspi","app":{"level":"info","logToFile":false},"spi0":{"isActive":false},"spi1":{"isActive":false},"busNumber":"1","detected":{"path":"/sys/devices/w1_bus_master1"}}
[15/06/2024, 13:40:44] info: Stopping GPIO Controller
[15/06/2024, 13:40:44] info: Initializing GPIO Pins 0
[15/06/2024, 13:40:44] info: Initializing SPI Bus #0
[15/06/2024, 13:40:44] info: SPI Bus #0 Initialized
[15/06/2024, 13:40:44] info: Initializing SPI Bus #1
[15/06/2024, 13:40:44] info: SPI Bus #1 Initialized
[15/06/2024, 13:40:44] info: Closing 2 i2c devices.
[15/06/2024, 13:40:44] info: Stopped I2c Multi-Relay Board
[15/06/2024, 13:40:44] info: Stopped I2c ADS1115
[15/06/2024, 13:40:44] info: Closed i2c Bus #1
[15/06/2024, 13:40:44] info: Initializing i2c Interface
[15/06/2024, 13:40:44] info: Detecting i2c Buses
[15/06/2024, 13:40:44] info: Detecting i2c Buses /sys/class/i2c-dev/i2c-1
[15/06/2024, 13:40:44] info: Detecting i2c Buses /sys/class/i2c-dev/i2c-20
[15/06/2024, 13:40:44] info: Detecting i2c Buses /sys/class/i2c-dev/i2c-21
[15/06/2024, 13:40:44] info: Initializing i2c Bus #1
[15/06/2024, 13:40:44] info: Scanning i2c Bus #1
[ 32, 72 ]
[15/06/2024, 13:40:44] info: Found I2C device Multi-Relay Board at address: 32 - (0x20)
[15/06/2024, 13:40:44] info: Found I2C device ADS1115 at address: 72 - (0x48)
[15/06/2024, 13:40:44] info: Device Multi-Relay Board initialized for i2c bus #1 address 32
[15/06/2024, 13:40:44] info: Device ADS1x15 ADC initialized for i2c bus #1 address 72
[15/06/2024, 13:40:44] info: i2c Bus #1 Initialized
[15/06/2024, 13:40:46] info: REM Devices Reset
[15/06/2024, 13:40:53] info: [1:40:53 PM] 10.0.1.36 GET /config/options/genericDevices?null {}
[15/06/2024, 13:40:57] info: [1:40:57 PM] 10.0.1.36 GET /config/options/genericDevices?null {}
[15/06/2024, 13:41:22] info: [1:41:22 PM] 10.0.1.36 PUT /config/genericDevices/device {"options":{"name":"Pump Return Temp","units":"F","inputType":"volt","vccRef":3.3,"inputBitness":10,"inputResistanceUnits":1,"calcType":"interpolate","calibration":0},"values":{"adcValue":null,"inputUnits":"","resistance":null,"temperature":null,"units":""},"id":2}
[15/06/2024, 13:41:22] info: received {"options":{"name":"Pump Return Temp","units":"F","inputType":"volt","vccRef":3.3,"inputBitness":10,"inputResistanceUnits":1,"calcType":"interpolate","calibration":0},"values":{"adcValue":null,"inputUnits":"","resistance":null,"temperature":null,"units":""},"id":2}
[15/06/2024, 13:41:22] error: Error creating generic device factoryCreate: mod[sName] is not a constructor
[15/06/2024, 13:41:22] error: Factory error creating device for undefined
[15/06/2024, 13:41:29] info: [1:41:29 PM] 10.0.1.36 PUT /config/genericDevices/device {"options":{"name":"Pump Return Temp","units":"F","inputType":"volt","vccRef":3.3,"inputBitness":10,"inputResistanceUnits":1,"calcType":"shart","calibration":0},"values":{"adcValue":null,"inputUnits":"","resistance":null,"temperature":null,"units":""},"id":2}
[15/06/2024, 13:41:29] info: received {"options":{"name":"Pump Return Temp","units":"F","inputType":"volt","vccRef":3.3,"inputBitness":10,"inputResistanceUnits":1,"calcType":"shart","calibration":0},"values":{"adcValue":null,"inputUnits":"","resistance":null,"temperature":null,"units":""},"id":2}
[15/06/2024, 13:41:29] error: Error creating generic device factoryCreate: mod[sName] is not a constructor
[15/06/2024, 13:41:29] error: Factory error creating device for undefined

What happens?

Generic 10k temp probe cannot be configured Errors in the log

[15/06/2024, 13:49:38] error: Error creating generic device factoryCreate: mod[sName] is not a constructor [15/06/2024, 13:49:38] error: Factory error creating device for undefined

What should have happened?

Config should have been save as Voltage input, 16-bit

Additional information

see details and log in the Steps section

dkossman commented 1 month ago

Sorry, should have logged this in REM, not NJSPC. will copy over.