first I installed Hass.io and the cameras work with synology cam,
now I have Manual installation on a Raspberry Pi version of HA, and I use same configuratsion.yaml files, and in logs I have error like this:
2017-10-11 22:53:23 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform synology Traceback (most recent call last): File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=self.hass.loop) File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for return fut.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/usr/lib/python3.5/asyncio/coroutines.py", line 210, in coro res = func(*args, **kw) File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/camera/synology.py", line 54, in async_setup_platform timeout=timeout File "/srv/homeassistant/lib/python3.5/site-packages/synology/surveillance_station.py", line 9, in __init__ self._api = Api(url, username, password, timeout, verify_ssl) File "/srv/homeassistant/lib/python3.5/site-packages/synology/api.py", line 56, in __init__ self._initialize_api_info() File "/srv/homeassistant/lib/python3.5/site-packages/synology/api.py", line 66, in _initialize_api_info response = self._get_json(self._base_url + 'query.cgi', payload) File "/srv/homeassistant/lib/python3.5/site-packages/synology/api.py", line 189, in _get_json content = json.loads(response.content) File "/usr/lib/python3.5/json/__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes'
Now I doublechek the configuration.yaml - and not there all data like it was – and like I said before, that same cinf file works fine when i used Hass.io installatsion versioon.
Here is part of file:
# View all events in a logbook
logbook:
# Track the sun
sun:
mqtt:
broker: 192.168.200.205
port: 1883
client_id: home-assistant-1
username: *****
password: *******
camera:
- platform: synology
url: https://192.168.200.181:5001
username: ******
password: *******
timeout: 15
verify_ssl: False
vacuum:
- platform: roomba
name: Birgus
host: 192.168.200.192
username: ********
password: *******
#media_player:
# - platform: itunes
# host: 192.168.200.133
# Text to speech
tts:
- platform: google
sensor: !include sensors.yaml
zone: !include zones.yaml
After I upgraded to 0.55.1 I started getting this error instead:
2017-10-16 16:19:50 ERROR (MainThread) [homeassistant.components.camera.synology] Error when initializing SurveillanceStation
Traceback (most recent call last):
File "/home/homeassistant/lib/python3.5/site-packages/homeassistant/components/camera/synology.py", line 54, in async_setup_platform
timeout=timeout
File "/home/homeassistant/lib/python3.5/site-packages/synology/surveillance_station.py", line 9, in __init__
self._api = Api(url, username, password, timeout, verify_ssl)
File "/home/homeassistant/lib/python3.5/site-packages/synology/api.py", line 56, in __init__
self._initialize_api_sid()
File "/home/homeassistant/lib/python3.5/site-packages/synology/api.py", line 82, in _initialize_api_sid
response = self._get_json(api['url'], payload)
File "/home/homeassistant/lib/python3.5/site-packages/synology/api.py", line 191, in _get_json
raise ValueError('Invalid or failed response', content)
ValueError: ('Invalid or failed response', {'success': False, 'error': {'code': 400}})
My Syno credentials haven’t changed, I’ve made no config changes, using secrets.yaml to store my passwords. Makes me think this is something due to the py-synology rewrite introduced in 0.55?