I’m attempting to make the script for Pyiqvia work in openhab. I’ve got some knowledge in HTML,PHP and css, however this is python. I’m hoping someone can help point me in the correct direction on how to proceed.
I’ve copied the git and gotten it installed, updated it with my zip code and when I run the sample script it spits out the data… Now I just need to capture that and pull into habpanel…
the test_api.py outputs the following when run:
Allgergen, Disease, Asthma
Client instantiated for ZIP "68xxx"
Allergen Data:
{'Type': 'pollen', 'ForecastDate': '2020-03-15T00:00:00-04:00', 'Location': {'ZI P': '68xxx', 'City': 'OMAHA', 'State': 'NE', 'periods': [{'Triggers': [{'LGID': 4, 'Name': 'Maple', 'Genus': 'Acer', 'PlantType': 'Tree'}, {'LGID': 272, 'Name': 'Juniper', 'Genus': 'Juniperus', 'PlantType': 'Tree'}, {'LGID': 106, 'Name': 'E lm', 'Genus': 'Ulmus', 'PlantType': 'Tree'}], 'Period': '0001-01-01T00:00:00', ' Type': 'Yesterday', 'Index': 0.8}, {'Triggers': [{'LGID': 4, 'Name': 'Maple', 'G enus': 'Acer', 'PlantType': 'Tree'}, {'LGID': 272, 'Name': 'Juniper', 'Genus': ' Juniperus', 'PlantType': 'Tree'}, {'LGID': 106, 'Name': 'Elm', 'Genus': 'Ulmus', 'PlantType': 'Tree'}], 'Period': '0001-01-01T00:00:00', 'Type': 'Today', 'Index ': 6.6}, {'Triggers': [{'LGID': 4, 'Name': 'Maple', 'Genus': 'Acer', 'PlantType' : 'Tree'}, {'LGID': 272, 'Name': 'Juniper', 'Genus': 'Juniperus', 'PlantType': ' Tree'}, {'LGID': 106, 'Name': 'Elm', 'Genus': 'Ulmus', 'PlantType': 'Tree'}], 'P eriod': '0001-01-01T00:00:00', 'Type': 'Tomorrow', 'Index': 6.5}], 'DisplayLocat ion': 'Omaha, NE'}}
{'Type': 'pollen', 'ForecastDate': '2020-03-15T00:00:00-04:00', 'Location': {'ZI P': '68xxx', 'City': 'OMAHA', 'State': 'NE', 'periods': [{'Period': '2020-03-15T 07:30:21.073', 'Index': 6.6}, {'Period': '2020-03-16T07:30:21.073', 'Index': 6.5 }, {'Period': '2020-03-17T07:30:21.073', 'Index': 6.4}, {'Period': '2020-03-18T0 7:30:21.073', 'Index': 5.7}, {'Period': '2020-03-19T07:30:21.073', 'Index': 5.9} ], 'DisplayLocation': 'Omaha, NE'}}
If I’m successfull in getting this to pull this into Habpanel, or collect it into something like /static/html/pyiqvia.html then I hope to turn this into a widget that I can share with others. Right now though I’m just trying to get this to work.
Thanks for reading and if you have any advice I’m very grateful for it.