Pr60-21 & home assistant

Just purchased the PR60-21 and wifi module and cant wait to get them. so much ive been trying to find any information on connecting these together and havent found much.

Anything you have to help please post it below.

Hi,

The WiFi module will simply slot into the communications socket on the board. If ordered together we will generally install it before shipment.

First you’ll want to configure the wifi module to be on your network. You can find that info at: NexGen WiFi Module User Guide - NCD.io

Here is the command and control guide for the Potentiometer Products: Digital Potentiometer Quick Start Guide - NCD.io

1 Like

sorry i should of given more information.

How difficult is this to integrate into home assistant?

Hi Michael,

I don’t have much experience with Home Assistant, but I believe it has MQTT the option to act as an MQTT broker via Mosquitto. You can configure the WiFi module to communicate to and from a particular topic via that MQTT broker in order to send commands and read responses.

1 Like

ok its sending data but having issues with communication. have an links for mqtt with the wifi mod?

The MQTT options on the WiFi module are covered under the section “MQTT” of this guide: NexGen WiFi Module User Guide - NCD.io

yes thank you ive gotten it runing on wifi and transmitting over mqtt, where can i find codes to control the pots?

The command and control guide can be found at: Digital Potentiometer Quick Start Guide - NCD.io

Look under the section titled POT Command Set

this doesnt seem normal that the mqtt keeps re-establishing a connection every few seconds… @TravisE_NCD_Technica

would it be better just to flash this with tasmota and go from there?

2024-01-12 23:19:46: New connection from 192.168.0.244:60672 on port 1883.
2024-01-12 23:19:46: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:19:46: New client connected from 192.168.0.244:60672 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:19:46: New connection from 192.168.0.191:63516 on port 1883.
2024-01-12 23:19:46: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:19:46: New client connected from 192.168.0.191:63516 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:20:01: New connection from 192.168.0.244:45664 on port 1883.
2024-01-12 23:20:01: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:20:01: New client connected from 192.168.0.244:45664 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:20:01: New connection from 192.168.0.191:63517 on port 1883.
2024-01-12 23:20:01: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:20:01: New client connected from 192.168.0.191:63517 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:20:16: New connection from 192.168.0.244:43550 on port 1883.
2024-01-12 23:20:16: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:20:16: New client connected from 192.168.0.244:43550 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:20:16: New connection from 192.168.0.191:63518 on port 1883.
2024-01-12 23:20:16: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:20:16: New client connected from 192.168.0.191:63518 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:20:31: New connection from 192.168.0.244:44576 on port 1883.
2024-01-12 23:20:31: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:20:31: New client connected from 192.168.0.244:44576 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:20:31: New connection from 192.168.0.191:63519 on port 1883.
2024-01-12 23:20:31: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:20:31: New client connected from 192.168.0.191:63519 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:20:46: New connection from 192.168.0.244:48920 on port 1883.
2024-01-12 23:20:46: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:20:46: New client connected from 192.168.0.244:48920 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:20:46: New connection from 192.168.0.191:63520 on port 1883.
2024-01-12 23:20:46: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:20:46: New client connected from 192.168.0.191:63520 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:20:59: New connection from 172.30.32.2:54844 on port 1883.
2024-01-12 23:20:59: Client <unknown> closed its connection.
2024-01-12 23:21:01: New connection from 192.168.0.244:45314 on port 1883.
2024-01-12 23:21:01: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:21:01: New client connected from 192.168.0.244:45314 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:21:01: New connection from 192.168.0.191:63521 on port 1883.
2024-01-12 23:21:01: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:21:01: New client connected from 192.168.0.191:63521 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:21:16: New connection from 192.168.0.244:49392 on port 1883.
2024-01-12 23:21:16: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:21:16: New client connected from 192.168.0.244:49392 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:21:16: New connection from 192.168.0.191:63522 on port 1883.
2024-01-12 23:21:16: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:21:16: New client connected from 192.168.0.191:63522 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:21:31: New connection from 192.168.0.244:58196 on port 1883.
2024-01-12 23:21:31: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:21:31: New client connected from 192.168.0.244:58196 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:21:31: New connection from 192.168.0.191:63523 on port 1883.
2024-01-12 23:21:31: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:21:31: New client connected from 192.168.0.191:63523 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:21:46: New connection from 192.168.0.244:48854 on port 1883.
2024-01-12 23:21:46: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:21:46: New client connected from 192.168.0.244:48854 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:21:46: New connection from 192.168.0.191:63524 on port 1883.
2024-01-12 23:21:46: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:21:46: New client connected from 192.168.0.191:63524 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:22:01: New connection from 192.168.0.244:36750 on port 1883.
2024-01-12 23:22:01: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:22:01: New client connected from 192.168.0.244:36750 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:22:01: New connection from 192.168.0.191:63525 on port 1883.
2024-01-12 23:22:01: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:22:01: New client connected from 192.168.0.191:63525 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:22:16: New connection from 192.168.0.244:42210 on port 1883.
2024-01-12 23:22:16: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:22:16: New client connected from 192.168.0.244:42210 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:22:16: New connection from 192.168.0.191:63526 on port 1883.
2024-01-12 23:22:16: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:22:16: New client connected from 192.168.0.191:63526 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:22:31: New connection from 192.168.0.244:50544 on port 1883.
2024-01-12 23:22:31: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:22:31: New client connected from 192.168.0.244:50544 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:22:31: New connection from 192.168.0.191:63527 on port 1883.
2024-01-12 23:22:31: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:22:31: New client connected from 192.168.0.191:63527 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:22:46: New connection from 192.168.0.244:56706 on port 1883.
2024-01-12 23:22:46: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:22:46: New client connected from 192.168.0.244:56706 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:22:46: New connection from 192.168.0.191:63528 on port 1883.
2024-01-12 23:22:46: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:22:46: New client connected from 192.168.0.191:63528 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:22:59: New connection from 172.30.32.2:59826 on port 1883.
2024-01-12 23:22:59: Client <unknown> closed its connection.
2024-01-12 23:23:01: New connection from 192.168.0.244:43472 on port 1883.
2024-01-12 23:23:01: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:23:01: New client connected from 192.168.0.244:43472 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:23:01: New connection from 192.168.0.191:63529 on port 1883.
2024-01-12 23:23:01: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:23:01: New client connected from 192.168.0.191:63529 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:23:16: New connection from 192.168.0.244:50066 on port 1883.
2024-01-12 23:23:16: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:23:16: New client connected from 192.168.0.244:50066 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:23:16: New connection from 192.168.0.191:63530 on port 1883.
2024-01-12 23:23:16: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:23:16: New client connected from 192.168.0.191:63530 as ncd_sensor (p2, c1, k15, u'mikey').
2024-01-12 23:23:31: New connection from 192.168.0.244:56590 on port 1883.
2024-01-12 23:23:31: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:23:31: New client connected from 192.168.0.244:56590 as ncd_sensor (p1, c1, k60, u'mikey').
2024-01-12 23:23:31: New connection from 192.168.0.191:63531 on port 1883.
2024-01-12 23:23:31: Client ncd_sensor already connected, closing old connection.
2024-01-12 23:23:31: New client connected from 192.168.0.191:63531 as

