Patched webCoRE for Hubitat (2018/09/09)

Does the External URL feature work for pistons yet?

In my experience /dashboard folder is to be used as the root of the website.

I’m not a *nix guy by nature, but from what i can tell the edits i mention above are to apache2/conf/httpd.conf

My Ubuntu default adds an html folder which has caused me some headaches in setting up servers - /var/www/html. However, I think the edit to the 000-default.conf file above corrected that problem? My other servers run out of the html folder and not the www.

I had the same issue. I actually had to remov the device and add it back. My GE Link bulb (ID: 1) gave issues

Installed webcore and created a standard piston where a virtual switch would trigger a series of switches to turn off and change the mode. Get this in the webcore logs:

║An error occurred while executing the event: groovy.lang.MissingMethodException: No signature of method: com.hubitat.hub.domain.Location.hasCommand() is applicable for argument types: (java.lang.String) values: [off]

Sounds like the location id bug. Does the name of the device show as the name of your hub in the piston? You’ll need to remove the device from the hub (completely remove from the device edit page) and re-add it so it has an id different than 1 in the system.

1 Like

I’ve fixed the error in the code that prevents it from running (it used to try and grab request headers which you can’t do in hubitat) but the UI has yet to be updated. You can use the link in the piston but you need to add the access_token parameter for it to work "&access_token={token_here}. You can find that by clicking the “i” on the apps page for the main app.

I've had some bad stability issues lately. The hub would freeze up every 5 hours or so until the db finally corrupted. After the automatic restore it did, it seems to be running a lot more smoothly. So it might be worth taking a backup and restoring it immediately after if others are having trouble as it cleared mine up (at least for now). I've only tried this once, though, so it might be other things. I have another hub which doesn't have webcore installed that was acting up too so I'm not sure if webcore is the culprit. I do recommend disabling zigbee if you don't have any devices using it as that cleared up that hub's issues.

So I am having issues with a piston - making a http get request to my local server fails with a 400 error.

The exact same piston works fines in smartthings. As well from any other device I try I get the response I am looking forward. Only requests from the hubitat hub fail with this 400 error.

Here are lines from my access logs in apache. One showing a success from smartthings and the next showing a failure from hubitat. Is there some bug is how hubitat is sending the request?

192.168.1.111 - - [17/Apr/2018:20:40:26 -0700] "GET /test.cgi HTTP/1.1" 200 309 "-" "Linux UPnP/1.0 SmartThings"
192.168.1.129 - - [17/Apr/2018:20:44:11 -0700] "GET /test.cgi HTTP/1.1\n" 400 0 "-" "-"

That did it.

So I also have the Pushover Driver installed. I tried several ways to have webcore send a push notification using the push driver… any thoughts?

The Pushover Device Driver supports two capabilities - Notification and Speech Synthesis.

If webCoRE can natively support calling either the

deviceNotification(message)

or

speak(message)

commands, you should be able to easily use Pushover for notifications.

Yes. Testing now… I’m used to the command Push Notification. Trying just notification.

I use it all the time. Just select "Action" -> physical device -> "your pushover device" and select the "notification" command. Works a treat.

Just want to add that I was getting mixed up on the Z-Wave ID vs the system ID of the device. I thought that the comments around the "Home" device were referencing the Z-Wave ID and not that Hubitat uses a 1 for the ID of the first device added.

If you see something like this, then know that you are running into that device issue and the current workaround is to completely remove the device from Hubitat then add it back so it gets a new ID. You can check this by clicking on the device and looking for "/device/edit/1" in the URL.

image

Does Fuel Streams work with HE?

I just tested it and the command “writeToFuelStream” executes (as seen in the HE Log) but I see nothing in the Fuel Streams page.

Is there something I need to do before I can use Fuel Stream?

No luck. Spent 6 hours on it today, can’t figure it out and giving up. Maybe someone will post here on what to do. Looks like it’s all related to Rewrite in Apache but not strong enough in Apache/web design to figure it out. Looks like it takes about 5 minutes to setup on the RasPi, no idea when it’s so complicated to get running on Ubuntu; permissions are 777 across the board

Ok so I found the code that needs to be updated to make Fuel Stream work with HE:

line 3346:


    if (asynchttp_v1) asynchttp_v1.put(null, requestParams)

line 3366:


if (asynchttp_v1) asynchttp_v1.put(asyncHttpRequestHandler, requestParams, [command: 'storeMedia'])

I know these “asynchttp_v1” and “asynchttp_v1.put” needs to be replaced. “asynchttp_v1.put” would be replaced by “httpPut” but what about “asynchttp_v1”?

Also, how do I format the arguments for “httpPut”?

I tried the following codes but didn’t work.


httpPut(null, requestParams)

httpPut(asyncHttpRequestHandler, requestParams, [command: 'storeMedia'])

Try adding this after the async code (or you can remove it if you’d like)

httpPut(requestParams){ resp ->
     log.debug "Sent data to fuel stream"
}

Thanks. Just tried this and I’m getting an error in the HE Log now:


2018-04-18 14:08:38.713:error║║ Error executing virtual command [Master Closet Motion Sensor].writeToFuelStream: (391ms)

[2018-04-18 14:08:38.709:debug Sent data to fuel stream

Still not getting any data written into Fuel Streams.

I’ll take a look tonight to see I can find the issue

1 Like