Patched webCoRE for Hubitat (2018/09/09)

Yes, I have also found Hubitat does not like spaces. I have replaced space characters with “%20” (ASCII code for a space) to get things to behave. Not sure if that will work for your situation though.

That works. Thanks.

1 Like

Well i tried this process but now im stuck at step 5. I try to fill in the endpoint url but it cant find it. I just fill in my serverip with port 2375. But it's unable to find it. Any clues?

@mjw-tan I use a non-standard port too.
Can you access the http://<webcore-local-server-ip>:2375 normally via your browser?
I hope you haven’t added a trailing slash after your port either.

Lastly, is your webcore local installation at the root of your web-server or within a sub-directory?
Ideally it shouldn’t matter, but I did find issues with sub-directories and mod-rewrite.

my webcore dashboard now refuses to load. Tried clearing cache but still getting error when loading the dashboard. Anybody knows how to fix it?

Really trying to avoid uninstalling and reinstalling it as i have quite a few pistons in there already.

rebooted the hub and was able to get on to the dashboard. However, can’t open any Pistons :frowning:

Update: created a new piston and now seems to be working again…

Can't acces it and i just did it in the root. It refuses the connection.

Found it, just had to use the local version haha

But getting the next error when trying to start the container.
standard_init_linux.go:190: exec user process caused "exec format error",

@jp0550, made it all the way through your instructions. whew! Now when I go to the browser (both on the rpi or another on the same network and put in my IP address, I get 403 Forbidden. I’ve doubled checked my IP address but not having any luck. Any ideas?

Thanks

Have you checked your permissions recently? I’ve had mine revert back on occasion.

This is literally a brand new setup. I just got the Rpi in the mail yesterday, set it up today.

To backtrack a little, I followed the instructions from post 90. The first part of that is to go to another site and follow some instructions. I did, including the test of the web server. The apache screen came right up. But now after going through the rest of the instructions. I get the forbidden screen. How/what should I be checking? Sorry, but don't know anything about linux or the Rpi. :grin:

HE-forbidden

Has anybody had any luck in getting external URL to work on webcore? Tried using the access_token and that would make the webhook from an external application to work, but nothing seems to be coming to the designated piston.

Access to files in Linux are determined by the permissions you set. I am not certain which of the files you need read and or write permissions. However as none of my stuff can be accessed outside of my lan, I’m not overly concerned about access to those files, so I set the permission for the entire webcore directory to read / write access. To set these permissions, go to the terminal and type “sudo chmod 777 -R /var/www/webcore/” or whatever directory you are using for your webcore.

No apology needed - file ownership and permissions is tricky and I was in your boat not all that long ago. I hope that’s your problem bc it’s an easy fix. I have a different app on a raspberry pi that reverts them back to locked down when I make major changes so that is one of my first troubleshooting checks when working with Apache on a pi.

thanks for the reply. So far no luck. But I think I found something interesting. I can change dir using cd www, then I do a dir and see two other directories html and webcore. I can cd html but I get an error if I try to go into webcore (cd webcore from the www dir). Says "no such file or directory". But again I can do a dir right away and it's listed.

I must have missed a step somewhere. Going to keep digging...

I had the forbidden message like you. I finally managed to sort it though.

I navigated using the Rpi File manager to /var/www/ and saw html folder that Apache installed but noticed the webcore folder was a triangular icon so I deleted it. (Think I had to use command line sudo rm /var/www/webcore)

Then I navigated to and opened pi/webcore and right clicked on index.html and selected properties then permissions and changed the one that said Nobody to Anyone.(or is Everyone?)

Then I re run the sudo ln -s pwd /var/www/webcore line from the instructions and it created the proper webcore folder in var/www/ and it all worked.

Hope it works for you. Fingers crossed

Did you rewrite the /etc/apache2/sites-available/000-default.conf? Double check the directory path in that file is the same where your webcore is loaded. You may also have the following directory: /var/www/html. When you try to access webcore, you could be getting directed to the /var/www/html folder instead of the /var/www/webcore folder. The default.conf file edit should fix that conflict.

This link is a very good explanation of file permissions and ownership. Understanding how this works will go a long way when hosting on a pi.

I just realized I left out the -R from the directions I first gave you. Adding -R changes the permissions for all the files under that directory. So, try: sudo chmod 777 -R /var/www/webcore/ or whichever directory your webcore is located.

Now I am apologizing to you. I wrote that reply late.

Thank you for everyone's help in trying to get this running on my Rpi but I'm just bashing my head against a wall. Who knows what I've screwed up at this point trying different stuff. Any way someone could just dump this setup on a card, email it, use dropbox or I could mail you my Rpi. It's brand new running Noobs(?) and just the stuff I tried to install on it. Feel free to private message me.

Just got to hope webCore doesn't go anywhere in the meantime. I know there is no indication that it will but I'd rather be safe than sorry. I could never do with RM what I do with WC, that's for sure.

Thanks again

and the marathon continues....my head hurts lol

@ajayjohnm, after having no luck with using the Rpi method....I'm now trying to use your method. But, I'm stuck on #4.

I used nano to create the docker-compose.yaml file but can not get it to work. I can see it when I ask for a dir or a ls but not when entering the sudo command.

and here is my file...

portainer:
    container_name: portainer
    image: "portainer/portainer"
    restart: always
    volumes:
        - docker/portainer:/data
        - etc/localtime:/etc/localtime:ro
        - /var/run/docker.sock:/var/run/docker.sock
    ports:
        - 9000:9000
    net: host

webcore-local:
    container_name: webcore-local
    image: "antage/apache2-php5"
    restart: on-failure
    volumes:
        - docker/webcore-local/www:/var/www
        - docker/webcore-local/logs:/var/log/apache2
    ports:
        - 8080:8080
    environment:
        - APACHE_ALLOW_OVERRIDE="All"
        - APACHE_MODS
        - PHP_MODS
        - PHP_SMTP="notareal.domain.com"
        - PHP_SMTP_FROM="notareal@emailaddress.com"
    net: host

Thanks

SO ...

Just to make sure I am clear-

I have all the bits running on a pi i had laying around ... installed and looks good on the webserver. The files I need to add into Hubitat Apps are found here ?

And just add them as any 'normal' hubitat app via app code import right?

Sorry if I am asking a REALLY dumb question ... working on a project for work and been up for almost 48h ... COFFEE STAT

Edit:

actually - Holy Hell it works ... so my ST will now be an orphan for devices that are not (yet) supported on HE
W00T

1 Like