after further reading i do not believe im securing the connection to mosquitto. will try adding some certs and seeing if it helps

If you are using a Mosquitto broker there are a lot of options for configuration on the broker. From what it looks like to me there may be multiple MQTT clients trying to connect with the client ID ncd_sensor. Are you perhaps using a software tool to connect to the broker with the same client ID(ncd_sensor)? Mosquitto is saying a client with the ID ncd_sensor is already connected in that log so it’s refusing the connection.

node red , could that cause that issue?

that helped, should i not make mqtt address for host in ncd wifi config?

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[06:34:32] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[06:34:34] INFO: Starting NGINX for authentication handling...
[06:34:34] INFO: Starting mosquitto MQTT broker...
2024-01-14 06:34:34: Warning: Mosquitto should not be run as root/administrator.
2024-01-14 06:34:34: mosquitto version 2.0.18 starting
2024-01-14 06:34:34: Config loaded from /etc/mosquitto/mosquitto.conf.
2024-01-14 06:34:34: Loading plugin: /usr/share/mosquitto/go-auth.so
2024-01-14 06:34:34:  ├── Username/password checking enabled.
2024-01-14 06:34:34:  ├── TLS-PSK checking enabled.
2024-01-14 06:34:34:  └── Extended authentication not enabled.
2024-01-14 06:34:34: Opening ipv4 listen socket on port 1883.
2024-01-14 06:34:34: Opening ipv6 listen socket on port 1883.
2024-01-14 06:34:34: Opening websockets listen socket on port 1884.
2024-01-14 06:34:34: mosquitto version 2.0.18 running
2024-01-14 06:34:34: New connection from 192.168.0.191:49236 on port 1883.
2024-01-14 06:34:34: New client connected from 192.168.0.191:49236 as NCD (p2, c1, k15, u'Mikey').
2024-01-14 06:34:34: New connection from 127.0.0.1:39416 on port 1883.
2024-01-14 06:34:34: Client <unknown> disconnected due to protocol error.
2024-01-14 06:34:34: New connection from 192.168.0.150:62033 on port 1883.
2024-01-14 06:34:34: New client connected from 192.168.0.150:62033 as DVES_8A9DCD (p2, c1, k30, u'mikey').
2024-01-14 06:34:34: New connection from 192.168.0.144:64664 on port 1883.
2024-01-14 06:34:34: New client connected from 192.168.0.144:64664 as DVES_8A4FC8 (p2, c1, k30, u'mikey').
[06:34:35] INFO: Successfully send discovery information to Home Assistant.
[06:34:36] INFO: Successfully send service information to the Supervisor.
2024-01-14 06:34:37: New connection from 172.30.33.7:33383 on port 1883.
2024-01-14 06:34:37: New client connected from 172.30.33.7:33383 as auto-A7EED817-B1B4-1E3F-CED7-4B3431FDE837 (p2, c1, k30, u'addons').
2024-01-14 06:34:38: New connection from 172.30.32.1:36007 on port 1883.
2024-01-14 06:34:38: New client connected from 172.30.32.1:36007 as 6CsEWc4yIcD56xQg9kpAON (p2, c1, k60, u'homeassistant').
2024-01-14 06:35:03: New connection from 172.30.32.2:40580 on port 1883.
2024-01-14 06:35:03: Client <unknown> closed its connection.
2024-01-14 06:37:03: New connection from 172.30.32.2:47184 on port 1883.
2024-01-14 06:37:03: Client <unknown> closed its connection.

