Page 1 of 1
How to implement DAC output in Domoticz
Posted: Wednesday 02 February 2022 9:21
by sazaki
I use esp32 (D25 & D26 DAC pins) to generate analog signal for a specific project. I would like to use Domoticz to specify the voltage I would like to output then trigger esp32 to generate the signal. Is this feasible with Domoticz? Thank you.
Re: How to implement DAC output in Domoticz
Posted: Wednesday 02 February 2022 10:41
by waltervl
You perhaps can use a setpoint device (normally for heating purposes so in Celcius/Fahrenheit) or use a selector switch to send prefixed values.
With a selector switch you should be able to send commands per prefix. With a setpoint device it will be more complex and you will need a script in domoticz to get the setpoint and send it to ESP.
How do you now send the command to the ESP? If you do not have a command yet then would be the first thing to find out.
Re: How to implement DAC output in Domoticz
Posted: Thursday 03 February 2022 7:26
by kiddigital
When you run Domoticz on a Raspberry Pi (either as a main or slave), you could use the SysFs hardware to read and set the GPIO pins.
This way you can send/or receive digital signals (3.3v same as esp32).
And/or you can use add-on boards that can handle different voltages/current and provide ADC capabilities and read/set these through SysFs.
A more software based route could be through the use of ‘Dummy’ hardware devices in Domoticz and use MQTT to have the esp32 board listen and react on certain device changes of these Dummy hardware devices.
Re: How to implement DAC output in Domoticz
Posted: Thursday 03 February 2022 9:20
by sazaki
waltervl wrote: ↑Wednesday 02 February 2022 10:41
You perhaps can use a setpoint device (normally for heating purposes so in Celcius/Fahrenheit) or use a selector switch to send prefixed values.
With a selector switch you should be able to send commands per prefix. With a setpoint device it will be more complex and you will need a script in domoticz to get the setpoint and send it to ESP.
How do you now send the command to the ESP? If you do not have a command yet then would be the first thing to find out.
Thank you. I think the setpoint solution may work. I still need to figure out how to send the command to ESP
Re: How to implement DAC output in Domoticz
Posted: Thursday 03 February 2022 9:49
by waltervl
Re: How to implement DAC output in Domoticz
Posted: Tuesday 19 September 2023 21:38
by waltervl
Just for reference, in latest beta 2023.2 a general setpoint device is introduced
viewtopic.php?p=307044#p307044