I have tried for weeks to get this to work, and I tried the forum too, but obvoiusly in the wronge place. Only now do I find this thread, I was doing my posting under Linux.
So I have gotten as far as to connect to the server, but I can't do the simple task I want to do. I just want to open and close digital outputs from Node-RED. So first I created a connect node and hooked that up to a debug node. Here's what I have in my log when I start up:
Code: Select all
Attempting to Connect to Server (127.0.0.1:5661)
{"topic":"Disconnect","payload":{},"_msgid":"c60533fc.7b07e"}
Connect Success (127.0.0.1:5661)
{"topic":"Connect","payload":{},"_msgid":"43beec8b.978954"}
{"topic":"Attach","payload":{},"_msgid":"247fe19b.03ad5e"}
That sounds pretty promising. Then I created an inject node and a digital input node, trying to use the API for digital outputs, but I have obviously not understood that. Info in the inject node:
And in the digital output node:
Code: Select all
LED Forward Voltage: volts_1_7
LED Current Limit: 0.02
Channel: 0 (I assume this is the port to open, but I'm not sure, so I set it to 0 like the port I'm trying to open)
Serial #: 15593
Using a VINT Port in DigitalOutput mode? (Tried both on and off)
But all I get is "Unsupported message topic: setState(true)" I have also tried with just "setState" as topic in the inject node and "true" as payload, but that gives me "missing value". I'm at my wit's end, I'm used to Node-RED nodes being a bit more self-explanatory. What is the correct way of opening and closing ports with Node-RED?
Edit: After I installed the Java Script excamples to have the webserver interface on, I suddenly get this in Node-RED:
Code: Select all
Open failed:PhidgetError: Open timed out
But the Phidget is connected to Phidgetserver, and it's all working because I can still use the Python example script and the web page to open and close the digital output.