You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running Appdaemon in a seperate virtual environment for automations
Component/platform:
Description of problem:
Since the beta install there has been issues with a few of the AD apps running, which seem have the
"self.call_service("notify/ios_iphone" line in the code. I removed the line from the one of the apps and appeared to work fine after that. Re-install the line of code and Appdaemon crashes again. Logs from AD and HA at the same time suggest it is the notify/ios service causing the problem. Also removed the AD virtual env, reinstalled AD and the problem persisted. Also deleted the "home-assistant_v2.db" from the directory, restarted HA and still the same problem.
Appdaemon Logfile:
2018-12-07 23:27:21.637771 WARNING AppDaemon: HASS: Unexpected result from Home Assistant, id = 2
2018-12-07 23:27:21.638185 WARNING AppDaemon: HASS: {'id': 2, 'type': 'result', 'success': False, 'error': {'code': 'unknown_error', 'message': 'Invalid JSON in response'}}
2018-12-07 23:27:21.639058 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
2018-12-07 23:27:26.648631 INFO AppDaemon: HASS: Connected to Home Assistant 0.84.0b1
2018-12-07 23:27:26.712384 INFO AppDaemon: Processing restart for HASS
HA log:
2018-12-07 23:27:21 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140418991884832] Unable to serialize to JSON: Object of type 'Template' is not JSON serializable
{'id': 2, 'type': 'event', 'event': {'event_type': 'call_service', 'data': {'domain': 'notify', 'service': 'ios_grants_iphone', 'service_data': {'message': <homeassistant.helpers.template.Template object at 0x7fb5cc734240>}}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 12, 7, 15, 27, 21, 626112, tzinfo=), 'context': {'id': 'f3f623b80b8c4f80a41129e677930cb5', 'user_id': None}}}
2018-12-07 23:27:21 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event call_service[L]: domain=notify, service=ios_grants_iphone, service_data=message=<homeassistant.helpers.template.Template object at 0x7fb5cc734240>>
Example App from AD:
def record(self, entity, attribute, old, new, kwargs):
self.log("MANUAL RECORDING TRIGGERED")
self.call_service("shell_command/turn_on_driveway_camera") ### Call IFTTT trigger
self.call_service("notify/ios_grants_iphone", title = "Test", message = "Test")
self.turn_off("input_boolean.camera_driveway")
self.run_in(self.run_script_driveway,self.delay) # Delay 180 secs, then run snapshot
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
Traceback (if applicable):
Additional information:
The text was updated successfully, but these errors were encountered:
Home Assistant release with the issue:
Last working Home Assistant release (if known):
0.83.3
Operating environment (Hass.io/Docker/Windows/etc.):
Running Appdaemon in a seperate virtual environment for automationsComponent/platform:
Description of problem:
Since the beta install there has been issues with a few of the AD apps running, which seem have the
"self.call_service("notify/ios_iphone" line in the code. I removed the line from the one of the apps and appeared to work fine after that. Re-install the line of code and Appdaemon crashes again. Logs from AD and HA at the same time suggest it is the notify/ios service causing the problem. Also removed the AD virtual env, reinstalled AD and the problem persisted. Also deleted the "home-assistant_v2.db" from the directory, restarted HA and still the same problem.
Appdaemon Logfile:
2018-12-07 23:27:21.637771 WARNING AppDaemon: HASS: Unexpected result from Home Assistant, id = 2
2018-12-07 23:27:21.638185 WARNING AppDaemon: HASS: {'id': 2, 'type': 'result', 'success': False, 'error': {'code': 'unknown_error', 'message': 'Invalid JSON in response'}}
2018-12-07 23:27:21.639058 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
2018-12-07 23:27:26.648631 INFO AppDaemon: HASS: Connected to Home Assistant 0.84.0b1
2018-12-07 23:27:26.712384 INFO AppDaemon: Processing restart for HASS
HA log:
2018-12-07 23:27:21 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140418991884832] Unable to serialize to JSON: Object of type 'Template' is not JSON serializable
{'id': 2, 'type': 'event', 'event': {'event_type': 'call_service', 'data': {'domain': 'notify', 'service': 'ios_grants_iphone', 'service_data': {'message': <homeassistant.helpers.template.Template object at 0x7fb5cc734240>}}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 12, 7, 15, 27, 21, 626112, tzinfo=), 'context': {'id': 'f3f623b80b8c4f80a41129e677930cb5', 'user_id': None}}}
2018-12-07 23:27:21 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event call_service[L]: domain=notify, service=ios_grants_iphone, service_data=message=<homeassistant.helpers.template.Template object at 0x7fb5cc734240>>
Example App from AD:
def record(self, entity, attribute, old, new, kwargs):
self.log("MANUAL RECORDING TRIGGERED")
self.call_service("shell_command/turn_on_driveway_camera") ### Call IFTTT trigger
self.call_service("notify/ios_grants_iphone", title = "Test", message = "Test")
self.turn_off("input_boolean.camera_driveway")
self.run_in(self.run_script_driveway,self.delay) # Delay 180 secs, then run snapshot
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
The text was updated successfully, but these errors were encountered: