sglvladi / meshquitto

A simple Arduino project, which aims to provide a gateway between a mesh network of ESP8266's and a remote MQTT broker.
https://github.com/sglvladi/meshquitto
MIT License
40 stars 16 forks source link

issue on configuration #2

Closed khzd closed 7 years ago

khzd commented 7 years ago

Hello great contribution to the Mesh network projects :)

I've installed your code on a Ubuntu PC with Arduino 1.8.1 and I got a compilation error on line 307 of the meshquitto-node code, do you have any advise on configuration : the libraries to use or standards ?

Thanks Error : /Arduino/meshquitto-master/meshquitto_node/meshquitto_node.ino: In function 'SimpleList getDifference(SimpleList, SimpleList)': meshquitto_node:307: error: no match for 'operator[]' (operand types are 'SimpleList' and 'int') if (arr1[i] < arr2[j]) ^ ^

sglvladi commented 7 years ago

Hi @khzd :)

Have you pulled the latest version of meshquitto? Have a look at issue #1. I think this issue should be resolved now. If not, I guess there is a conflict with the SimpleList library used by painlessMesh.

I have added some functions to the original SimpleList provided by painlessMesh, which is why you are getting the error. I will try and get these additions pushed straight to painlessMesh to get this issue resolved.

Until then, what you could do is copy any of the SimpleList.h files, found within mesh_gateway, mqtt_gateway or meshquito_node projects, and paste it instead of the SimpleList.h inside the src folder of the painlessMesh library. This should do the trick, since the two libraries are completely identical (excluding the added functions).

Let me know how it goes.

khzd commented 7 years ago

Hello Thanks for your prompt response :)

I will move off painless mesh from path will also implemente your copy past solution Thanks also to look for standardisation of the original source :) and will be back to you in the evening With regards

khzd commented 7 years ago

hello, copy and pass was really painful :( I create a lib named AAAAA with all files from your lib and painlessMesh one (except simplelist.h). I also moved off the painlessMesh from the path

and every think compiled thanks for the advice :)

hope a convergence between your simplelist.h and the original one :)

with regards

khzd commented 7 years ago

within this succes, i start to compile the mqtt gatway : i got an issue of the same kind on mqtt lib.

may you precise with library do you use ?

NB : I used the imroy one ( I have hacked some sonnof devices with the help of the excellent contribution of KmanOz project https://github.com/KmanOz/Sonoff-HomeAssistant :)

sglvladi commented 7 years ago

Hi again,

copy and pass was really painful :( I create a lib named AAAAA with all files from your lib and painlessMesh one (except simplelist.h). I also moved off the painlessMesh from the path

Copy pasting shouldn't be that painful. Simply replacing the SimpleList.h file within the original painlessMesh src folder should do. (i.e. no new lib creations are necessary)

may you precise with library do you use ?

If you have a look at the imported libraries at the top of each of the sketches you should be able to see the names of the libraries that are used. Generally, all the libraries I have used are pretty much standard. For example, PubSubClient (check here) is THE library for MQTT clients on Arduino.

Hope the above helps.

khzd commented 7 years ago

Excellent thanks again for your prompt response , what about to précisé it in the read me? With regards