Hi @Robban,
I don’t know if it makes a difference but i am running docker on a Synology NAS on x86 so i am not using a raspberry pi meaning no raspian here.
/donnib
Hi @Robban,
I don’t know if it makes a difference but i am running docker on a Synology NAS on x86 so i am not using a raspberry pi meaning no raspian here.
/donnib
The problem is between the python3-gi package and python3.6, so depending on what version of python3-gi in the operating system it might work, but apparently not in your case. But since it is x86 maybe it would be easy to just find a copy of a later version.
Unfortunnately i don’t know how to do that so i’ll wait and maybe you or somebody will fix this eventually
I have a solution that seems to work. It works (at least for the moment) on my system.
Go in to your gi folder and replace the 34 number with 36, in my case: sudo cp _gi.cpython-34m-arm-linux-gnueabihf.so _gi.cpython-36m-arm-linux-gnueabihf.so
@donnib if you verify that suggested solution works get back to me so I can add solution to the documentation.
I don’t have any Axis camera’s but the auto discovery did say i did. I do have 2 mobotix camera’s, there pretty clever too, perhaps it found those instead? Don’t know if that was intended.
It specifically looks for ‘axis-video._tcp.local.’ so if they broadcast themselves with that information it will get picked up.
I might need to look into additional verification to minimize these false positives.
If you want you can see if they use the same API that would be pretty fun
Found which device it was, it was my doorbird camera.
2017-05-25 14:55:16 INFO (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: service=axis, discovered=host=192.168.1.115, port=80, properties=macaddress=xxxxxxxxx, hostname=bha-1CCAE3707AFD.local.>
So it seems it matches more
Update: it got a name later, then it scanned now it sees 2 devices, since it matched discovered=host=ARMV5TEJL LINUX which was the same hostname though.
p.s. would love to see support for this device too, if i read this correct, you can use motion with axis to trigger events. Doorbird can do automation but only GET calls, no POST so it will be harder for me to easilly script it.
Any windows support?
I tried the Windows MSI Installer for Windows from gstreamer’s website and will report back.
Sure, the basic implementation that I have is based on an Onvif specification so it’s plausible that Mobotix would also support that specification. If that is the case it might not be that much work to get it supported.
/R
Ooh, interesting! I haven’t tried it on Windows since I don’t have a Windows computer. But gstreamer exists on all platforms so it ‘should’ work. Maybe paths or something could be screwed up. Let me know if I can be of any assistance!
/R
I have 2 mobotix ones, but the other one is a doorbird. It does support some streaming stuff though. Those mobotix are pretty clever, as in Axis alike.
@Robban i finally had some time to try this and i tried the rename and now HA hangs on line :
e[33m2017-05-30 10:54:16 WARNING (MainThread) [homeassistant.setup] Setup of axis is taking over 10 seconds.e[0m
so unfortunately it doesn’t work for me
When I add just:
axis:
Just on it’s own to the configuration file I do not get any errors but if fails to find any camera on my network (P3301 with firmware 5.50.5 and M3204 with firmware 5.50.3.6).
So next I tried adding a camera manually:
axis: P3301: host: !secret axis_P3301_IP username: !secret axis_P3301_username password: !secret axis_P3301_password
However, it gives me the error:
2017-05-30 15:51:54 ERROR (MainThread) [homeassistant.config] Invalid config for [axis]: [P3301] is an invalid option for [axis]. Check: axis->axis->P3301. (See C:\Users\admin\AppData\Roaming\.homeassistant\configuration.yaml, line 139). Please check the docs at https://home-assistant.io/components/axis/ 2017-05-30 15:51:54 ERROR (MainThread) [homeassistant.setup] Setup failed for axis: Invalid config.
Is there a step which I am overlooking?
Only small letters on the P3301->p3301, I know, it’s weird, it’s a limitation in HASS if I remember correctly, a yaml thing perhaps.
You also have to define one item inside include: else you won’t get any sensors or video making the configuration useless. Check the example configuration.yaml here https://home-assistant.io/components/axis/
/R
Hmm, that is a message from hass. Would you mind slimming down your config to only include camera? That would tell us by if it passes the original include issue but not trying to actually use it.
Does your gi folder look something like this?
$ ls -la ~/gi_test/venv36/lib/python3.6/site-packages/gi/
-rw-r--r-- 1 root root 2078 Sep 29 2014 _constants.py
-rw-r--r-- 1 root root 6688 Sep 29 2014 docstring.py
-rw-r--r-- 1 root root 2080 Sep 29 2014 _error.py
-rw-r--r-- 1 root root 251792 Sep 29 2014 _gi.cpython-34m-arm-linux-gnueabihf.so
-rw-r--r-- 1 root root 251792 May 24 18:52 _gi.cpython-36m-arm-linux-gnueabihf.so
drwxr-xr-x 3 root root 4096 Mar 5 19:49 _gobject
-rw-r--r-- 1 root root 2163 Sep 29 2014 importer.py
-rw-r--r-- 1 root root 4550 Sep 29 2014 __init__.py
-rw-r--r-- 1 root root 12784 Sep 29 2014 module.py
-rw-r--r-- 1 root root 13249 Sep 29 2014 _option.py
drwxr-xr-x 3 root root 4096 Mar 5 19:49 overrides
-rw-r--r-- 1 root root 15175 Sep 29 2014 _propertyhelper.py
drwxr-xr-x 2 root root 4096 Mar 5 19:49 __pycache__
-rw-r--r-- 1 root root 766 Sep 29 2014 pygtkcompat.py
drwxr-xr-x 3 root root 4096 Mar 5 19:49 repository
-rw-r--r-- 1 root root 9776 Sep 29 2014 _signalhelper.py
-rw-r--r-- 1 root root 13565 Sep 29 2014 types.py
It seems that Doorbird has a openly defined API making it quite easy to integrate in to hass. https://www.doorbird.com/api. Axis has a device similar to Doorbird, https://www.axis.com/products/axis-a8105-e, unfortunately for us home automators that it is not priced for the consumer market.
Yeah Mobotix has a lot of features for sure! I guess they try to look like Axis devices over the network to easier get integrated in to software already supporting Axis products.
/R
@Robban, I changed to lowercase and added in
include:
- motion
This produced the following error:
2017-05-30 17:23:47 ERROR (MainThread) [homeassistant.setup] Error during setup of component axis
Traceback (most recent call last):
File "C:\Python\Python35-32\lib\site-packages\homeassistant\setup.py", line 188, in _async_setup_component
None, component.setup, hass, processed_config)
File "C:\Python\Python35-32\lib\asyncio\futures.py", line 361, in __iter__
yield self # This tells Task to wait for completion.
File "C:\Python\Python35-32\lib\asyncio\tasks.py", line 296, in _wakeup
future.result()
File "C:\Python\Python35-32\lib\asyncio\futures.py", line 274, in result
raise self._exception
File "C:\Python\Python35-32\lib\concurrent\futures\thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Python\Python35-32\lib\site-packages\homeassistant\components\axis.py", line 162, in setup
if not setup_device(hass, config):
File "C:\Python\Python35-32\lib\site-packages\homeassistant\components\axis.py", line 170, in setup_device
from axis import AxisDevice
File "C:\Users\admin\AppData\Roaming\.homeassistant\deps\axis\__init__.py", line 1, in <module>
from .stream import MetaDataStream
File "C:\Users\admin\AppData\Roaming\.homeassistant\deps\axis\stream.py", line 2, in <module>
import gi # pylint: disable=import-error
ImportError: No module named 'gi'
I don’t know how to do it in windows, or where to find the original. But you need to get your ‘gi’ folder in to your (I think) C:\Python\Python35-32\lib\site-packages
And I know too little about python in windows to help you out with that. Your gi folder is installed in the global site package somewhere in your python environment on your computer, and hass has got it’s own folder for where it looks for dependencies.
/R
I use the doorbird api for the camera stream. I just don’t know how to make the trigger if you click on “open door” to get into hass. Since it normally uses the GET call. I don’t know if your way of working can do the same for this because it would save me that call (which i cannot do since hass only supports POST for changes)