Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appdaemon/0.84beta issues with self.call_service("notify/ios_iphone) #19097

Closed
grantclem opened this issue Dec 7, 2018 · 2 comments
Closed

Comments

@grantclem
Copy link

grantclem commented Dec 7, 2018

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 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:

@VDRainer
Copy link
Contributor

VDRainer commented Dec 7, 2018

#18900

@cgarwood
Copy link
Member

cgarwood commented Dec 7, 2018

Same issue as #18900

@cgarwood cgarwood closed this as completed Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants