daveabbott007 wrote:I have been running the cron version of the script for a while now and it has been perfect - many thanks for all the effort in writing it.
Is there any way to implement a domoticz version of the ECO/AUTO/COMFORT switch?
Many thanks
Hello !! Great job, the scripts are realy cool, it's running perfectly on my raspberry 3, great wiki/tutorial !!!
now I'm programming the switchs, boost, eco etc etc
I've searched how to do, but no success, now I use a new method: I copy the "Trace" log of Max! Home automation (Windows 7) for all commands I need.
only the lines with "s:" are important

- Capture Max home auto.JPG (20.78 KiB) Viewed 3457 times
I obtain this:
Salon-Rad 16A683
s:AARAAAAAFqaDASI= --17°C Auto
s:AARAAAAAFqaDASY= --19°C Auto
s:AARAAAAAFqaDASo= --21°C Auto
s:AARAAAAAFqaDAS4= --23°C Auto
s:AARAAAAAFqaDAcA= -- Boost
s:AARAAAAAFqaDAV4= --15°C Manual
s:AARAAAAAFqaDAWI= --17°C Manual
SDB-Rad 16A682
s:AARAAAAAFqaCAiI= --17°C Auto
s:AARAAAAAFqaCAiY= --19°C Auto
s:AARAAAAAFqaCAio= --21°C Auto
s:AARAAAAAFqaCAi4= --23°C Auto
s:AARAAAAAFqaCAjI= --25°C Auto
s:AARAAAAAFqaCAjY= --27°C Auto
s:AARAAAAAFqaCAsA= -- Boost
s:AARAAAAAFqaCAl4= --15°C Manual
s:AARAAAAAFqaCAmI= --17°C Manual
I have only to send the commands when "Switch command ON" or "Switch command OFF" are activated, I use "netcat", a switch for Boost, a switch for eco ...
ex: with bash executable script with arguments,
script://Max_Salon_b.sh Salon (-> s:AARAAAAAFqaDAcA= boost salon)

- Capture Boost.JPG (46.95 KiB) Viewed 3457 times
bash:
#!/bin/sh
if [ $1 = "Salon" ]
then
sudo echo 's:AARAAAAAFqaDAcA=' | netcat -C 192.168.2.xxx 62910
fi
if [ $1 = "Sdb" ]
then
sudo echo 's:AARAAAAAFqaCASA=' | netcat -C 192.168.2.xxx 62910
fi
if [ $1 = "Arret" ]
then
sudo echo 's:AARAAAAAFqaDAV4=' | netcat -C 192.168.2.xxx 62910
sudo echo 's:AARAAAAAFqaCAl4=' | netcat -C 192.168.2.xxx 62910
fi
if [ $1 = "SalonCold" ]
then
sudo echo 's:AARAAAAAFqaDASI=' | netcat -C 192.168.2.xxx 62910
fi
if [ $1 = "SdbCold" ]
then
sudo echo 's:AARAAAAAFqaCAiI=' | netcat -C 192.168.2.xxx 62910
fi

- Capture domo.JPG (66.98 KiB) Viewed 3457 times
I use 2 bash executable scripts (ON and OFF), but you can have 1 script and use 2 arguments too( $1 and $2 ) -> $0 is the command
Now can I use the Max! system in Auto/Manu/Boost mode, I've already programed the Max cube (Standalone week program, if domoticz, or the raspberry don't run), so I need the Auto Mode.
ex: time scrpit in Domoticz event, auto mode Temperature regulation when sunny and > 20°C outdoor
Code: Select all
commandArray = {}
time = os.date("*t")
if ((otherdevices_temperature['Meteo'] > 15) and (time.hour <= 19) and (time.hour >= 12) and (tonumber(otherdevices['Salon-Stat']) > 20)) then
os.execute('echo s:AARAAAAAFqaDASY= | netcat -C 192.168.2.xxx 62910') --set Salon-Rad 19°C Auto
print('Radiateur Salon reglé à: 19°C, T° Extérieure = '..tostring(otherdevices_temperature['Meteo'])..'°C')
-- commandArray['SetSetPoint:18']='21'
end
if ((otherdevices_temperature['Meteo'] > 20) and (time.hour <= 20) and (time.hour >= 6) and (tonumber(otherdevices['Salon-Stat']) > 20)) then
os.execute('echo:AARAAAAAFqaDASY= | netcat -C 192.168.2.xxx 62910') --set Salon-Rad 19°C Auto
print('Radiateur Salon reglé à: 19°C, T° Extérieure = '..tostring(otherdevices_temperature['Meteo'])..'°C')
-- commandArray['SetSetPoint:18']='20'
end
if ((otherdevices_temperature['Meteo'] > 15) and (time.hour <= 19) and (time.hour >= 12) and (tonumber(otherdevices['SDB-Stat']) > 21)) then
os.execute('echo s:AARAAAAAFqaCAio= | netcat -C 192.168.2.xxx 62910') --set Salon-Rad 19°C Auto
print('Radiateur Sdb reglé à: 21°C, T° Extérieure = '..tostring(otherdevices_temperature['Meteo'])..'°C')
-- commandArray['SetSetPoint:18']='21'
end
if ((otherdevices_temperature['Meteo'] > 20) and (time.hour <= 20) and (time.hour >= 9) and (tonumber(otherdevices['SDB-Stat']) > 20)) then
os.execute('echo s:AARAAAAAFqaCAio= | netcat -C 192.168.2.xxx 62910') --set Salon-Rad 19°C Auto
print('Radiateur Sdb reglé à: 21°C, T° Extérieure = '..tostring(otherdevices_temperature['Meteo'])..'°C')
-- commandArray['SetSetPoint:18']='20'
end
return commandArray
The temperature is changed until the next programmed temperature, but with this command "commandArray['SetSetPoint:18']='20'" the mode stay in manual, so the temperature will not change without another command.
Thank you for your scripts, what a job !!!