OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) GPIO stations not visible in e1bc80f7b22f191b58bc6e1529f85e836aa94aa7 Reply To: GPIO stations not visible in e1bc80f7b22f191b58bc6e1529f85e836aa94aa7

#41868

Peter
Participant

Kristoffer,

The GPIO functionality requires both the latest Firmware and the latest UI. You have downloaded the functionality to control the GPIO pins in the Firmware but you really need the latest UI web pages to easily access and configure the functionality. I know Samer and Ray are looking to package this up in a future release so the two options below are a bit of a work-around until then.

1) You could upgrade to the latest UI from Samer’s GitHub (OpenSprikler-App) but would need to host the webpages on your RPi rather than relying on the version that is provided from the OpenSprinkler server. The instructions for doing this are on the OpenSprinkler support page: (here). This is non-trivial and requires a certain level of Debian/web knowledge.

2) An alternative, given that you have already updated the Firmware, would be to configure the station directly in the Firmware by sending an api command. The api documentation is on the OS support pages: (here).

As an example, the command http://ospi_ip:8080/cs?pw=PASSWORD&p0=16&sid=4&st=3&sd=080 can be sent to the Firmware via a web browser and will set Station 5 to be a GPIO Station using GPIO08 and active low logic. In the example, we first enable the “special” flag on Station 5 with the parameters p0=16 noting that the 0 after the p refers to the first board of 8 stations and the 16 is binary for the 5th Station on that board; we then use sid=4 to tell the firmware that the following st and sd parameters refer to Station 5 (i.e. sids go from 0-7 and are therefore one less than the station’s labels); st=3 specifies a GPIO Station type; sd=080 specifies GPIO pin 08 and active low.

You would also need to substitute ospi_ip with the IP address of your RPi and PASSWORD for the MD5 hash of your OS password (or turn off password checking by selecting Edit Options/Advanced/Ignore Password from your OSPi homepage).

Happy to help get this working for you if you need any assistance.

Cheers, Pete