Python script not running in Home Assistant's virtualenv

This is probably more a python problem, but here’s where I’m having trouble:

I have a python script that runs some code that toggle my garage door opener (no OEM or aftermarket smart opener, just some electronics I hacked together between my raspberry pi and a garage remote). It runs just fine in my pi user environment, but fails in my home-assistant’s virtualenv. I’m getting because hass’s python environment is 3.4.2 and pi user’s is 2.7.9.

It seems the smbus module isn’t available for python3. Short of rewriting it, is there a way I can just get the script to run?

You should be able to run srcipts in the 2.7 environment that interact with HA; AppDaemon does this as well as the FireTV server (so they tell me, I’m still trying to make it work).

Do you call your script from HA or does it run on it’s own?

I’m trying to set it up to get called from command line cover.

I went to the hardware store to get replacement garage remote for the one that I used to make my system. When I saw the price of a new remote I decided I would just buy the MyQ system and put the remote as it was. So this is a moot question for now.

FWIW, the MyQ setup was super easy.

Good to know. I wanted to get an opener but my garage was built in the 40’s and they never though about openers. The built the attic access opening right in the middle where you’d mount an opener. So if I want one, I’ll have to get someone to move the access over to the side…

Ugh, that’s too bad. Is it just a matter of cutting a new access, or is it fancy with pull down stairs, etc.?

It’s actually just a hole. Covering the old one wouldn’t be out of the realm of a DIY project, but I’m not comfortable with cutting the new access hole myself.

You can do it!

Eh, not comfortable cutting holes in structures without professional guidance… :astonished:

@rpitera Do a lookup on 'jackshaft openers".
The motor is at the front of the garage.

1 Like

I called a garage door company and sent them pictures and the tech mentioned that jackshafts wouldn’t work in my setup (I can’t remember the reason he gave) but I will see if I can get someone physically here to check it out.