[NEEDS UPDATING] Raspberry Pi Relay Controller (WebIOPi)

check out this thread, one of the smartthings members was kind enough to due a great write up…

1 Like

Thanks! Looks very interesting indeed.

Help! I have been trying to webiopi working on my Pi3 with jessie. I’ve downloaded and installed the pi2bplus patch. The service is running (and starting automatically on reboot), but I’m not seeing “in” or “out” next to the pins. I’ve looked at MANY forums and seen/tried a variety of things to no avail. Does anyone here know a way to make this work?

Found the answer here. https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=98981
Made these changes:
1.python/native/cpuinfo.c,change “BCM2708” to “BCM2709”;
2.python/native/gpio.c, change “#define BCM2708_PERI_BASE 0x20000000” to “#define BCM2708_PERI_BASE 0x3f000000”;
3.run setup.sh again.

Works like a charm.

Got everything installed. WebIOPi working. Using LED to simulate relay. Can turn LED on and off through WebIOPi Header page. Created device in WebOIPiManager smart app. Device shows up under Things. Pushing button changes icon from Off to green On. But LED does not light.

Any ideas on what I might be doing wrong?

You might be tripping over bug that sends the wrong string to the PI. One way to tell is if you set the GPIO to on using the web interface on the PI you can then turn it off with the device under ‘things’. If this works then a workaround is to go back into the smart app and edit the GPIO settings. For some reason this recreates the devices with the correct string.

Take a look further up the thread where this is discussed in more depth.

Wondering if it’s possible to reverse the logic of ON/OFF in the SmartApp so that in the App when it says ON, the GPIO pin is 0 (not 1).

@iBeech Any way you could make a device handler for a contact sensor hooked up to the pi?

If I have two temperature probes, and only call one as a device it reports the temperature correctly. As soon as I add the second probe, both values report the same (even though webiopi shows two different values).

I have re-installed from scratch and now I see what is going on, or at least I can report what is going on. If I add a single temperature sensor, in the “recent” activity screen in the smartthings app, I see the single source temperature reading. If I add a second sensor, no matter what individual virtual temperature sensor I select, I see the data for each temperature reading one after the other. This happens even if I add a second temperature sensor from a different device (like a different raspberry pi.

I’m not sure if anyone else is using multiple DS18B20 sensors - they work fine with webiopi, they just don’t get read correctly by the smartapp.

Any ideas?

Reply to dbrew Jan 12 posting: Thanks for both posts, I did have that issue on the app only and your recommendations seemed to fix the problem on the app but now the webinterface seems to get out of sync and does not respond. Rasbian on pi3b

Just wondering if you found a solution to reverse the logic? I am also in need of this.

Nope - I’ve given up

To reverse the switch logic its two changes… in the DTH swap round the “case 1:” and “case 0:” on lines 68 and 71 then in the SmartApp swap the “1” : “0” on line 340.

Nick

1 Like

I got this working by editing line 181:

theDevice.deviceNetworkId = theDeviceNetworkId + “.” + deviceConfig

to

theDevice.deviceNetworkId = theDeviceNetworkId // + “.” + deviceConfig

Ho you all,
Well is webIOpi working on Raspberry Pi 3 or not? Some are saying yes and some are saying no.
I followed initial steps and everything installed with no problem at all. I went and opened port 8000 on the router to point to my Rpi3 where WebIOpi server is located. I try to access the web page for the GPIO but this is what i get
192.168.1.96 unexpectedly closed the connection.
ERR_CONTENT_LENGTH_MISMATCH

I tried to do the patch and follow the steps here https://github.com/doublebind/raspi
and again it doesn’t work.
Like i said every step that i take on SSH to do the installs and the patches give absolutely NO errors, everything seems to install just fine. Just no luck on accessing the webIOpi page.
When i try http:192.168.1.96/webiopi i get this:

HTTP ERROR: 404

Problem accessing /webiopi. Reason:

Not Found

Powered by Jetty:// 9.3.z-SNAPSHOT

What can i do are there any tips someone can give from the ones that have it working on Rpi 3 ??!!!

Thank you
Denis

So i am reaching out to all you fellas that use Raspberry Pi 3 and have reported it working with webIOpi.
@camhissey @dbrew @Scott_Sandler and of course the main guy @iBeech .

I have installed everything the webIOpi server and the patch for Rpi3 from one of the posts above and everything installs without any problem at all (tried it 2 times) its says … OK the server started …etc i have also forwarded port 8000 to the pi on the router. however when i go to a web browser and try to access the interface this is what i get:

192.168.1.96 unexpectedly closed the connection.
ERR_CONTENT_LENGTH_MISMATCH

How did you guys get it running on yours… what do you think is causing this??
Please any help will be greatly appreciated it

Thank you
Denis

I ran into the same issue, before installing the patch.

Be sure you are in your WebIOPi-0.7.1 directory

pi@raspberrypi:~/WebIOPi-0.7.1

Then install the patch:

$ wget https://raw.githubusercontent.com/doublebind/raspi/master/webiopi-pi2bplus.patch
$ patch -p1 -i webiopi-pi2bplus.patch

Then re-run setup:

$ sudo ./setup.sh

Then restart the webiopi service:

$ sudo /etc/init.d/webiopi restart

After I performed those steps I was up and running:

Thank you so much for writing me back
Yes i am up and running too to a certain point … i can see the web server of WebIOPi and the links work fine just like in your picture. However when i go into the GPIO Header or GPIO List and i click on the IN or the GPIO headers nothing happens it does not change to OUT and the relay does not click. I know i have the relay connected correctly i can run a py script that i downloaded from the internet to test and relays click on and off just fine into the right GPIOs. It is just that the WebIOPi does not control them. I tried to reinstall the patch and it said that the patch is already run and no changes have been made i tried to change the GPIO and none of them work. I also installed the smart app and the device handler with the desperate hope of maybe the ST app will control them but no luck their either LOL.

Ok so as i was writing this i uninstalled the patch and than reinstalled it again and restarted the WebIOPi service now when i use Google Chrome there still is nothing happening however when i use Internet Explorer and i click on the GPIO “buttons” the IN changes to OUT and the color changes from orange to black on GPIO figurine but the relays are still not clicking. When i run the test py script through Putty and the webIOpi web server/site is up showing the GPIO status the relays start clicking normally form the script being executed and the they change just fine on the screen from IN to OUT and form Orange to Black just as they are supposed to so webIOpi picks up the status of the GPIO just fine only still no website control at all from the webIOPi interface. How is this possible ???
I am baffled and if i solve this i will be screaming of joy cause this one Raspberry Pi is doing 2 great thing for me and this is the 3 thing that will just round everything up and i seem to be so close.

Thank you again any input will be greatly appreciated and will boost my confidence to keep digging on this
Denis

Sounds like there may be something blocking the functionality in your Chrome browser. I’m using Chrome and the functionality is working for me.

Try running it without any plugins enabled.

I will in just a little bit however the relays are still not clicking form the Internet Explorer either the status changes just fine though. so it seems like the browser and/or my pc is not communicating into the PI but its is getting information out of it.
Do you think maybe a port forward is necessary in my router, or maybe my router is blocking it??