pymazda icon indicating copy to clipboard operation
pymazda copied to clipboard

Installing it in PyTo on iOS?

Open alanzchen opened this issue 3 years ago • 4 comments

Hi,

Wondering if anyone got this to work on iOS? I am currently stuck at the aiohttp dependency in both PyTo and Pythonista. Here is the sample error from PyTo

Pyto.app/Lib/pip.py:618: ExtensionModul
eWarning: Extension modules are skipped
: 
aiohttp._websocket
aiohttp._http_parser
aiohttp._helpers
aiohttp._http_writer
aiohttp may not work with Pyto.
  warnings.warn(msg, ExtensionModuleWar
ning)
PipError('failed to find packages or py
_modules arguments in setup call')
Failed to run setup.py

Traceback (most recent call last):
  File "Pyto.app/Lib/pip.py", line 501,
 in run
    return self._run_setup_file(setup_f
ilename)
  File "Pyto.app/Lib/pip.py", line 624,
 in _run_setup_file
    raise PipError(
pip.PipError: failed to find packages o
r py_modules arguments in setup call

Fall back to directory guessing ...
Package installed: aiohttp
>>>

Thanks!

By the way, how do you guys all use this library? I primarily want to use it as a Siri shortcut.

alanzchen avatar Dec 10 '21 02:12 alanzchen

I started to play with it in Pyto but kinda ran into dependency hell and switched to interacting with the API via the HomeAssistant integration to get access via iOS.

That would get you a Siri shortcut, or in my case, an AppleWatch complication.

AllPurposeBen avatar Dec 10 '21 02:12 AllPurposeBen

@AllPurposeBen

Same here. I guess I'd better off writing an API wrapper and deploy it to Heroku.

Where do you run your HomeAssistant instance? On a VPS?

alanzchen avatar Dec 10 '21 02:12 alanzchen

I started to do the same but it occurred to me all the hard work was already done for HA so why reinvent the wheel.

I run mine locally on a pi4 and access it on the outside via the HomeAssistant Cloud thing that Nabu Casa has.

The iOS app is pretty reliable and if your used to general HA config, it's not too hard to set up. If you want to do more complex automation, you can use NodeRED in HA for that.

AllPurposeBen avatar Dec 10 '21 02:12 AllPurposeBen

I just made an API wrapper that runs on Heroku. Now I can easily make iOS shortcuts :)

https://github.com/alanzchen/mymazda-relay

alanzchen avatar Dec 22 '21 22:12 alanzchen