forecast.io module

472 views
Skip to first unread message

Nolan

unread,
Aug 1, 2015, 12:38:39 PM8/1/15
to Home Assistant Dev
15-08-01 12:29:02 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform forecast
Traceback (most recent call last):
 
File "/home/pi/home-assistant/homeassistant/../homeassistant/helpers/entity_component.py", line 135, in _setup_platform
   
self.hass, platform_config, self.add_entities, discovery_info)
 
File "/home/pi/home-assistant/homeassistant/../homeassistant/components/sensor/forecast.py", line 87, in setup_platform
   
import forecastio as forecastio_
ImportError: No module named 'forecastio'


I tried adding the forecast.io component but it couldn't find the module.  pip didn't have it either...How do I install the forecastio module?

Thanks,
Nolan

Ryan Kraus

unread,
Aug 2, 2015, 3:43:18 PM8/2/15
to Home Assistant Dev
pip install python-forecastio>=1.3.3

Nolan

unread,
Aug 3, 2015, 7:43:16 PM8/3/15
to Home Assistant Dev
I gave that a shot and it installed okay but I'm getting the same errors from HA.

(home-assistant) pi@raspberrypi2 ~/home-assistant $ pip list | grep forecast
python
-forecastio (1.3.4)

Ryan Kraus

unread,
Aug 3, 2015, 7:52:09 PM8/3/15
to home-assi...@googlegroups.com
Make sure you are running in the correct Python environment when you run that pip command. If you are running home assistant in a virtual environment, you'll need to also run pip in that virtual environment (usually activated with the source bin/activate command). Hopefully that helps. 
--
You received this message because you are subscribed to a topic in the Google Groups "Home Assistant Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/home-assistant-dev/gpVfPBmD8bw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to home-assistant-...@googlegroups.com.
To post to this group, send email to home-assi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/home-assistant-dev/27802990-8af4-4770-9ab3-5170ad07a6e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks,

Ryan Kraus

Nolan

unread,
Aug 3, 2015, 9:43:50 PM8/3/15
to Home Assistant Dev
Thanks,  I actually did install it in both the virtual environment and outside the virtual env.  


On Monday, August 3, 2015 at 7:52:09 PM UTC-4, Ryan Kraus wrote:
Make sure you are running in the correct Python environment when you run that pip command. If you are running home assistant in a virtual environment, you'll need to also run pip in that virtual environment (usually activated with the source bin/activate command). Hopefully that helps. 

On Monday, August 3, 2015, Nolan <nkgi...@gmail.com> wrote:
I gave that a shot and it installed okay but I'm getting the same errors from HA.

(home-assistant) pi@raspberrypi2 ~/home-assistant $ pip list | grep forecast
python
-forecastio (1.3.4)



On Sunday, August 2, 2015 at 3:43:18 PM UTC-4, Ryan Kraus wrote:
pip install python-forecastio>=1.3.3



On Saturday, August 1, 2015 at 12:38:39 PM UTC-4, Nolan wrote:
15-08-01 12:29:02 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform forecast
Traceback (most recent call last):
 
File "/home/pi/home-assistant/homeassistant/../homeassistant/helpers/entity_component.py", line 135, in _setup_platform
   
self.hass, platform_config, self.add_entities, discovery_info)
 
File "/home/pi/home-assistant/homeassistant/../homeassistant/components/sensor/forecast.py", line 87, in setup_platform
   
import forecastio as forecastio_
ImportError: No module named 'forecastio'


I tried adding the forecast.io component but it couldn't find the module.  pip didn't have it either...How do I install the forecastio module?

Thanks,
Nolan

--
You received this message because you are subscribed to a topic in the Google Groups "Home Assistant Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/home-assistant-dev/gpVfPBmD8bw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to home-assistant-dev+unsub...@googlegroups.com.
To post to this group, send email to home-assistant-dev@googlegroups.com.


--
Thanks,

Ryan Kraus

Ryan Kraus

unread,
Aug 4, 2015, 7:11:11 AM8/4/15
to Home Assistant Dev
That's odd. Try importing forecastio manually in a Python she'll while you have the homeassistant virtual environment activated. Let's see what that does.

Nolan

