Appdaemon3 beta supports multiple hass instances as shown here
Has anyone tried it and got it working?
When I add a second instance the apps stop working, even though the docs say the first should get the default namespace.
I get the following in the log
2018-01-20 23:31:41.426269 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 404, in worker
funcref(args["event"], data, args["kwargs"])
File "/config/appdaemon/apps/hwcheck.py", line 15, in appd_event
self.log_notify("AppDaemon is up", "INFO")
File "/config/appdaemon/apps/hwcheck.py", line 29, in log_notify
self.notify(msg, name="ios")
File "/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py", line 18, in func_wrapper
if not self.AD.get_plugin(self._get_namespace(**kwargs)).reading_messages:
AttributeError: 'NoneType' object has no attribute 'reading_messages'
Then to run against the master hass instance added this to the app inside the def initialize
self.set_namespace("master")
example app
import appdaemon.plugins.hass.hassapi as hass
# Args:
#
class HelloWorld(hass.Hass):
def initialize(self):
self.set_namespace("master")
self.log("Hello from AppDaemon")
self.log("You are now ready to run Apps!")