dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
457 stars 109 forks source link

Support Arduino DUE? #137

Closed proasnet closed 5 months ago

proasnet commented 1 year ago

Hello, my project I want migrate from Mega to Due, compilation return errors for setValue

is possible, please, support Due board? Thanks

dawidchyrzynski commented 1 year ago

Hi @proasnet,

Can you provide the build's log?

proasnet commented 1 year ago

Hi @dawidchyrzynski

This is compile log

:\Jirutka\99_VYVOJ ARDUINO\Axpert\AxpertinoGW_V1.11_DUE\AxpertinoGW_V1.11_DUE.ino: In function 'void loop()':
AxpertinoGW_V1.11_DUE:735:69: error: call of overloaded 'setValue(int&)' is ambiguous
     Inv_1_outputPowerApparent.setValue( hodnoty_QPIGS_Inv_1.AC_O_VA );
                                                                     ^
Z:\Jirutka\99_VYVOJ ARDUINO\Axpert\AxpertinoGW_V1.11_DUE\AxpertinoGW_V1.11_DUE.ino:735:69: note: candidates are:
In file included from C:\Users\j.jirutka\Documents\Arduino\libraries\home-assistant-integration\src/ArduinoHA.h:11:0,
                 from Z:\Jirutka\99_VYVOJ ARDUINO\Axpert\AxpertinoGW_V1.11_DUE\AxpertinoGW_V1.11_DUE.ino:10:
C:\Users\j.jirutka\Documents\Arduino\libraries\home-assistant-integration\src/device-types/HASensor.h:37:10: note: bool HASensor::setValue(const char*) <near match>
     bool setValue(const char* value);
          ^
C:\Users\j.jirutka\Documents\Arduino\libraries\home-assistant-integration\src/device-types/HASensor.h:37:10: note:   no known conversion for argument 1 from 'int' to 'const char*'
C:\Users\j.jirutka\Documents\Arduino\libraries\home-assistant-integration\src/device-types/HASensor.h:38:10: note: bool HASensor::setValue(uint32_t)
     bool setValue(uint32_t value);
          ^
C:\Users\j.jirutka\Documents\Arduino\libraries\home-assistant-integration\src/device-types/HASensor.h:39:10: note: bool HASensor::setValue(int32_t)
     bool setValue(int32_t value);

etc..

proasnet commented 1 year ago

I tried examples from library and copiled as Arduino DUE, the same problem

dawidchyrzynski commented 5 months ago

The Arduino Due support will be added in the upcoming version of library.