Unfortunately I’ve found that Hubitat’s cloud url has a size limit on responses which after seems to throw a 502 error on their end. Using a small test app I’ve found this to be around 118Kb. With full logging enabled some of my larger pistons hit this limit when webcore needs to load the full instance data (devices and capabilities) along with the piston. Sometimes I can get around this by loading a smaller piston first so that the large instance data gets loaded along with it and then the other larger pistons will start to load.
Because of this limitation, I added two settings that let you run connect to a webcore instance on your local network. The first one you put the huburl and the second a url pointing to a local instance of webcore running on your network. I’m using a raspberry pi to host an apache web server pointing to the dashboard directory in the github repo. Below is my apache config to run the server on port 8082 where /var/www/webcore/ is a symlink to dashboard directory.
It’s a bit of work but it’s nice to have everything running on my local network.
webcore -> /home/pi/webCoRE/dashboard/
<VirtualHost *:8082>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/webcore/
<Directory "/var/www/webcore">
AllowOverride All
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>