1

I have a Raspbery pi3 with domoticz and Node-red installed. both are using GPIO with sysfs. When changing an output to high in either domoticz or node-red the value in the file is set to 1. (/sys/class/gpio/gpio/value)

When setting an output high in node-red, domiticz does not reflect the pinstate in the device. When setting an output high in domoticz, node-red does not reflect the pin state in the flow.

Am i missing something here or is this the way it suppose to work? i understood from the documentation that the use of the files was to make the GPIO more general usable by setting the values in there.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Peter
  • 13
  • 4
  • Good question. Unfortunately, I don't use my Pi for GPIO. Using a separate device is easier in my view. Does the value change when checking from the command line? I wonder if it is some kind of caching issue? – Julian Knight Feb 26 '18 at 14:32
  • @JulianKnight: I am test out some features before designing my setup, I have to see how to get the states printed on the console, seems a good start to see what the gpio itself thinks. (was planning to attach a led to the port to see what is does.) I also use a seperate device for most of the GPIO's. For some items i would like a direct connect to the PI to have no dependency on SPI/I2C communication. i looks like the 'scanning' as sysfs calls it does not apply to outputs or is not working the sameway like with inputs. Thanks for your thoughts. – Peter Feb 28 '18 at 12:19
  • I'm running Node-RED as an add-on within a Hass.io build on the Pi, and there is a known issue of GPIO not working: [see github](https://github.com/hassio-addons/addon-node-red/issues/54) However, I don't know if this is specific to the (otherwise excellent) Node-RED build which is specifically made for Hass.io, rather than a problem with Node-RED itself. – Andrew B Jan 06 '19 at 00:07
  • @Andrew B, Thanks for the info.I read the bug, with my setup the outputs / inputs are changed as one would expect. It seems that both 'applications' to not read the status of the port that is reflected in the GPIO status file. I attached a LED to the port and switches states using both Node-RED and Domoticz. Both times the LED changed state but the other application did not follow the new state. For now i use specific ports for each application and sync the other application using a remote trigger (http hook to localhost). – Peter Jan 07 '19 at 11:11
  • @Peter - that's interesting that the GPIO output works. I wonder if we're on the same version of Node-RED? (v1.2.3 within Hass.io for me). I too have got around it by writing a small webservice which does the GPIO, and then Node-RED calls the webservice. – Andrew B Jan 11 '19 at 08:08
  • @Andrew B I use Raspbian OS Node-Red v0.19.1 (also tested with 0.18.1), i upgraded it just now to the 19 release, it seems the latest for the raspbian pigpio 1.60-1 – Peter Jan 12 '19 at 20:10

0 Answers0