WebCore and Suncalc attribute Azimuth missing

I am trying to write a piston to use the azimuth attribute from the SunCalc device but the only attribute that shows up is altitude. The driver has both listed but WC dropdown only shows [Suncalc : altutude]
attribute "altitude", "number"
attribute "azimuth", "number"

Is this not a valid attribure to pass to WC?

EDIT: I changed the driver var from azimuth to latitude and it now passes the value even though it's the wrong typename.

Few things:

  • would need to see the webcore dump of what it found with the original driver (unmodified)
    • this is done via enable full debug on main webcore
    • use the original driver (unmodified)
    • go to HE console -> apps -> webCoRE -> Engine block -> dump devices result

and then cut out the portions for the device/attributes in question....this will show you what webcore discovered and is sharing with the webcore IDE for editing

  • the latest webcore (manually update due to platform issue with HPM), that has been out a couple weeks
    • the $weather should have within it (if you have it configured azimuth and altitude based on your location:

    • HE console -> apps -> under webcore, pick you webcore storage -> dump weather structure

Screenshot 2024-01-19 at 10.21.49 PM

which can be accessed $weather.altitude or $weather.azimuth

Ok, just tryng to get you some info.
I have the attribute dump.
I can't see any Storage options here: * HE console -> apps -> under webcore, pick you webcore storage -> dump weather structure.
This is all I have for weather plus the lat/long underneath:

I have a WC weather device set up but it yields no attributes except "updated"

If I type anything in a piston with $weather.xxxx all answers are 0 so I must have somthing not set up right?

  │     ├─ n: (Sun Calc) (String)
  │     ├─ cn: [List]
  │     │     ┌─ [0]: Actuator (String)
  │     │     └─ [1]: Sensor (String)
  │     ├─ a: [List]
  │     │     ┌─ [0]: (Map)
  │     │     │     ├─ n: (azimuth) (String)
  │     │     │     ├─ t: (NUMBER) (String)
  │     │     │     └─ o: (null) (unknown)
  │     │     ├─ [1]: (Map)
  │     │     │     ├─ n: (altitude) (String)
  │     │     │     ├─ t: (NUMBER) (String)
  │     │     │     └─ o: (null) (unknown)
  │     │     ├─ [2]: (Map)
  │     │     │     ├─ n: (lastCalculated) (String)
  │     │     │     ├─ t: (STRING) (String)
  │     │     │     └─ o: (null) (unknown)
  │     │     ├─ [3]: (Map)
  │     │     │     ├─ n: (lastActivityWC) (String)
  │     │     │     ├─ t: (datetime) (String)
  │     │     │     └─ o: (null) (unknown)
  │     │     ├─ [4]: (Map)
  │     │     │     ├─ n: (roomIdWC) (String)
  │     │     │     ├─ t: (integer) (String)
  │     │     │     └─ o: (null) (unknown)
  │     │     └─ [5]: (Map)
  │     │          ├─ n: (roomNameWC) (String)
  │     │          ├─ t: (string) (String)
  │     │          └─ o: (null) (unknown)
  │     └─ c: [List]
  │          └─ [0]: (Map)
  │               └─ n: (refresh) (String)

The $weather data is in the child app (under webCoRE) called

webCoRE [your location name] Storage

ie under HE console -> apps -> webcore -> above name

If you click on it, you should see something like:

and if you select that, you should see what I posted above if your webcore is to latest code (as of couple weeks ago)

The device list information at first pass, looks correct, so may need a private note with more details on what you see with the original driver to try to reproduce.

  • I may need to see where the source for that driver is. (Or I have an old one installed)

I have no Storage but the code is installed.
Suncalc never got past 1.0.0 https://github.com/augoisms/hubitat/blob/master/sun-calc/sun-calc.driver.groovy

See webCoRE for Hubitat Updates - #3 by nh.schottfam

So I installed the driver and a simple piston, and see all the attributes from that driver:

the carot or pentagon means custom attribute

There are other drivers that have an altitude attribute, so webcore thinks it knows it. Should not matter beyond the ide display

Yes I see it's in the condition but you can't make an expression as it's missing.
I am wondering if my WC install is corrupt. All my pistons seem to operate fine but...
I spent many hours trying to figure out why the expressions were calculating incorrectly.
Every element in the exp had the correct value when standalone but when I did some simple math with 2 elements with values of 240 and 15, 240-15 I get -9.
I tried to multiply a number by -1 to change it's sign an all I ever got was -1 for the answer.
I found the only way to get the real answer to an exp was to save the piston and re-edit the statement.

I'll look at #3 and try to figure out if something is awry.
I have no Webcore storage app anywhere so this confuses me.
I also show Graphs but I don't have that code loaded.

Is there an option to clear the cache or rebuild soemthing to get Storage to show up and Graph to go away? I don;t want to just click on things lest I corrupt the whole thing.

Thanks for helping.

FYI I gather you are saying custom attributes can't be used in expressions but can be in statements so just use the work around?

there you can just type azimuth after the : and it will take it and use it.

I can ask @ipaterson if in that location it can offer attributes to the specific device, but I expect the expression could be variables, so it get complex quickly

But it does work if you just enter the attribute name

I just tried the original driver code and : azimuth works now.
I tried it many times before and I just kept getting RED, Invalid ..... so :slight_smile:

So confused, every $weather.xxxx i tried gave me 0, now it seems to return values although incorrect


I still have no WebCore Storage in HE | Webcore| and Graphs (with no code installed) but things are better.
The only change I made was "Clean up and rebuild data cache".

It seems possible to rewrite the suggestions to be much more powerful. That seems like a very fun mini project when I get some time. Right now it just shows all physical device attributes whenever you type the : character anywhere in an expression.

I posted an update for webcore to clean up the calculation in the $weather area.


Yes, I saw. Thank you.
Tried $weather.azimuth and the number is correct ATM. :slight_smile:

Since I figured my WC instance is a bit dodgy I installed the built-in version to move over.
I was surprised to see NONE of the Storage links you have been referring me to.
Where is this bu@@er hiding! :slight_smile:
I still gave Graphs on the new one but maybe the HE install loads everything by default.

Fixed this - loaded Fuel Streams, never used it so not loaded.
My working version says this on Graphs:

Error 404

App type not found for namespace: ady624 and name: webCoRE Fuel Stream

If you are seeing this screen repeatedly, please visit support.hubitat.com.

The storage app is created when you configure weather in webCoRE main app

HE console -> apps -> webcore 'location' -> settings -> fill in area on enable $weather via external provider then done /next your way out

While there you can check that Use local fuel streams is enabled

I'm back in grade school it seems, not getting it :wink:
I have always had this stuff filled out.
I do have an app in Apps Code -> webCoRE Storage
But where do you access this app when you are asking me for debug details?
I don't have this location you refer too:

"webCoRE [your location name] Storage
ie under HE console -> apps -> webcore -> above name"

These are the only slections I have:

So after you configure that, you then go to

HE console -> apps -> under webcore main, find the storage app and click it

and click it

The thing is I don't have anything like your snippets, no WebCore xxxx Storage anywhere.
You have a gear and a selection box with the name, I have nothing that looks like this for anything.

Under WebCore main you can see I only have Dashboard, Browser, Settings and Graphs.
Under Settings I just have weather and Fuel Streams

If I try Add a User app only the main WebCore app is listed so I can't just add the storage app standalone.

Sorry for the bother but my install must be faulty, that's all I can think of.


What I'm showing you is not going into the webcore main app

I'm looking at the child apps below it:

ie HE console -> apps -> below the webcore main app, look for one of the children....

For me I have to scroll way down to find it....

Oh crap. :wink:
I thought all that was just a list of pistons; an alternate way to access them.
I never use that list for anything.
Yes I see WebCore Storage :disappointed:

Sorry for all the confusion.