Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

[VD] AirVisual AQI


Question

Posted (edited)

Getting @Sankotronic code and modified to fit with AirVisual API (

Please login or register to see this link.

), I can proudly introduce the first version of AirVisual AQI (Air Quality Index). 

 

SPECIAL THANKS

to  @Sankotronic for original code of weather forecast VD

 

AirVisual VD Description

AirVisual VD is on standalone version till now. The idea is to be added as part of UHAS. It comes with community AirVisual API. I hope to get some tests on Enterprise AirVisual API and include data for owners of AirVisual Pro device.

The features that this version includes are:

  • Retrieves data from AirVisual.com according to your lat/lon of HC
  • Possible to manual adjust your coordinates
  • Push and/or popup notification can be sent to mobile devices.
  • Keeps track of previous measurements, so it display if value increased/decreased.
  • Multi-language. Still need some work to be done here.
  • Global "AQILangName" and "VirtualTableName" tables is automatically added when first AirVisual VD  is imported and it is added to predefined part of the variable panel so pressing SAVE button in variable panel will not destroy it.
  • Can have more than one VD for different places as it stores data to different table variable of each VD.
  • Main loop of VD runs every 5 minutes but it requires change if you need to have more than 1 VD, because Community AirVisual is limiting requests/day.
  • VD Icon change according to US standards measurements, as they are more close to EU standards.

 

Please login or register to see this image.

/monthly_2019_05/image.png.e7e89d7c03cff0c4fe2c02b9e8536e1c.png" />

image.png.965070b69db53fef24f47f36b4ebc758.png

 

Most of the changes that have to be done are placed on the top of Main loop of VD 

You need to register an account to airvirtual.com and create a new API key. After  add it to the following line

Please login or register to see this code.

 

Select if you like to get coordinates by HC2 settings or manual

Please login or register to see this code.

Select your preferred language to display on VD GUI. If you leave it blank, English will be selected.

Please login or register to see this code.

Select the time of day that you like to get information by popup/push. In Community Edition you will not get any forecasts.

Please login or register to see this code.


Here you can set preferred time format

Please login or register to see this code.

Configure the id of every icon. It is recommend to use HC Icon preview VD.

Please login or register to see this code.

 

There is only a part for user configuration on notification button section.

 

Please login or register to see this code.

remove comment if you like to use HomeTable for identify mobile deviecs

Add the device id inside the brackets that you like to get popup/push messages

Select if you like to send push messages and popup messages..

 

 

That's for now, more to come. Waiting for your feedback/improvement comments!

 

Best Regards,

Zacharias 

 

 

 

Please login or register to see this attachment.

Edited by FSE
  • Like 5

2 answers to this question

Recommended Posts

  • 0
Posted

Hi @FSE ,

 

Very nice VD! I have one already running on my HC2. Thanks for sharing!

  • 0
Posted

Indeed a nice VD :)
Since a few days it stopped working and giving following error: 

[ERROR] 10:59:24: line 26: Expected value but found invalid token at character 1
[ERROR] 11:00:03: line 26: Expected value but found invalid token at character 1
 
I've  created a new token and still the same. :( 
 
@FSE any idea?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...