got it to node red with udp in

1 Like

Great. Let us know if you need anything else @michael.beyer

a linux version of base station

what is the last working version of node red is the ncd palette compatible with?

i moved over to http api instead of udp since its easier to work with code wise. is there any material other than windows apps i can get a grasp on how the http api code works? i know you have the codec on windows but nothing for linux

ive got , on /off but id really like information on using the api to change resistance in pot

Hi Michael,

We do not have a Linux version of Base Station. It is Windows only.

The node-red-enterprise-sensors library here is compatible with the latest version of Node-Red and NodeJS:

The guide @Jacob linked to has the full API for controlling the potentiometer channels. What other information are you looking for specifically? The method of sending commands HTTP/UDP really has no affect on the command bytes that are sent, they are just different methods of sending the command bytes.

npm ERR! code 1
npm ERR! path /opt/node_modules/@serialport/bindings
npm ERR! command failed
npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! prebuild-install warn install No prebuilt binaries found (target=18.19.0 runtime=node arch=arm64 libc=musl platform=linux)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@18.19.0 | linux | arm64
npm ERR! gyp info find Python using Python version 3.11.6 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/node_modules/@serialport/bindings/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/18.19.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.19.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.19.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/node_modules/@serialport/bindings',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/lib/index.js:16:17)
npm ERR! gyp ERR! stack at which (/usr/local/lib/node_modules/npm/node_modules/which/lib/index.js:77:9)
npm ERR! gyp ERR! stack at async doWhich (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:112:22)
npm ERR! gyp ERR! stack at async loadConfigGypi (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:77:7)
npm ERR! gyp ERR! stack at async build (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:35:3)
npm ERR! gyp ERR! stack at async run (/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
npm ERR! gyp ERR! System Linux 6.1.63-haos-raspi
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /opt/node_modules/@serialport/bindings
npm ERR! gyp ERR! node -v v18.19.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-15T18_20_57_023Z-debug-0.log

@michael.beyer It appears make is not installed.

There is a stack overflow thread here you might take a look at:

1 Like

has make on startup and shows from npm terminal

(1/19) Installing jansson (2.14-r4)
(2/19) Installing zstd-libs (1.5.5-r8)
(3/19) Installing binutils (2.41-r0)
(4/19) Installing libmagic (5.45-r1)
(5/19) Installing file (5.45-r1)
(6/19) Installing libgomp (13.2.1_git20231014-r0)
(7/19) Installing libatomic (13.2.1_git20231014-r0)
(8/19) Installing gmp (6.3.0-r0)
(9/19) Installing isl26 (0.26-r1)
(10/19) Installing mpfr4 (4.2.1-r0)
(11/19) Installing mpc1 (1.3.1-r1)
(12/19) Installing gcc (13.2.1_git20231014-r0)
(13/19) Installing libstdc++-dev (13.2.1_git20231014-r0)
(14/19) Installing musl-dev (1.2.4_git20230717-r4)
(15/19) Installing libc-dev (0.7.2-r5)
(16/19) Installing g++ (13.2.1_git20231014-r0)
(17/19) Installing make (4.4.1-r2)
(18/19) Installing fortify-headers (1.1-r3)
(19/19) Installing build-base (0.5-r3)
a0d7b954-nodered:/opt# make --version
GNU Make 4.4.1
Built for aarch64-alpine-linux-musl
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.