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. @nh.schottfam
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
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"
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)
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
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.
Yes, I saw. Thank you.
Tried $weather.azimuth and the number is correct ATM.
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!
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
I'm back in grade school it seems, not getting it
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"
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.