Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic Devices loses Save and Delete button #71

Open
katodude opened this issue Jun 14, 2024 · 17 comments
Open

Generic Devices loses Save and Delete button #71

katodude opened this issue Jun 14, 2024 · 17 comments

Comments

@katodude
Copy link

I am helping someone set up a pool controller.

We are trying to set up Generic devices for Temp. We can create the generic device. But when we go back in to edit it the save and delete buttons are gone.
image000001

@rstrouse
Copy link
Owner

I’ll have a look.

@rstrouse
Copy link
Owner

In the browser console are you seeing any errors? It appears as if it is throwing an error and not rendering the buttons.

@rstrouse
Copy link
Owner

Ok I figured out what you did. You have a feed coming from the MEGA-BAS that is the input pin and not the value. You want to set the send value on the feed to the value property and not the entire ADC output.

BELOW IS WRONG

image

THIS IS CORRECT

While this is documented in the setup I think that we probably need to make this more apparent or parse the data out of the feed anyway. Notice the selection for the Send Value.
image

@lymanepp
Copy link
Contributor

I had the same problem on initial setup. I wasted quite a bit of time before I figured it out.

rstrouse added a commit that referenced this issue Jun 15, 2024
Allow incorrect feed values #71
@rstrouse
Copy link
Owner

I made it so that it can digest the full output reference. At least it won't cause the feed to fail.

@rstrouse
Copy link
Owner

@katodude if you are still having issues please upload your data/controllerConfig.json. Also, have updated REM to allow for unexpected values stored on the configuration. Update REM to install these changes.

cd ~/relayEquipmentManager
git pull
npm i

@dkossman
Copy link

dkossman commented Jun 16, 2024

I'm having somewhat similar problems. I can't connect my ADS1115 channel to my 10k thermistor device.
When i run my own server code, i have no problems reading the ADS1115 and computing the temperature. (my server is shut down)

Not sure if I'm doing something wrong, I had this working a few days ago but now can't get it to work.

I've cloned the latest REM code into a new local repo and run "npm i"

  • i set up a generic 10k thermistor with input type Raw Value, Bitness 16, calculation thermistor table
  • i set up the ADS1115 as a 16-bit device
  • I enabled channel 1 which has the thermistor
  • i set up a data feed to send channel 1 as an ADC value to the 10k device, input adcValue
  • i can see the correct voltage and bit value of the channel in the ADS panel
  • i can see the same bit value in the Thermistor device panel, but the temperature and resistance are blank
  • the ADS1115 and Thermistor devices are set to active
