Python Event: Email/Pushbullet Question

Python and python framework

Moderator: leecollings

Post Reply
Deanm
Posts: 6
Joined: Tuesday 12 August 2014 0:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Python Event: Email/Pushbullet Question

Post by Deanm »

I’m in the process of migrating over from LUA Events to use Python Events. Most of my Lua scripts I have converted in to python but having an issue with one.

In LUA I can send an email with the following command.

commandArray['SendEmail']=(mess)

Does anyone know what the Python equivalent command would be.

Ideally I’m looking to send a Pushbullet message using the built-in Domoticz settings. Is this possible either in Python or LUA.

Cheers

Dean
ben53252642
Posts: 543
Joined: Saturday 02 July 2016 5:17
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Python Event: Email/Pushbullet Question

Post by ben53252642 »

I would make use of the Domoticz HTTP API to send the notification.

http://<domoticz_ip>:PORT/json.htm?type=command&param=sendnotification&subject=subject&body=thebody
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
Deanm
Posts: 6
Joined: Tuesday 12 August 2014 0:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Event: Email/Pushbullet Question

Post by Deanm »

Never thought of using JSON for this. I use JSON a lot in a Python Script I run outside of Domoticz.

Thank you for the info but I looked and could not see this command documented anywhere. I have a problem with the command. When I send the command I get an email and a pushbullet notification.

Under the email settings I have unticked the “Send Email Notifications Alerts” but made no difference. Just not sure what that setting is for.

When running a LUA Script I only get an email. Ideally I only want Pushbullet alerts. Think I might just remove my email settings.

Dean
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest