Code Monkey home page Code Monkey logo

Comments (7)

lingenavd avatar lingenavd commented on July 21, 2024

Update:
I am aslo able to send mail from a python script within the container.
Python is available in the container by default.
My workaround is now when I want some action or alert for a Dmoticz event I can use Python script directly in the event module or with the use of blockly you have the possibilty to start a script. So I start a shell script with blockly wich starts the python send-email,py script. With blockly you can also add parameters, so I guess you can use parameters to specify the subject, body or even the recipient (I haven't tested the parameters yet)
But this is ofcourse not really convienent to rewrite all events you want notifications for.

So I am really curious what is missing in the Domticz folders to be the cause of the email errors for the standard notification functionality in Domoticz.

grtz,
Andre van der Lingen

from mkdomoticz.

alan-rpi avatar alan-rpi commented on July 21, 2024

I have the same problem after I installed on a Rasp Pi 4 (Buster) (note this was an image from http://www.raspberry-asterisk.org/downloads/. + Docker version 19.03.5, build 633a0ea

Using the CLI option in Portainer for the Domoticz container I tried various email functions but none worked:

root@906c589a83bc:/# sendmail [email protected] < /tmp/email.txt
bash: sendmail: command not found
root@906c589a83bc:/# mail -s "Test Subject" [email protected] < /dev/null
bash: mail: command not found
root@906c589a83bc:/# mutt -s "Test Email" [email protected] < /dev/null
bash: mutt: command not found
root@906c589a83bc:/# ssmtp [email protected]
bash: ssmtp: command not found
root@906c589a83bc:/#

Looks like no email package has been installed despite the fact this image is 600MB.

I looked at adapting the package with Docker Build but it's beyond my skills and anyway, I don't know if "SMTP Mailer" is one of the above or not.

Pity, as Domoticz was looking promising, especially with Blockly. At least I could access my GPIO pins with this image which I couldn't do with the linuxserver image.

Alan

from mkdomoticz.

joshuacox avatar joshuacox commented on July 21, 2024

Sorry about all this, I am out of town at the moment, I will remaster this image with the email utilities this weekend. And hopefully figure out some way of automatically building and re-uploading this image.

from mkdomoticz.

alan-rpi avatar alan-rpi commented on July 21, 2024

Thanks for responding so positively. I've also need to send mqtt and in the absence of mqtt in Blockly I wrote a script. That required I install paho-mqtt: sudo pip3 install paho-mqtt . Any chance please you could also add in paho-mqtt when you sort out the email. Best wishes, Alan

from mkdomoticz.

lingenavd avatar lingenavd commented on July 21, 2024

Thanx mate that would be great!!

I was already on the way to see if I could make a brand new container based on ubuntu:latest to get it working myself.
I have never done that that so I am learning docker, git, make, make clean and all other commands.....I have a lot of respect for you to have that knowledge already :-)
Let me know what package you added to make it work so, when I eventually get my act together, I can do the same.
it is a lot to comprehend, but I like the challenge :-)
What I already noticed is that with the current master of open-zwave on github I was not able to complete the "make" of domoticz....I get all kinds of errors regarding open-zwave.....
I am still researching and trying different things, but I am not confident I will find a solution....so for the moment I am stuck.
Hope you get the e-mail fixed in your container and maybe update to the latest Domotics ass well?

Again, thank you very much for your effort!

with regards,
Andre

from mkdomoticz.

alan-rpi avatar alan-rpi commented on July 21, 2024

As a temporary measure I have written a bash & python scripts to send emails from Blockly but I guess it can be used wherever a script can be called. In fact there are 2 sets of scripts, one for emails and one for mqtt messages.
More details at my github respository: https://github.com/alan-rpi/domoticz-email-mqtt
Note that neither script supports SSL so it will not work with some email hosts.
This is my first github repository; a little thank you to all those who have provided lots of free resources that I have used.
Alan

from mkdomoticz.

CHKDSK88 avatar CHKDSK88 commented on July 21, 2024

@joshuacox

Thank You for Your work. Any chance to add email feature for domoticz docker?

from mkdomoticz.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.