c3re / can2mqtt Goto Github PK
View Code? Open in Web Editor NEWCAN-Bus <-> MQTT-Bridge: bidirectional, configurable and extendable
License: MIT License
CAN-Bus <-> MQTT-Bridge: bidirectional, configurable and extendable
License: MIT License
In some cases (for example if you just want to extract data from a car or a heater) you may want to disable the bidirectional mode of can2mqtt and to restrict the data flow in only one direction.
mqtt payload "test" crashes can2mqtt in convertmode 4uint82ascii
I have the following Line in my csv:
2349007619,none,eg/foo
On invocation I get:
"
main: the following CAN-MQTT pairs have been extracted:
main: CAN-ID conversion mode MQTT-topicmain: 2147483647 none eg/foo
canbushandler: received CAN-Frame: (ID:2349007619). Locking mutex
canbushandler: mutex was locked successfully.
canbushandler: ID:2349007619 was not subscribed. /dev/nulled that frame...
canbushandler: unlocked mutex.
"
It looks like a int32 -> uint32 conversion problem.
mqtt payload "test" in 2uint322ascii
crashes can2mqtt
I want the binary to be able to report its own version.
because the project is on github and is world readable i want it to be documented in english so as many people as possible are (re)use it
Mqtt-payload "test" will crash can2mqtts convertmode 16bool2ascii
I try running on raspberry pi and I got an error:
mqtthandler: Oh no an error occured...
panic: Not Authorised
goruntime 1 [running]:
github.comc3re/can2mqtt.mqttStart(0x29fa8a, 0x14)
/home/openhabian/go_projects/src/github.com/c3re/can2mqtt/mqtthandling.go:22 +0x35c
github.com/c3re/can2mqtt.Start()
/home/openhabian/go_projects/src/github.com/c3re/can2mqtt/main.go:66 +0x6c
main.main()
/home/openhabian/go_projects/src/github.com/c3re/can2mqtt/can2mqtt/main.go:33 +0x298
The conversion methods should become an interface
The idea is to have an configurable convert-mode that does not require re-compiling of the application. For example:
Having a second config-file which can contain custom-convertmodes written in a small, feature-restricted language (research needed here, probably CEL). The additional convertmodes can then be used in the csv-file as usual
for example https://cobra.dev/
Currently can2mqtt uses github.com/brendoncarroll/go-can to deal with socketcan. A disadvantage of that is that cgo is used. This has some disadvantages:
Try out https://github.com/brutella/can as a replacement. It seems that it does not use cgo.
Would it be possible to add support for MQTT servers that require a username and password?
Hi
Is there a simple way to convert from MQTT to CAN? (The opposite of this package)
Thanks,
Adel
I know that can2mqtt is used in one or the other homeassistant installation. Check whether the integration can be improved:
I want it to be possible to reload the config via a POSIX Signal like SIGUSR1
also see #34
mqtt payload "test" crashes can2mqtt in convertmode 8uint82ascii
although this is not strictly can2mqtt related, it might be worth adding instructions how to setup a canbus interface on a raspberry. So that it is usable with can2mqtt.
my next task, or maybe the task of someone else who wants to participate is to clearly define and divide tasks for the different functions. currently some functions with the same name (e.g. convert2CAN and convert2MQTT) do different things. sometimes a function does only the plain conversion and another time the function is executing the conversion and the sending of the message
mqtt payload "test" will crash can2mqtt in 4int162ascii
I want the documentation in a go doc way. I don't know what that means yet but i will find out
mqtt payload "test" will crash can2mqtt in convertmode 4uint162ascii
for example: https://github.com/sirupsen/logrus
Maybe (just an idea) can2mqtt could expose an (optional) metrics endpoint that can be scraped by prometheus with stats about:
I want the commandline arguments to be well documented and interchangeable. Right now all the options have to appear in one specific order. i want that to be unnecessary
mqtt payload "test" will crash can2mqtt in convertmode pixelbin2ascii
All command line Options should have default options
Add a mode where all unmentioned IDs in the can2mqtt.csv are filled up with a default line such as
ID,none,can2mqtt/ID
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.