I tried both “File support” and the example for “File URL support”, both of these do not send the data, I still receive the message. “URL support” works correctly and sends a hyperlink.
e.g.
url: google.com
No errors are logged either. I have checked permissions on the last example, homassistant has r/w privileges.
- service: notify.homemessage
data:
title: Send file
message: This is a file URL
data:
file_url: https://cdn.pixabay.com/photo/2014/06/03/19/38/test-361512_960_720.jpg
- service: notify.dringhouse
data:
message: Drive Way Line Crossing
title: TEST NOTIFICATION
data:
file: "/home/homeassistant/.homeassistant/scripts/cameraimages/driveway.jpg"
The savecameraimages.py contains, (Note: Make sure that the folder containing the images has the correct permissions so that homeassistant can access them)
2017-09-07 05:35:52 ERROR (MainThread) [homeassistant.core] Invalid service data for notify.pushbullet: extra keys not allowed @ data[‘file’]. Got ‘/home/homeassistant/.homeassistant/scripts/cameraimages/frontdoor.jpg’
You’ve got an error in the savecameraimages.py file,
Make sure you have not put a tab in the file. if you are using notepad ++ to write the file, you can search for “\t”, selecting Search Mode: Extended.
Make sure that in your main home assistant directory you have a file called scripts (containing savecameraimages.py) and a folder where the images are saved, if you used the same as I did, make sure there is a folder cameraimages in scripts.
Also, the pushbullet file: reference is image location,
In the automation sequence, first the commandline script is called " - service: script.capture_cameras" , followed by the pushbullet code which grabs the image that was just created.
Also, I noticed that you have it stored in python_scripts, that is used for the homeassistant service called python scripts… it may be affecting it?, try a different folder. It would be a lot easier if imports worked for homeassistant python_scripts, but unfortunately we have to call these scripts via a commandline.
Very odd, the file looks correct. I assume you are running this on a RPi? Is the RPi in the same subnet as the camera? Maybe it cannot access the camera? Can you ping the IP from the RPI?
Also, to rule out the cameras, replace the camera entry with this, it should download the image and place it in the folder instead of your camera. You can then rule out one of the possible causes.
ignoring the homeassistant errors for now, how are you running this in putty? I may have replicated your error, you should type on one line when at the command prompt,