Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local vs. DarkSky values #12

Open
bsculley opened this issue Nov 21, 2018 · 3 comments
Open

Local vs. DarkSky values #12

bsculley opened this issue Nov 21, 2018 · 3 comments

Comments

@bsculley
Copy link

I'm thinking of implementing this idea using Node-Red, which has available nodes for both retrieving data from DarkSky and sending data to InitialState. Before beginning, I would like to know why the local data from SenseHat (or elsewhere) uses different (and not very intuitive) field names than the DarkSky data, for example, the local temperature is recorded as "sunny":

streamer.log(":sunny: " + SENSOR_LOCATION_NAME + " Temperature(C)", temp_c)
streamer.log(":cloud: " + SENSOR_LOCATION_NAME + " Pressure (mb)", pressure_mb)

while the data from DarkSky is recorded as "Temperature":

streamer.log("Temperature",curr_conditions['currently']['temperature'])
Why not just substitute the local value for the one from DarkSky?

@jrbail01
Copy link
Contributor

jrbail01 commented Nov 21, 2018

What you are seeing is just a data stream name being built (string). The :sunny: part is simply an emoji token that gets replaced by an emoji in Initial State (see https://support.initialstate.com/hc/en-us/articles/360002915551-Emojis ). SENSOR_LOCATION_NAME is just a global variable that you can set at the top. The result is something like "☀️Office Temperature(C)" for the data stream name.

@bsculley
Copy link
Author

Thanks for the reply. Maybe I'm just being thick, but can you tell me by what data key the dashboard will reference the local temperature?

Thanks.

@jrbail01
Copy link
Contributor

jrbail01 commented Nov 21, 2018

When you stream the local data into your Initial State account in this statement:
streamer.log(":sunny: " + SENSOR_LOCATION_NAME + " Temperature(C)", temp_c)
you are creating a stream key named something like :sunny: Office Temperature(C). That stream key will contain all values of the local temperature from the sense HAT. For the local temperature from Dark Sky, that stream key name will be Temperature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants