rstrouse / relayEquipmentManager

A hardware controller for GPIO, I2c, SPI, and generic devices.
GNU General Public License v3.0
38 stars 19 forks source link

1-wire DS1820B sensor names do not persist after REM restart #74

Closed dkossman closed 3 weeks ago

dkossman commented 3 months ago

Not a major issue but...

  1. add the 1-wire interface to REM
  2. go to the 1-wire device list
  3. name each DS18B20 device and save it
  4. save settings on main panel
  5. note that probe names are listed on the 1-wire device list
  6. restart REM

Expected: 1-wire device names persist and are shown in the 1-wire device list

Actual: names on the 1-wire device list revert to the original hex names (e.g. 28-00000583ae1e0, though if you inspect each device, the name you set is there, and if you click save, re-appears in the device list

rstrouse commented 3 months ago

I posted a fix for this.

dkossman commented 3 weeks ago

@rstrouse thanks for the fix - sorry for the delay. my Pi's SD card died, I finally replaced it and started over. I pulled the latest REM, NJSPC and Dashpanel to my Pi 4b. running latest Raspberry Pi OS.

However, now when I add my 1-wire bus to REM, none of my DS18B20 temp probes are detected, though I know they are there and working (i can read them with my own server code and see them listed in the w1_bus_master directory. Can't add them manually either. what seems a bit odd is that i don't have the SPI interfaces enabled, but i see them being initialized and I don't see the 1-wire bus being initialized (and yes, i set it to Active when i added it).

Any idea what is going on? Info log below following a reset and then running 1-wire bus scan:

[08/09/2024, 11:41:45] info: [11:41:45 AM] 10.0.1.14 PUT /config/general {"controllerType":"raspi","spi0":{"isActive":false},"spi1":{"isActive":false}}
[08/09/2024, 11:41:47] info: [11:41:47 AM] 10.0.1.14 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"},"name":"","type":{"desc":"nodejs-PoolController"}}
[08/09/2024, 11:41:47] info: Stopping GPIO Controller
[08/09/2024, 11:41:47] info: Initializing GPIO Pins 0
[08/09/2024, 11:41:47] info: Initializing SPI Bus #0
[08/09/2024, 11:41:47] info: SPI Bus #0 Initialized
[08/09/2024, 11:41:47] info: Initializing SPI Bus #1
[08/09/2024, 11:41:47] info: SPI Bus #1 Initialized
[08/09/2024, 11:41:47] info: Closing 2 i2c devices.
[08/09/2024, 11:41:47] info: Stopped I2c Multi-Relay Board
[08/09/2024, 11:41:47] info: Stopped I2c ADS1115
[08/09/2024, 11:41:47] info: Closed i2c Bus #1
[08/09/2024, 11:41:47] info: Initializing i2c Interface
[08/09/2024, 11:41:47] info: Detecting i2c Buses
[08/09/2024, 11:41:47] info: Detecting i2c Buses /sys/class/i2c-dev/i2c-1
[08/09/2024, 11:41:47] info: Detecting i2c Buses /sys/class/i2c-dev/i2c-20
[08/09/2024, 11:41:47] info: Detecting i2c Buses /sys/class/i2c-dev/i2c-21
[08/09/2024, 11:41:47] info: Initializing i2c Bus #1
[08/09/2024, 11:41:47] info: Scanning i2c Bus #1
[08/09/2024, 11:41:47] info: Connected to  : http://10.0.1.53:4200
[ 32, 72 ]
[08/09/2024, 11:41:47] info: Found I2C device Multi-Relay Board at address: 32 - (0x20)
[08/09/2024, 11:41:47] info: Found I2C device ADS1115 at address: 72 - (0x48)
[08/09/2024, 11:41:47] info: Device Multi-Relay Board initialized for i2c bus #1 address 32
[08/09/2024, 11:41:47] info: Device ADS1x15 ADC initialized for i2c bus #1 address 72
[08/09/2024, 11:41:47] info: i2c Bus #1 Initialized
[08/09/2024, 11:41:49] info: REM Devices Reset
[08/09/2024, 11:43:22] info: [11:43:22 AM] 10.0.1.14 GET /config/options/oneWire/1?null {}
[08/09/2024, 11:43:26] info: [11:43:26 AM] 10.0.1.14 GET /config/options/general?null {}
[08/09/2024, 11:44:38] info: [11:44:38 AM] 10.0.1.14 GET /config/options/oneWire/1?null {}
[08/09/2024, 11:44:42] info: [11:44:42 AM] 10.0.1.14 PUT /config/oneWire/scanBus {"busNumber":1}
dkossman commented 3 weeks ago
Screenshot 2024-09-08 at 11 44 16 AM
dkossman commented 3 weeks ago

never mind, figured it out, need to run REM as root. odd because i can read the 1-wire probes fine in my own code and from the command line, running as user pi.