Hi
I fully understand you want to promote your solution. It is good there are different ways to achieve this, compared with problems for which nobody can find any solution at all. Fortunately anyone is free !
I just don't find it reasonnable for such a simple thing to involve domoticz, node red + nodered NORA, mosquito, mqtt launcher, CATT. For someone not having this, he would have 4 new softwares to install !
Plus I would be concerned with stability, maintenance, and indeed NORA will not be sustainable.
Often nice services like this don't stay live one year or two (eg gbridge), but since in this case it is already said it will not be maintained if too many people connect or will have a cost, I would not build on it.
But you built your thing, very good and congratulations.
My point is just to highlight there are much simpler ways to achieve the same thing.
If some people are interested and don't find enough details then don't hesitate ask questions.
On your comments: yes but you would need x dummy switches.
Actually no, I can use text switch.
Credit to this:
https://bierdok.net/post/piloter-sa-box ... assistant/
It is even better because the sentence can have as many aliases as you want (different ways to ask the same thing).
This is already quite refined ; for a basic use it can be simplified. Best is to start with Bierdok script. I use only node red CAST to have GH speak (but it is not the purpose of this thread so could be removed).
Example for temperature
Code: Select all
local captors = {
["T intérieur salle à manger"]="delasallemanger danslasallemanger lintrieur delintrieur intrieure",
["T extérieur salle à manger"]="lextrieur delextrieur extrieure devantlafentre dehors dudehors",
["T Congélateur"]="duconglateur dansleconglateur conglateur",
and :
Code: Select all
elseif command == 'get' then
local appconnut=false
local text = get(deviceValue, 3):gsub("%W", ""):lower()
for captor,words in pairs(captors) do
for word in words:gmatch("%w+") do
if text == word then
local temperaturerelevee = otherdevices[captor]
cmd="curl -s --globoff \"http://192.168.1.104:1880/temp?valeur=" .. temperaturerelevee .. "\"" -- this is node red with cast node, just to say what is the temperature
os.execute(cmd)
os.execute("catt cast_site http://192.168.1.104:8080/#/Devices/" .. tonumber(otherdevices_idx[captor]) .. "/Log") -- casting domoticz device page
appconnut=true
end
end
end
if appconnut==false then
os.execute('curl -s --globoff "http://192.168.1.104:1880/nodered?mess=4"') -- oral message: not found this device
end
You see, only one dummy switch, and can have as many captors as you want & with aliases. Says temperature (optional) and shows domoticz device page.
For cameras, can use the same principle.
I have 8 cameras on NVR and the script is just one line !
Code: Select all
elseif command == 'cam' then
os.execute("catt cast_site http://admin:[email protected]/cgi-bin/snapshot.cgi?channel=" .. tonumber(get(deviceValue, 3)))
It is even simpler in this case because I say "show camera x", but if instead of saying the number I want to say "backyard", then I can apply the same logic.
Best regards