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
Python Event: Email/Pushbullet Question
Moderator: leecollings
-
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: Python Event: Email/Pushbullet Question
I would make use of the Domoticz HTTP API to send the notification.
http://<domoticz_ip>:PORT/json.htm?type=command¶m=sendnotification&subject=subject&body=thebody
http://<domoticz_ip>:PORT/json.htm?type=command¶m=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
-
- Posts: 6
- Joined: Tuesday 12 August 2014 0:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Event: Email/Pushbullet Question
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
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
Who is online
Users browsing this forum: No registered users and 1 guest