Open swanitzek opened 2 years ago
Looks like plugin state needs to be serializable by json
and something is failing in that process. Plugin state is defined at return self._message
so HA is (somewhere internal) doing the equivalent of json.loads(self._message)
.
This plugin did work at one point, so either the serialization of state is new (and this plugin is broken for everyone) or the email message itself can't be serialized. I haven't tested this plugin for a while so I'm not sure which scenario is the issue.
You could try debugging down in the update()
method - try dumping the entire message
variable, or try json.loads(message)
yourself and see if it errors. If this does fail, perhaps the update()
method needs to handle a new scenario where attachments aren't serializable.
I see $.result[10]
in your logs - how many attachments are in the email? You might also try a simpler email attachment like a text file instead of a picture. I wonder if the base64-encoded image is the issue...
I didn't get the remote debugger to work with my home assistant instance yet. This is definitively a thing I will try again.
The e-mails just have one attachment. A JPEG sent from a surveillance camera.
I will also try to sent a attachment with a simpler file format (textfile) as suggested. As soon as I know anything new I will post it here.
I installed this custom integration by following the instructions. After adding the sensor to configuration.yaml Home Assistant won't start any longer. It stucks at "Loading data" and never redirects to the dashboard view.
The logfile contains the following error message related to the ha_imap_attachment custom integration:
After removing the entries from configuration.yaml Home Assistant will start again.
Any suggestions?
HA-Version: 2021.11.5