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

Alerts #5

Open
glown opened this issue Nov 11, 2018 · 4 comments
Open

Alerts #5

glown opened this issue Nov 11, 2018 · 4 comments

Comments

@glown
Copy link

glown commented Nov 11, 2018

I really like this library. Thank you. I also see the decoupled json parser. Very nice!

I hesitate to ask since it looks like a can of worms, but have you thought about alerts? The data provided in the json file looks like a mess (lot of text possibilities to parse, etc), so it might not be worth it. But I was thinking about something basic; something that could be used to trigger the display of a screen icon, like fire alert, high winds alert, high heat alert, flood alert, etc ...

The upstream data looks a bit fuzzy like this data from an example on their website:
"alerts": [
{
"title": "Flood Watch for Mason, WA",
"time": 1509993360,
"expires": 1510036680,

but if alerts "title" was available I might parse the title for "Flood Watch" to generate a rudimentary list of which watches and alerts are active in my area and use it to flag the display of an icon. I'd avoid the alerts "description" since at first blush it looks like a minefield with a free form essay of indeterminate length; I'm sure there's a grammar underneath all the capitalized text, but I haven't looked at it that closely.

@Bodmer
Copy link
Owner

Bodmer commented Nov 11, 2018

Thanks for your interest and positive comments.

Yes, I postponed adding the alerts until I got everything else working for the single screen weather TFT display. As you noted the type of alert is just a string that contains all sorts of information, so I think that some warning alert symbol needs to be shown with the alert message on a different screen. To swap screen a button or touch screen press could be used, I am not overly keen on the touch screen as the sensitive film gets finger marks and scratched easily. I have experimented with gesture sensors, so waving a hand left or right changes the pages. What are your thoughts on this and what to display?

Are you using a TFT display in you project, if not what features are you looking for?

Recently I bought one of these TTGO bitcoin tickers to play with. It has quite a small 2.2" ILI9341 screen but is ESP32 based and there are 3 buttons that can be used to change pages. It also includes a Lipo charger, 4 Mbytes of extra PSRAM (good for Sprites) and a micro SD card holder. So it is not bad value. The TFT_eSPI library works great with it. So using the buttons is an option on that screen.

I have just uploaded a weather library for Apixu but I think the Dark Sky site provides better forecasts from me in the UK. I will probably write a library for the UK Met Office API but that is only relevant to UK weather. Ideally I would like to display satellite and rain radar maps but I am some way off that and most maps are in png format, so this complicates matters.

@Bodmer Bodmer added the enhancement New feature or request label Nov 11, 2018
@glown
Copy link
Author

glown commented Nov 11, 2018

I was thinking of using an area like the astronomy rectangle and rotating it with alert information. When there are no alerts, only astronomy information will be shown. But during alerts, rotate the content in the screen area every N seconds.

I've tested the idea of using a part of the display to show different information and it works well (or did, as soon as I started using the TFT-eSPI library since it refresh was wicked fast compared to libraries I used before).

I hadn't seen the TTGO bitcoin ticker and I am excited by the packaging. Surface mounting the electronics creates a very nice device -- I try to keep my projects as thin as possible, but can't beat anything like this. I should order today might even get a good price since it's the big 11.11 extravaganza.

@Bodmer
Copy link
Owner

Bodmer commented Nov 11, 2018

OK, the text alerts are quite long according to this pageand newlines are inserted after ~65 characters maximum:
https://darksky.net/dev/docs

I will experiment, I guess a look at the global weather via Google should tell me where there are alerts to test the code with!

The TTGO bitcoin tracker has an antenna that is much more efficient and a Grove I2C connector for sensors, so it is quite a nice package.

I just 3D printed this case for it:
https://www.thingiverse.com/thing:3099913

Only to find the strip header would have to be cut down or un-soldered to fit or a slot has to be cut in the case.

@Bodmer
Copy link
Owner

Bodmer commented Nov 12, 2018

There are a few TTGO variants, a small 1.44", a 2.2" for the bitcoin ticker and a 2.4" with audio out.

I have just ordered one with audio out to play with, though this one has a different power switch and it looks like no added 4Mbytes of PSRAM so I think the 2.2" ticker display module is a better deal.

@Bodmer Bodmer added TBA: enhancement and removed enhancement New feature or request labels Nov 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants