Tell us about yourself!
switchPinNumber in the config refers to GPIO number (0-7), not actual number on the board. For example to use GPIO 0 you must connect wire to pin 11 on the board, but config must specify switchPinNumber: 0
HiSince you can see incoming requests, I am going to assume you do not have relay wired correctly. Start with one relay, make sure it is properly grounded, connected to proper voltage and you are using correct pin number. Also verify that your relay is working. Try connecting to 3.3V then 5V pin. Seems like you have this board: http://pi4j.com/pins/model-3b-rev1.htmlPlay with GPIO 0. Relay should be connected to ground (pin 9), power (pin 1 or 2), and GPIO 0 (pin 11). In the config specify GPIO number as 0.
Hi. From what I read, NOOBS is OS installer, and it installs Raspbian OS, exactly what you need. In general, app will work with any OS that can run java (assuming you can also install pi4j library). Thx
You are right, for windows you need to use gradlew.bat, I am afraid I just deleted it. Looks like I am using this gradle versionhttps://services.gradle.org/distributions/gradle-2...And you can find bat file in the bin folder. I am afraid you are on your own, I have no windows machine to try that.
HiI am pretty sure it works on old devices, it is just an artificial restriction. I do not have an old device to verify it though. You could change minSdkVersion version to match your device and build apk locally: https://github.com/sshlyk/switch-android/blob/mast...Run "./gradlew assembleDebug" and you can find .apk file in build directory.If it works, create pull request, I'll merge it and publish to app store.
The default state is ON (HIGH), that's why they light up by default. It is currently hardcoded in the source code, by you can change that to PinState.LOW https://github.com/sshlyk/switch-server/blob/maste...You still should be able to control the device. Check server-side logs to see if there are incoming requests whey you use the app. If not, make sure both server and client run on the same home local network. Keep in mind, that some public routers drop broadcast packets and client wont be able to discover and send requests.
I am using pi B and have not tried other models. As long as you can install pi4j library it will work since server is written in java. Server code and android app are opened sourced, feel free to make changesThx
You need to run it as super user. pi4j need super user access sudo java -jar /home/pi/switch-server.jar