unread,
Aug 4, 2015, 8:22:36 AM8/4/15
to Home Assistant Dev
pi@raspberrypi2 ~/home-assistant $ source bin/activate
(home-assistant) pi@raspberrypi2 ~/home-assistant $ python3
Python 3.4.2 (default, Jul 7 2015, 11:48:18)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import forecastio
>>>

Nolan

unread,
Aug 4, 2015, 12:41:47 PM8/4/15
to Home Assistant Dev
I figured it out...I didn't have my time_zone defined in my configuration.yaml.  I recently had to restore my raspberrypi from an old backup, and the backup which was missing my time_zone entry.

Thanks for the help!

-Nolan

Ryan Kraus

unread,
Aug 4, 2015, 12:41:51 PM8/4/15
to Home Assistant Dev
Interesting. And I'm just checking all the bases here, you are launching HA like this:
source bin/activate
python3 -m homeassistant

Another check that may be helpful is to run
source bin/activate
which python3


On Tuesday, August 4, 2015 at 8:22:36 AM UTC-4, Nolan wrote:

Ryan Kraus

unread,
Aug 4, 2015, 12:44:02 PM8/4/15
to home-assi...@googlegroups.com
Great! I'm glad it is working for you now.

Thanks,

Ryan Kraus

--
You received this message because you are subscribed to a topic in the Google Groups "Home Assistant Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/home-assistant-dev/gpVfPBmD8bw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to home-assistant-...@googlegroups.com.
To post to this group, send email to home-assi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/home-assistant-dev/739fcbb6-0aaa-42f6-aeea-b69ce8665589%40googlegroups.com.

Nolan

unread,
Aug 4, 2015, 1:16:10 PM8/4/15
to Home Assistant Dev
Now I'm having another interesting problem...The outside temperature reads 191.6 °F.  It's not quite that hot outside!  Any idea why that's happening?  The other data from forecast.io looks good.  I made sure to set 'temperature_unit: F' in configuration.yaml.

^[[32m15-08-04 12:59:31 INFO (Thread-12) [homeassistant] Bus:Handling <Event state_changed[L]: entity_id=sensor.forecast__temperature, old_state=<state sensor.forecast__temperature=191.6; unit_of_measurement=°F, friendly_name=Forecast - Temperature @ 12:57:10 04-08-2015>, new_state=<state sensor.forecast__temperature=191.7; unit_of_measurement=°F, friendly_nn
ame=Forecast - Temperature @ 12:59:31 04-08-2015>>^[[0m


On Tuesday, August 4, 2015 at 12:44:02 PM UTC-4, Ryan Kraus wrote:
Great! I'm glad it is working for you now.

Thanks,

Ryan Kraus

On Tue, Aug 4, 2015 at 12:41 PM, Ryan Kraus <rmk...@gmail.com> wrote:
Interesting. And I'm just checking all the bases here, you are launching HA like this:
source bin/activate
python3 -m homeassistant

Another check that may be helpful is to run
source bin/activate
which python3

On Tuesday, August 4, 2015 at 8:22:36 AM UTC-4, Nolan wrote:
pi@raspberrypi2 ~/home-assistant $ source bin/activate
(home-assistant) pi@raspberrypi2 ~/home-assistant $ python3
Python 3.4.2 (default, Jul  7 2015, 11:48:18)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import forecastio
>>>

--
You received this message because you are subscribed to a topic in the Google Groups "Home Assistant Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/home-assistant-dev/gpVfPBmD8bw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to home-assistant-dev+unsub...@googlegroups.com.

To post to this group, send email to home-assi...@googlegroups.com.

Ryan Kraus

unread,
Aug 4, 2015, 10:20:01 PM8/4/15
to Home Assistant Dev
Well have you considered moving off of the light side of the moon? The atmospheric temperatures here on Earth never get that close to the boiling point of water. Except for maybe in Australia....

Seriously though, my guess is that your outdoor temps are about 88 degrees F right now? It seems as if the ForecastIO sensor is assuming that temperature data is always being delivered in C. It is then making a conversion from C to F, since your HA unit is set to F. So 88 degrees becomes 191.

Put in a ticket into the issue tracker on GitHub for this one. Hopefully someone will get to it soon.

Nolan

unread,
Aug 5, 2015, 2:42:31 PM8/5/15
to Home Assistant Dev
Thanks, I opened an issue.
Reply all
Reply to author
Forward
0 new messages