Jojo-A / MQTT-CAN-Gateway

A fully trasparent MQTT-CAN gateway
5 stars 1 forks source link

Errors compiling #1

Closed pkkrusty closed 2 years ago

pkkrusty commented 2 years ago

Trying to compile the sketch gives

error: 'mcp2515_can' does not name a type
   78 | mcp2515_can CAN(CAN_CS_PIN);

among other errors. I assume it's a problem with having correct libraries installed. However, I installed all recommended libraries:

ArduinoJson
PubSubClient
WiFiManager
CAN-BUS Shield

In the code, it includes the mcp_can.h library and the mcp2515_can.h library. I found mcp_can.h and mcp2515_can.h

Any ideas?

pkkrusty commented 2 years ago

Ah figured it out. Conflicting libraries, I shouldn't have installed the coryfowler mcp_can library.

Jojo-A commented 2 years ago

Ah figured it out. Conflicting libraries, I shouldn't have installed the coryfowler mcp_can library.

Hey, Cool that you are interested in this project :) . And even better to see that you have figured out where the problem was! On the other hand this tells me that my description should be more detailed.

Let me know if you have more problems or other Input!

Greetings

pkkrusty commented 2 years ago

Ultimate goal is to get a generic Canbus driver incorporated into the Tasmota project, but this is a good first step.

Jojo-A commented 2 years ago

Ultimate goal is to get a generic Canbus driver incorporated into the Tasmota project, but this is a good first step.

That sounds awesome! I would be glad to see this idea and maybe part of my code merged into projects like Tasmota! My main goal was to convince the Home Assistant devs to implement a generic CAN bus support into Home Assistant so that the detour through ethernet/MQTT could be avoided. But no success. There is just not enough community support and the devs say that it would be easier to implement CAN support into projects like Tasmota or ESPhome but into Home Assistant. So this MQTT-to-CAN gateway was just my "workaround" for the lag of CAN support in Home Assistant...