Kirizaki / mysensors

Custom Serial Gateway based on MySensors protocol communicating with HomeAssistant.
Other
12 stars 4 forks source link

Code compilation problem #32

Open pery777 opened 3 years ago

pery777 commented 3 years ago

Hi, I'm trying to upload mysensors 1.6 to the Arduino Mega ( via Arduino IDE) and I get the message:

In file included from C:\Users\Pery\Desktop\Hassio\Mysensor\mysensors-1.6\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_702272\sketch\automation\automation.hpp: In function 'void setupButtons()': c:\users\pery\appdata\local\temp\arduino_build_702272\sketch\automation\automation.hpp:87:54: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] saloon.attachDoubleClick(clickCallback, SALOON_2_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_702272\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Desktop\Hassio\Mysensor\mysensors-1.6\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:73:8: note: initializing argument 2 of 'void OneButton::attachDoubleClick(parameterizedCallbackFunction, void)' void attachDoubleClick(parameterizedCallbackFunction newFunction, void* parameter); ^~~~~

Can you tell me where I am wrong?

th0m4sek commented 3 years ago

without sharing your changes it will be impossible to help.

pery777 commented 3 years ago

I didn't change anything, I took the original file and try to upload it to arduino mega. And then I want to combine it with hassio. When it starts, I want to adjust everything to myself.

th0m4sek commented 3 years ago

https://github.com/Kirizaki/mysensors/archive/dev.zip unpack it with folders and it must work.

pery777 commented 3 years ago

Oki. I have windows 10, Arduino Mega, Arduino IDE. I downloaded the package from your link, unpacked it, ran gateway.ino (I have MySensors.h and OneButton.h libraries installed) and this is the result:

In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp: In function 'void setupButtons()': c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:89:54: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] saloon.attachDoubleClick(clickCallback, SALOON_2_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:73:8: note: initializing argument 2 of 'void OneButton::attachDoubleClick(parameterizedCallbackFunction, void)' void attachDoubleClick(parameterizedCallbackFunction newFunction, void parameter); ^~~~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:93:63: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] gamingRoom.attachDoubleClick(clickCallback, GAMING_ROOM_1_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:73:8: note: initializing argument 2 of 'void OneButton::attachDoubleClick(parameterizedCallbackFunction, void)' void attachDoubleClick(parameterizedCallbackFunction newFunction, void parameter); ^~~~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:97:56: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] bedroom.attachDoubleClick(clickCallback, BEDROOM_2_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:73:8: note: initializing argument 2 of 'void OneButton::attachDoubleClick(parameterizedCallbackFunction, void)' void attachDoubleClick(parameterizedCallbackFunction newFunction, void parameter); ^~~~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:99:43: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] bed1.attachClick(clickCallback, BED_1_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:66:8: note: initializing argument 2 of 'void OneButton::attachClick(parameterizedCallbackFunction, void)' void attachClick(parameterizedCallbackFunction newFunction, void parameter); ^~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:101:49: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] bed1.attachDoubleClick(clickCallback, BED_2_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:73:8: note: initializing argument 2 of 'void OneButton::attachDoubleClick(parameterizedCallbackFunction, void)' void attachDoubleClick(parameterizedCallbackFunction newFunction, void parameter); ^~~~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:103:43: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] bed2.attachClick(clickCallback, BED_2_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:66:8: note: initializing argument 2 of 'void OneButton::attachClick(parameterizedCallbackFunction, void)' void attachClick(parameterizedCallbackFunction newFunction, void parameter); ^~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:105:49: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] bed2.attachDoubleClick(clickCallback, BED_1_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:73:8: note: initializing argument 2 of 'void OneButton::attachDoubleClick(parameterizedCallbackFunction, void)' void attachDoubleClick(parameterizedCallbackFunction newFunction, void parameter); ^~~~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:107:46: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] guests.attachClick(clickCallback, GUESTS_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:66:8: note: initializing argument 2 of 'void OneButton::attachClick(parameterizedCallbackFunction, void)' void attachClick(parameterizedCallbackFunction newFunction, void parameter); ^~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:112:46: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] mirror.attachClick(clickCallback, MIRROR_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:66:8: note: initializing argument 2 of 'void OneButton::attachClick(parameterizedCallbackFunction, void)' void attachClick(parameterizedCallbackFunction newFunction, void parameter); ^~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:116:59: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] kitchen.attachDoubleClick(clickCallback, KITCHEN_LED1_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:73:8: note: initializing argument 2 of 'void OneButton::attachDoubleClick(parameterizedCallbackFunction, void)' void attachDoubleClick(parameterizedCallbackFunction newFunction, void parameter); ^~~~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:118:59: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] kitchenTable.attachClick(clickCallback, KITCHEN_TABLE_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:66:8: note: initializing argument 2 of 'void OneButton::attachClick(parameterizedCallbackFunction, void)' void attachClick(parameterizedCallbackFunction newFunction, void parameter); ^~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:120:50: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] workshop.attachClick(clickCallback, WORKSHOP_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:66:8: note: initializing argument 2 of 'void OneButton::attachClick(parameterizedCallbackFunction, void)' void attachClick(parameterizedCallbackFunction newFunction, void parameter); ^~~ In file included from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:21:0: c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\automation\automation.hpp:122:50: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'void' [-fpermissive] corridor.attachClick(clickCallback, CORRIDOR_ID); ^ In file included from c:\users\pery\appdata\local\temp\arduino_build_28133\sketch\mapping\mapping.hpp:12:0, from C:\Users\Pery\Documents\Arduino\mysensors-dev\gateway\gateway.ino:20: C:\Users\Pery\Documents\Arduino\libraries\OneButton\src/OneButton.h:66:8: note: initializing argument 2 of 'void OneButton::attachClick(parameterizedCallbackFunction, void)' void attachClick(parameterizedCallbackFunction newFunction, void* parameter); ^~~ Szkic używa 11922 bajtów (4%) pamięci programu. Maksimum to 253952 bajtów. Zmienne globalne używają 2604 bajtów (31%) pamięci dynamicznej, pozostawiając 5588 bajtów dla zmiennych lokalnych. Maksimum to 8192 bajtów.

th0m4sek commented 3 years ago

I'm using linux and i don't have this warnings but sketch compiled successfully you can flash it and it will be ok.

pery777 commented 3 years ago

You're brilliant :) Arduino works great. Could I still ask for help in setting up hassio? In configuration.yaml I have:

mysensors: gateways:

And that is the result in hassio:

Gateway 0 11 switch.gateway_0_11 Przełącznik Gateway 0 12 switch.gateway_0_12 Przełącznik Gateway 0 21 switch.gateway_0_21 Przełącznik Gateway 0 22 switch.gateway_0_22 Przełącznik Gateway 0 31 switch.gateway_0_31 Przełącznik Gateway 0 32 switch.gateway_0_32 Przełącznik Gateway 0 33 switch.gateway_0_33 Przełącznik Gateway 0 34 switch.gateway_0_34 Przełącznik

th0m4sek commented 3 years ago

my configuration looks like this

mysensors: gateways:

  • device: "/dev/ttyUSB0" persistence_file: "mysensors.json" optimistic: false persistence: true retain: true version: "2.3"

sketch has built in presentation for hassio