Patched webCoRE for Hubitat (2018/09/09)

Has anyone run into an issue with particularly large or complex pistons? I have a piston that runs fine on SmartThings but moving it to Hubitat results in errors and warnings in the log when I attempt to edit it.

2018-08-08 13:54:18.383:errorjava.lang.NullPointerException: Cannot set property 'timing' on null object on line 1114 (api_intf_dashboard_piston_get)

2018-08-08 13:54:18.373:warnTrimming 139KB response to smaller size

Pushed a fix up for you. If you already had the latest, you just need to update webcore.groovy.

@jp0550 how does push notifications work ? I use pushbullit or notifications dont work ?

NM saw the answer above

Just realised this but for some weird reason when using a Philips Hue bulb and using webcore to set a colour, the default level will always jump to 50%.

Example.

Set level - 10%
Wait - 5 sec
Set colour - Red

It goes to 10% and after 5 secs, it changes colour and the brightness will be 50%.

Is anybody having this issue?

Yes, I'm definitely having issues with the level changing when I set a color. I've never tested to see that it was 50%, but my intention was to set it very low (around 1-5%) and then change the color, and I figured this out when I noticed that the bulb was much brighter than I expected when I did it in that order (level, then color). I worked around the problem by setting the color first and then changing the level. Not sure if this ever happened on ST, but I know in general different bulbs might behave differently so it's not too surprising to have to play around with the order of actions to get everything the way you want it with lights in webCoRE.

Does this happen when you change the color for it in the driver page for the bulb or only in webcore?

Tried directly on the driver page and no issues over there - I think.....setColor - Red, Hue-0.

I also tried this and the level stayed at 50%.

Set colour - Red
Set level - 5%

It wouldn’t go down to the 5% level. Played around with all the different arrangements as suggested by @bertabcd1234 with not much success. Only fade to level worked.

That is odd--I have what sounds like the exact same thing working for me:

If you're controlling a lot of lights at once, the Hue bridge is rate-limited and if webCoRE/Hubitat sends a bunch of individual commands, I'd almost think that might be the problem except you say fade works, which I'd assume would run into the same issue. I've also seen some third-party bulbs paired to Hue not respond as fast as Hue bulbs (IKEA Trådfri, in particular), which might cause problems with commands in rapid succession (even with my Hue Dimmer paired directly to Hue I have to wait a second or two between switching scenes for them to catch up or they'll not match what I configured).

I tried that exactly that with no luck. I am however connecting the Hue Bulbs directly to HE - not using the Hue Bridge.

Ah, I'm using them through the Hue bridge, so I guess that could explain the different behavior. But I guess it's still true that different bulbs have been known to behave differently in webCoRE. Maybe try experimenting a bit more (unless fade is fine with you)--I've been known to issue the same commands twice (e.g., set level, set color, set level) just because that's either what made it work or I wanted to be extra sure (so my "night mode" hallway light doesn't blind me, for example). :slight_smile:

I can't seem to get webCoRE to remember which devices to use. In the settings I select which devices to include, hit Done, and when I go back nothing is selected. I've reinstalled. Can't do anything in the dashboard at the moment.

So this sounds strangely similar to what happened to me when I first setup webcore. In my case it was user error.

From this list it seemed totally reasonable that the button I wanted was the Available devices and contacts. Tried several times with the same result you are seeing.

When I clicked where it says hubitatwebcore all my troubles went away... I figured I would share in case you are doing the same thing I was....

image

2 Likes

aHa! Thank you! Tinkering on...

App Update

Good news for those who have been wanting fuel streams for hubitat. With the latest update, I've have made them completely local to the hub! For now you'll need to have a local webcore server running for the ui to reach them, but I've been talking with ipaterson on the webcore forums and he is going to be merging the UI changes dashboard.webcore.co in a few weeks. You just need to install webcore-fuelstream.groovy and have a local UI instance for now. There is a section in the app settings to manage them. The default size is 95KB per stream and that can be adjusted to meet your needs. Once over the limit the app will remove the oldest points to bring it under the size limit.

The code has also been changed so that it works for both Smartthings and Hubitat with just a change with the import statement below for the piston.groovy source.

import hubitat.device.HubAction
import hubitat.device.Protocol
//import physicalgraph.device.HubAction
//import physicalgraph.device.Protocol

This also includes a fix for the location id bug in Hubitat, along with the latest UI changes from ipaterson. Be sure to logout and do a hard reload of the dashboard once updated.

If you are running a local instance don't forget to run these commands:

cd
cd webCoRE/
git pull

Also, if you haven't switched from @ajayjohnm's repo to mine, run these before doing the above:

Patched webCoRE for Hubitat (2018/04/10) Code Share

@Matthew Try this: cd ~/ cd webCoRE/ git remote set-url origin https://github.com/jp0550/webCore.git git fetch origin git reset --hard origin/hubitat-patches Make sure you do git reset --hard origin/hubitat-patches above as it's showing as a comment but should be fully pasted.

4 Likes

I've just followed this and defined a fuel stream.
Unfortunately when I click on 'Fuel Streams' all I get is the spinning webCoRE circle.
I have logged out and back in again.
Here is a screenshot from my RPi. Does this look correct? Any ideas why this does not work for me?
image
The new fuel stream directory has been defined OK and has the groovy code inside it.
image

The code for the raspberry pi is only for the dashboard directory for the website. Did you update all the apps in the ady624 and install the new app webcore-fuelstream in the app code section on the hub?

I have been to the github repository and updated the original 4 files and defined the fifth one. (Fuel stream groovy file) in the Apps of the HE.
I then followed the instructions as per post 474.

In the app settings page, underneath where you usually set your devices, is local fuel streams checked?

If it is, did you do a hard reload of the dashboard by holding down Ctrl and F5 while on the webcore ui?

If it's none of those I'd try navigating to it in incognito mode or checking the log output while writing or viewing the fuel streams.

Yes. It is 'ON' as you show above.
I logged out and logged back in again AND did a hard refresh.
Before I did this I was getting the 'New Version Available, please hard refresh' banner.
This has stopped since I have completed the above.

Anything in the logs? If you hit F12 in Chrome right before you click the link, and hit the networking tabs you should see a line like this indicating it's hitting your local instance

where the link is list, your hub ip is at the bottom, and your access token is at the top.

Download the Hubitat app