pi@njspcPi:~/relayEquipmentManager/data $ cat controllerConfig.json
{
  "controllerType": "raspi",
  "gpio": {
    "pins": [],
    "exported": []
  },
  "spi0": {
    "isActive": false,
    "busNumber": 0,
    "channels": [],
    "referenceVoltage": 3.3,
    "spiClock": 1000
  },
  "spi1": {
    "isActive": false,
    "busNumber": 1,
    "channels": [],
    "referenceVoltage": 3.3,
    "spiClock": 1000
  },
  "i2c": {
    "isActive": false,
    "buses": [
      {
        "id": 1,
        "isActive": true,
        "devices": [
          {
            "id": 1,
            "values": {
              "channels": [
                {
                  "id": 1,
                  "value": 24011,
                  "voltage": 1.5007332987456894,
                  "maxValue": 65536,
                  "rawBytes": [
                    93,
                    203
                  ]
                },
                {
                  "id": 2
                },
                {
                  "id": 3
                },
                {
                  "id": 4
                }
              ]
            },
            "options": {
              "adcType": "ads1115",
              "readInterval": 5000,
              "comparatorReadings": 3,
              "comparatorLatchingMode": 0,
              "comparatorActiveMode": 0,
              "comparatorMode": 0,
              "mode": 256,
              "name": "ADS1115",
              "sps": 160,
              "channels": [
                {
                  "id": 1,
                  "name": "Return Temp",
                  "enabled": true,
                  "pga": 2.048,
                  "reverseBias": false,
                  "pgaMask": 1024,
                  "mux": 16384,
                  "config": {
                    "value": 50595,
                    "os": "1",
                    "inMultiplexer": "100",
                    "pga": "10",
                    "mode": "1",
                    "dataRate": "101",
                    "compMode": "0",
                    "compPolarity": "0",
                    "compLatch": "0",
                    "compQueue": "11"
                  }
                },
                {
                  "id": 2,
                  "name": "Channel #2",
                  "enabled": false,
                  "pgaMask": 1024,
                  "pga": 2.048
                },
                {
                  "id": 3,
                  "name": "Channel #3",
                  "enabled": false,
                  "pgaMask": 1024,
                  "pga": 2.048
                },
                {
                  "id": 4,
                  "name": "Channel #4",
                  "enabled": false,
                  "pgaMask": 1024,
                  "pga": 2.048
                }
              ],
              "registers": {
                "config": 50595
              }
            },
            "info": {},
            "address": 72,
            "typeId": 700,
            "sampling": 1,
            "isActive": true,
            "feeds": [
              {
                "id": 1,
                "isActive": true,
                "changesOnly": false,
                "sampling": 1,
                "connectionId": -1,
                "deviceBinding": "generic:5:1",
                "sendValue": "ch1.value",
                "property": "adcValue"
              }
            ],
            "triggers": [],
            "name": "ADS1115"
          }
        ],
        "busNumber": 1,
        "functions": {
          "i2c": true,
          "tenBitAddr": false,
          "protocolMangling": true,
          "smbusPec": true,
          "smbusBlockProcCall": false,
          "smbusQuick": true,
          "smbusReceiveByte": true,
          "smbusSendByte": true,
          "smbusReadByte": true,
          "smbusWriteByte": true,
          "smbusReadWord": true,
          "smbusWriteWord": true,
          "smbusProcCall": true,
          "smbusReadBlock": false,
          "smbusWriteBlock": true,
          "smbusReadI2cBlock": true,
          "smbusWriteI2cBlock": true
        },
        "addresses": [
          {
            "address": 32,
            "manufacturer": 0,
            "product": 0,
            "name": "Unknown"
          },
          {
            "address": 72,
            "manufacturer": 0,
            "product": 0,
            "name": "ADS1115"
          }
        ]
      }
    ],
    "detected": [
      {
        "driver": "bcm2835 (i2c@7e804000)",
        "path": "/sys/class/i2c-dev/i2c-1",
        "name": "i2c-1",
        "busNumber": 1
      },
      {
        "driver": "fef04500.i2c",
        "path": "/sys/class/i2c-dev/i2c-20",
        "name": "i2c-20",
        "busNumber": 20
      },
      {
        "driver": "fef09500.i2c",
        "path": "/sys/class/i2c-dev/i2c-21",
        "name": "i2c-21",
        "busNumber": 21
      }
    ]
  },
  "connections": [],
  "genericDevices": {
    "isActive": true,
    "buses": [],
    "detected": [],
    "options": {},
    "devices": [
      {
        "id": 1,
        "values": {
          "adcValue": 24011,
          "inputUnits": "",
          "units": "F",
          "maxVal": 65536,
          "tempK": null,
          "tempC": null,
          "tempF": null,
          "temperature": null
        },
        "options": {
          "name": "Return Temperature",
          "units": "F",
          "inputType": "raw",
          "vccRef": 3.3,
          "inputBitness": 16,
          "inputResistanceUnits": 1,
          "calcType": "interpolate",
          "calibration": 0
        },
        "info": {},
        "triggers": [],
        "feeds": [],
        "typeId": 5,
        "isActive": true,
        "name": "Return Temperature"
      }
    ]
  },
  "oneWire": {
    "isActive": false,
    "buses": [],
    "detected": [
      {
        "path": "/sys/devices/w1_bus_master1",
        "name": "w1_bus_master1",
        "busNumber": 1
      }
    ]
  },
  "lastUpdated": "6/16/2024, 11:47:59 AM",
  "configVersion": 1

@rstrouse
Copy link
Owner

Please stop pm2 and recompile the Typescript

cd ~/relayEquipmentManager
pm2 stop REM
npm start

@katodude
Copy link
Author

Done, and that worked. REM is functioning as expected. Thank you.

Now, just struggling to get the temp registering in the Nixie. I have the feed going into watersensor1.

This is hardest install I have ever done.

@rstrouse
Copy link
Owner

You are sending a feed from the Generic Temp sensor... correct? Remember the feed does not register until the body is turned on.

@katodude
Copy link
Author

Yes, the feed from the I2C goes into the generic temp sensor. Then the feed from the generic temp sensor goes out. And yes the pool is active.

image000000
image000001
image000002

@rstrouse
Copy link
Owner

Change the send value to All. We added the other options later so folks could digest the straight temperature values in MQTT.

@katodude
Copy link
Author

Still does not pick it up in the Nixie

ca5f3a8d-ef7a-483d-887c-e22948306b4a

@dkossman
Copy link

@rstrouse FYI i checked out this version of the REM code from a few days ago

$ git checkout 14b2b6a

and now the issue with being unable to connect the output of the ADS1115 to a generic 10k temperature probe is resolved.

@rstrouse
Copy link
Owner

@katodude check the REM log to see if there is an error in there sending on the socket.

@katodude
Copy link
Author

Here is an excerpt from the REM logs.

20/06/2024, 11:01:53] error: 39 3,0: EIO: i/o error, write
[20/06/2024, 11:01:53] error: 39 1,0: EIO: i/o error, write
[20/06/2024, 11:01:53] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:53] error: Error connecting to Node JS Pool http://192.168.1.72:4200: xhr poll error
[20/06/2024, 11:01:53] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:53] error: 39 3,0: EIO: i/o error, write
[20/06/2024, 11:01:53] error: 39 1,0: EIO: i/o error, write
[20/06/2024, 11:01:53] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:54] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:54] error: 39 3,0: EIO: i/o error, write
[20/06/2024, 11:01:54] error: 39 1,0: EIO: i/o error, write
[20/06/2024, 11:01:54] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:54] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:54] error: 39 3,0: EIO: i/o error, write
[20/06/2024, 11:01:54] error: 39 1,0: EIO: i/o error, write
[20/06/2024, 11:01:54] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:55] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:55] error: 39 3,0: EIO: i/o error, write
[20/06/2024, 11:01:55] error: 39 1,0: EIO: i/o error, write
[20/06/2024, 11:01:55] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:55] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:55] error: 39 3,0: EIO: i/o error, write
[20/06/2024, 11:01:55] error: 39 1,0: EIO: i/o error, write
[20/06/2024, 11:01:55] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:56] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:56] error: 39 3,0: EIO: i/o error, write
[20/06/2024, 11:01:56] error: 39 1,0: EIO: i/o error, write
[20/06/2024, 11:01:56] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:56] error: Error connecting to Node JS Pool http://192.168.1.72:4200: xhr poll error
[20/06/2024, 11:01:56] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:56] error: 39 3,0: EIO: i/o error, write
[20/06/2024, 11:01:56] error: 39 1,0: EIO: i/o error, write
[20/06/2024, 11:01:56] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:57] error: 39 - Multi-Relay Board Bus #1 Read Command: , Remote I/O error
[20/06/2024, 11:01:57] error: 39 3,0: EIO: i/o error, write

@tagyoureit
Copy link
Collaborator

You may need to physically remove/kill power and restart. These can be hardware related issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants