Patched webCoRE for Hubitat (2018/09/09)

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 GitHub - jp0550/webCoRE: webCoRE is a web version of CoRE 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.

This is what I have seen.
image

Looks like you're still hitting the external fuel streams (which don't work)

Reasons for this could be:

  • Don't have new dashboard code branch or a cache issue (can check by going to F12 in chrome, clicking sources, clicking js/app.js and looking for the listFuelStreams function like in the screenshot. You should see changes like "instance.fuelStreamUrls"

  • Local fuel stream setting is not being picked up. Maybe try clicking save while on the settings screen that you were one before. You can confirm it's working by going to apps and looking for the new fuel stream after you write to it you should see it underneath the app section:

  • Some bug is messing things up somewhere. Try checking the logs when you write to a fuel stream or try to pull them and look for errors.

Most likely it's bullet point #1 as your screenshot shows your are still on v0.3.105.20180628 when it should be v0.3.107.20180806

I noticed the date error when I posted the screenshot.
Also the fuel stream I defined is not defined as a fuel stream.


At the bottom of my piston list I do have this though.

Also in the piston groovy I have this.
image
Which makes me think the code is at the latest version.
Very strange.

Just for clarification, where should I go in the github repository to get the latest file versions.
I use the repository at the start of this thread. Is that correct?

OK. Found the issue. I had to go in and clear the cache even though I had completed a hard refresh.
Thanks for your help.

1 Like

@bravenel @chuck.schwer

How do child apps that are managed only with the parent use "settings." Webcore uses these for caching devices (mainly) and for other metadata. I have not found a way to create a setting using only the app api methods.

app.updateSetting('bin', [type: 'text', value: state.bin ?: ''])
app.updateSetting('author', [type: 'text', value: state.author ?: ''])

These are some examples that never set the setting. In smartthings, if it did not exist, it would create the setting for you. In Hubitat, without having it on the app settings page and clicking install, these type of calls are not working in child apps (which isn't feasible in webcore since the user never manages the child apps themselves). Is there a way to get these working? Without it, with the latest update's changes, it takes several hundred milliseconds to grab the devices from the parent app.