New functionality, "Command line" notification

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
ded38fr
Posts: 5
Joined: Sunday 15 March 2015 12:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

New functionality, "Command line" notification

Post by ded38fr »

Hello,

Is it possible to add a "Command line" notification, in parameters.

By this way, we can send notifications to espeak, for example, and domoticz could be able to speak very simply, or to any system command/application.


Thanks in advance for your help,

Cheers :D
lost
Posts: 665
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: New functionality, "Command line" notification

Post by lost »

ded38fr wrote:Hello,
Is it possible to add a "Command line" notification, in parameters.
By this way, we can send notifications to espeak, for example, and domoticz could be able to speak very simply, or to any system command/application.
I agree this one would be interesting. Either trough notification or maybe (easier to implement?), in the switches way: By generalizing the action on/off script/http commands that already exist.

Allowing such possibility for measurement devices (as electric consumption, lux meters...) to trigger a script on thresholds would be very nice.

For instance, I already have a sensor in my garage on the side door that have PIR (that'll trigger if main car door is opened)/open-switch(pedestrian side door)/Lux (was unused for now).

I just installed a new front door with a radio command that can't be domotized without added modules. The childrens like to play with the remotes & may open the door doing so. So I'd like to be notified, for now, using Lux meter (for instance, if lux>250, espeak "Garage door may be opened").

At the moment, without scripting, I can only send a mail I'll not notice immediately (& the children will not get an immediate&easy feedback to reverse their mistake & close the door).
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: New functionality, "Command line" notification

Post by Egregius »

Start scripting and everything is possible.
Quite easy with pass2php to execute other scripts with variables send to them.
Only your imagination is the limit...
lost
Posts: 665
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: New functionality, "Command line" notification

Post by lost »

Egregius wrote:Start scripting and everything is possible.
Quite easy with pass2php to execute other scripts with variables send to them.
Only your imagination is the limit...
I already started scripting, in Python for more complex stuff (or running as a service & intecracting with Domoticz) & Lua when mostly dealing with Domoticz internals. But well, development is my job (even if it's on embedded telecom products) and using mostly C ans asm. Everyone does not have required skills.

That's still the best to do for functionalities closely tied to your own setup & that may not make sense for others & not worth the adding in Domoticz core.

On scripting subject, Domoticz remains quite heterogeneous : On/Off actions require shell scripts (=> must do wrappers to call Python there for instance) ; Internals = Lua is best, but the language itself is quite limited. Python, even if it's a language that have drawbacks (identation nightmare can lead to code execution that is not the one you can see editing it: That's IMO a major flaw and require being very careful with editors configuration for tabs), is the one that remains accessible & with a lot of possibilities/libraries.

But at the moment, scripting in Domotics requires mixing Lua/Shell/Python... That's sometimes a pain for me, immagine for others?!

This requirement, indeed, is just being coherent vs switches tab possibilities and a step to make Domoticz accessible to more people.
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: New functionality, "Command line" notification

Post by Egregius »

You forgot to mention PHP as language :lol:
My setup is quite straight forward. A lua script pushes all updates to PHP's apcu cache.
From their I'll pull them in all the scripts. Works flawless, fast and very versatile.
I don't believe that all options should be implemented natively in Domoticz. It will make the package bigger, harder to maintain and easier to have bugs.
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: New functionality, "Command line" notification

Post by deennoo »

Why don't you use http notification ? This allow to run script. Or maybe There is something i miss understandImage
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest