Git Product home page Git Product logo

Comments (4)

jgeisler0303 avatar jgeisler0303 commented on September 27, 2024

When parsing the MQTT payload the first value is named can_id which is used as the CAN message ID. The var_name cand_id (notice the extra "d") is not defined during parsing the MQTT payload. Maybe this is a typo?

from can2mqtt.

OlafTheSnowman avatar OlafTheSnowman commented on September 27, 2024

You are right this is a typo, this should be can_id (may be better cob_id).
The incoming MQTT telegram is a general CAN SDO telegram like "601,2B,10,17,00,00,02,00,00",
in this case to turn on producer heartbeat for device ID1. I hope I understood correct -
the payload_template is to parse the incoming MQTT telegram - pack_template is used to format
the CAN telegram?
The SDO telegram transmitted via commandline cansend 601#2B10170000020000 is
formatted cob_id#b0b1b2b3b4b5b6b7. Do I have to use at pack_template 9 characters (with can_id)
or 8 characters (without can_id)?

from can2mqtt.

jgeisler0303 avatar jgeisler0303 commented on September 27, 2024

Yes, payload_template is to parse the incoming MQTT telegram and pack_template together with var_names defines the CAN message body (excluding the CAN ID). CAN ID is taken from the canid configuration parameter and can either be a number or a variable named in the payload_template. The message is then assembled like canid#payload_template.

What are you using mqtt2can for, if I may ask?

from can2mqtt.

OlafTheSnowman avatar OlafTheSnowman commented on September 27, 2024

OK, this information from you was the breakthrough :-) From the example config I couldn't see that I have to exclude the can_id from var_names. Transmisson side is now running too! The CAN telegram is traced by candump.

I want to setup my homeautomation with can2mqtt, some years ago I installed an used OMRON PLC and now I'm afraid it could break down. So want to use a WAGO CANopen coupler with digital I/Os for it. The new setup is OpenHAB2 <-> Mosquitto <-> can2mqtt <-> CAN controller(MCP2515)@Raspiberry pi <-> WAGO 750 series.

Thank you very much.

from can2mqtt.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.