### Install and Build ebusd (Debian/Ubuntu) Source: https://context7.com/john30/ebusd/llms.txt Installs build dependencies, clones the repository, and builds ebusd from source using autoconf. Includes steps for enabling and starting the daemon as a system service. ```bash # Install build dependencies (Debian/Ubuntu) apt install git autoconf automake g++ make libssl-dev libmosquitto-dev # Clone and build git clone https://github.com/john30/ebusd.git cd ebusd ./autogen.sh # configure with autoconf make make install-strip # installs to /usr/bin/ebusd # Alternative: cmake cmake . make install/strip # Enable and start as system service (systemd) sudo systemctl enable ebusd sudo service ebusd start # Or run in foreground with an enhanced serial adapter ebusd -f -d ens:/dev/ttyUSB0 --scanconfig --httpport=8080 --mqttport=1883 --mqtthost=localhost ``` -------------------------------- ### Install KNX Configuration Files Source: https://github.com/john30/ebusd/blob/master/CMakeLists.txt Installs KNX-related configuration files to /etc/ebusd/ if the HAVE_KNX option is enabled. This facilitates the setup of KNX communication. ```cmake if(HAVE_KNX) FILE(GLOB KNX_CFG_FILES "${CMAKE_SOURCE_DIR}/contrib/etc/ebusd/knx*.cfg") install(FILES ${KNX_CFG_FILES} DESTINATION /etc/ebusd/) endif(HAVE_KNX) ``` -------------------------------- ### Install MQTT Configuration Files Source: https://github.com/john30/ebusd/blob/master/CMakeLists.txt Installs MQTT-related configuration files to /etc/ebusd/ if the HAVE_MQTT option is enabled. This allows for easy configuration of MQTT support. ```cmake if(HAVE_MQTT) FILE(GLOB MQTT_CFG_FILES "${CMAKE_SOURCE_DIR}/contrib/etc/ebusd/mqtt-*.cfg") install(FILES ${MQTT_CFG_FILES} DESTINATION /etc/ebusd/) endif(HAVE_MQTT) ``` -------------------------------- ### Install Dependencies on Ubuntu Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Installs necessary packages for building ebusd on Ubuntu systems using apt. ```bash apt install git autoconf automake g++ make ``` -------------------------------- ### Example Table Demonstrating Defaults Source: https://github.com/john30/ebusd/wiki/4.2.-Defaults This table illustrates how default rows (starting with *) can simplify message definitions by providing common values for circuit, ID, and other fields. Blank cells in subsequent rows inherit values from the preceding default row of the same type. ```text | type | circuit | name | comment | QQ | ZZ | PBSB | ID | field1 | part | type/templates | divider/values | unit | comment | field2 | part | type/templates | divider/values | unit | comment | |------|---------|--------------|---------|----|----|------|------|-------------|------|----------------|----------------|------|-------------|--------|------|----------------|----------------------------|------|---------------| | *r | ehp | | | | 08 | B509 | 0D | | | | | | | | | | | | | | *w | ehp | | | | 08 | B509 | 0E | | | | | | | | | | | | | | r1 | | brinetemp | | | | | 0F00 | temp | | D2C | | °C | temperature | sensor | | UCH | 0=ok;85=circuit;170=cutoff | | sensor status | | r;w | | brinetempcal | | | | | CD00 | calibration | | D2C | | K | | | | | | | | ``` -------------------------------- ### Start listening Source: https://github.com/john30/ebusd/wiki/3.1.-TCP-client-commands Execute the listen command without arguments to begin monitoring changed values on the ebus. ```bash listen ``` -------------------------------- ### Install Dependencies on Alpine Linux Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Installs necessary packages for building ebusd on Alpine Linux systems using apk. ```bash apk add build-base git cmake ``` -------------------------------- ### Start ebusd with Home Assistant MQTT Discovery Source: https://context7.com/john30/ebusd/llms.txt Enable automatic device and entity registration in Home Assistant by starting ebusd with the `--mqttint` option pointing to the Home Assistant configuration file and enabling MQTT JSON output. ```bash # Start ebusd with HA MQTT Discovery integration ebusd -d ens:/dev/ttyUSB0 --scanconfig \ --mqtthost=192.168.1.10 \ --mqttport=1883 \ --mqttint=/etc/ebusd/mqtt-hassio.cfg \ --mqttjson ``` -------------------------------- ### Example ebusd Configuration with Instructions Source: https://github.com/john30/ebusd/wiki/4.9.-Instructions Demonstrates the usage of '!load' and '!include' instructions within an ebusd configuration file, showing conditional loading and unconditional inclusion. ```ebusd-config *[PROD],scan,id,,product [PROD='0010002315']!load,bai.0010002315.inc [PROD='0010003958']!load,bai.0010002465.inc !load,bai.308523.inc !include,errors.inc !include,hcmode.inc ``` -------------------------------- ### Install ebuspicloader Executable Source: https://github.com/john30/ebusd/blob/master/src/tools/CMakeLists.txt Installs the ebuspicloader target to the 'bin' directory within the export set 'ebusd'. This makes the executable available after installation. ```cmake install(TARGETS ebuspicloader EXPORT ebusd DESTINATION bin) ``` -------------------------------- ### Install ebusd Binaries Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Installs the compiled ebusd binaries to the system, stripping debug symbols. ```bash make install-strip ``` -------------------------------- ### Install Dependencies on Arch Linux Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Installs necessary packages for building ebusd on Arch Linux systems using pacman. ```bash pacman -S git autoconf automake gcc make ``` -------------------------------- ### Install Dependencies on Debian Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Installs necessary packages for building ebusd on Debian-based systems using dpkg. ```bash dpkg install git autoconf automake g++ make libssl-dev ``` -------------------------------- ### Setting up Pseudo Terminals for ebusfeed with socat Source: https://github.com/john30/ebusd/wiki/5.-Tools This example demonstrates setting up two pseudo terminals using socat for use with ebusfeed and ebusd. ```bash socat -d -d pty,raw,echo=0 pty,raw,echo=0 ``` ```bash ln -s /dev/pts/2 /dev/ttyUSB60 ``` ```bash ln -s /dev/pts/3 /dev/ttyUSB20 ``` ```bash ebusd -f -d /dev/ttyUSB20 ``` ```bash ebusfeed /path/to/ebus_dump.bin ``` -------------------------------- ### Example HTTP Query for ebusd Data Source: https://github.com/john30/ebusd/wiki/3.2.-HTTP-client This example demonstrates a verbose query for all messages in the 'mc' circuit, filtered by time and exact name matching. It shows how to construct a URL to retrieve specific data from the ebusd HTTP interface. ```http http://localhost:8080/data/mc?verbose&since=1483890000&exact ``` -------------------------------- ### Install Debian-specific Files Source: https://github.com/john30/ebusd/blob/master/CMakeLists.txt Installs ebus service and default configuration files to standard Debian locations if the /etc/debian_version file exists. This ensures proper integration with the Debian system. ```cmake if(EXISTS "${ROOT}/etc/debian_version") install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/default/ebusd DESTINATION /etc/default/) install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/init.d/ebusd DESTINATION /etc/init.d/) install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/systemd/ebusd.service DESTINATION /lib/systemd/system/) endif() ``` -------------------------------- ### Install Dependencies on Mac OS X Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Installs necessary packages for building ebusd on Mac OS X using Homebrew. ```bash brew install automake autoconf ``` -------------------------------- ### Configure ebusd with Autoconf (Default Prefix) Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Configures the build system using autoconf with the default installation prefix. ```bash ./autogen.sh ``` -------------------------------- ### Deploy ebusd with Docker Source: https://context7.com/john30/ebusd/llms.txt Demonstrates deploying ebusd using the official Docker image. Includes examples for interactive runs with USB serial adapters, background daemon deployment with MQTT and HTTP, and using environment variables. ```bash # Pull latest stable image docker pull john30/ebusd # Run interactively with USB serial adapter docker run --rm -it --device=/dev/ttyUSB1:/dev/ttyUSB0 -p 8888:8888 \ john30/ebusd -d ens:/dev/ttyUSB0 # Run as background daemon with MQTT and HTTP on a network adapter docker run -d --name=ebusd \ -p 8888:8888 -p 8080:8080 \ john30/ebusd \ --scanconfig \ -d ens:192.168.1.50 \ --latency=20 \ --httpport=8080 \ --mqttport=1883 \ --mqtthost=192.168.1.10 # Same via environment variables (useful in docker-compose.yaml) docker run -d --name=ebusd -p 8888:8888 \ -e EBUSD_SCANCONFIG= \ -e EBUSD_DEVICE=ens:192.168.1.50 \ -e EBUSD_HTTPPORT=8080 \ -e EBUSD_MQTTPORT=1883 \ -e EBUSD_MQTTHOST=192.168.1.10 \ john30/ebusd # mDNS auto-discovery (requires host network for multicast) docker run --rm -it -p 8888:8888 --network=host john30/ebusd --scanconfig --latency=20 # View logs docker logs ebusd ``` -------------------------------- ### Start ebusd with Full Access Level Source: https://context7.com/john30/ebusd/llms.txt Start the ebusd service with the wildcard access level, granting access to all messages. ```bash ebusd --accesslevel='*' ``` -------------------------------- ### Example Message Definition Using Templates Source: https://github.com/john30/ebusd/wiki/4.4.-Field-templates Shows how message definitions can leverage field templates to simplify their structure. The 'tempsensor' template is used for 'brinetemp', and 'calibration' for 'brinetempcal'. ```csv type,circuit,name,comment,QQ,ZZ,PBSB,ID,field1,part,type/templates,divider/values,unit,comment *r,ehp,,,,08,B509,0D,,, *w,ehp,,,,08,B509,0E,,, r1,,brinetemp, ,,,,0F00,,tempsensor,,, r;w,,brinetempcal,,,,,CD00,,calibration,,, ``` -------------------------------- ### Start ebusd with ACL and Default Level Source: https://context7.com/john30/ebusd/llms.txt Start the ebusd service with a specified ACL file and an initial access level. An empty access level grants public access. ```bash ebusd --aclfile=/etc/ebusd/acl.conf --accesslevel="" ``` -------------------------------- ### IP Configuration Success Output Source: https://github.com/john30/ebusd/blob/master/src/tools/README.md Example output confirming successful IP address configuration. It displays the device details and the new settings applied, including MAC address, IP address, and variant. ```text Device ID: 30b0 (PIC16F15356) Device revision: 0.2 Bootloader version: 2 [73c8] Firmware version: 1 [7f16] MAC address: ae:b0:53:26:15:80 IP address: DHCP (default) Arbitration delay: 200 us (default) Visual ping: on (default) Variant: Ethernet, ignore hardware jumpers Writing settings: done. Settings changed to: MAC address: ae:80:53:26:15:80 IP address: 192.168.1.10/24 Arbitration delay: 200 us (default) Visual ping: on (default) Variant: Ethernet, ignore hardware jumpers ``` -------------------------------- ### Configure ebusd with Autoconf (Custom Prefix) Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Configures the build system using autoconf, specifying a custom installation prefix. ```bash ./autogen.sh --prefix=/usr/local ``` -------------------------------- ### Enable ebusd systemd service Source: https://github.com/john30/ebusd/wiki/2.-Run Enable the ebusd service to start automatically on system boot using systemctl. ```bash sudo systemctl enable ebusd ``` -------------------------------- ### Enable ebusd chkconfig service Source: https://github.com/john30/ebusd/wiki/2.-Run Enable the ebusd service to start automatically on system boot using chkconfig. ```bash sudo chkconfig ebusd on ``` -------------------------------- ### Firmware Flashing Success Output Source: https://github.com/john30/ebusd/blob/master/src/tools/README.md Example output indicating a successful firmware flash operation. It shows device details, bootloader version, and confirmation of flashing completion. ```text Device ID: 30b0 (PIC16F15356) Device revision: 0.2 Bootloader version: 2 [73c8] Firmware version not found MAC address: ae:b0:53:26:15:80 IP address: DHCP (default) Arbitration delay: 200 us (default) Visual ping: on (default) Variant: USB/RPI (high-speed), allow hardware jumpers (default) New firmware version: 1 [7f16] erasing flash: done. flashing: 0x0400 ................................................................ ... 0x2c00 ................................................................ 0x3000 . flashing finished. flashing succeeded. ``` -------------------------------- ### Start eBus Request and Periodic Execution Source: https://github.com/john30/ebusd/blob/master/contrib/html/index.html Initiates a request and sets up a periodic execution for it. Ensure the 'startRequest' function is defined and handles exceptions appropriately. ```javascript on() { console.log("failed"); running = false; }, onException: function(trans,e) { console.log(e); running = false; } }); }; startRequest(); new PeriodicalExecuter(startRequest, 15); }); }); ``` -------------------------------- ### Listen command options Source: https://github.com/john30/ebusd/wiki/3.1.-TCP-client-commands Use the listen command to start or stop printing changed values. Options control verbosity and filtering of unknown messages. ```bash listen [-v|-V] [-n|-N] [-u|-U] [stop] -v increase verbosity (include names/units/comments) -V be very verbose (include names, units, and comments) -n use numeric value of value=name pairs -N use numeric and named value of value=name pairs -u include unknown messages -U only show unknown messages ``` -------------------------------- ### Start ebusd for Potentiometer Adjustment Source: https://github.com/john30/ebusd/wiki/Legacy-hardware Run ebusd in foreground mode with specific logging options to aid in potentiometer adjustment. Replace `$DEVICE` with your serial device path. ```bash ebusd -f -c /tmp --logareas bus --loglevel info --lograwdata=bytes -d $DEVICE ``` -------------------------------- ### Enable ebusd on systemd Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Enables and starts the ebusd service on systems using systemd. ```bash sudo systemctl enable ebusd sudo service ebusd start ``` -------------------------------- ### ebusd Find Command Example: CSV Output Source: https://github.com/john30/ebusd/wiki/3.1.-TCP-client-commands Example of using the 'find' command with '-f' to list messages in CSV format, filtered by circuit and name. ```bash find -f -c broadcast outsidetemp ``` -------------------------------- ### Enable ebusd on SystemV Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Enables and starts the ebusd service on systems using SystemV init scripts. ```bash sudo update-rc.d ebusd defaults sudo update-rc.d ebusd enable sudo /etc/init.d/ebusd start ``` -------------------------------- ### Run ebusd with MQTT Broker Source: https://github.com/john30/ebusd/blob/master/contrib/docker/README.md Start the ebusd Docker container in the background and configure it to connect to a specified MQTT broker. Replace BROKERHOST with your MQTT broker's hostname or IP address. ```bash docker run -d --name=ebusd --device=/dev/ttyUSB0 -p 8888 john30/ebusd --scanconfig -d ens:/dev/ttyUSB0 --mqttport=1883 --mqtthost=BROKERHOST ``` -------------------------------- ### Example ebusd Raw Data Output Source: https://github.com/john30/ebusd/wiki/Legacy-hardware Example log output showing raw bus data, useful for verifying potentiometer adjustment. Look for consistent `201],scan,,,SW,,>201 ``` -------------------------------- ### Enable SSL Support Source: https://github.com/john30/ebusd/blob/master/CMakeLists.txt Finds the SSL and crypto libraries and enables SSL support if the 'ssl' option is ON. ```cmake find_library(HAVE_SSL ssl) find_library(LIB_CRYPTO crypto) if(HAVE_SSL) if(LIB_CRYPTO) option(ssl "disable support for SSL." ON) if(ssl STREQUAL ON) message(STATUS "SSL enabled") set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBS} ${HAVE_SSL} ${LIB_CRYPTO}") else(ssl STREQUAL ON) unset(HAVE_SSL) endif(ssl STREQUAL ON) else(LIB_CRYPTO) message(FATAL_ERROR "crypto library not available") endif(LIB_CRYPTO) endif(HAVE_SSL) ``` -------------------------------- ### Condition Declaration Example: Specific Value Source: https://github.com/john30/ebusd/wiki/4.5.-Conditions Example of a condition declaration checking if the first numeric field of a specific message matches a single, exact value. ```ebusd-config *[dhw],mc,CfgHeatSinkType,water,,,2 ``` -------------------------------- ### Run ebusd with Home Assistant MQTT Discovery Source: https://github.com/john30/ebusd/wiki/MQTT-integration Use these arguments to run ebusd with Home Assistant's MQTT Discovery integration. Replace `` with your MQTT broker's hostname. This configuration publishes data with the `ebusd` topic prefix and discovery information to `homeassistant`. ```bash ebusd ... \ --mqtthost --mqttport 1883 \ --mqttint=/etc/ebusd/mqtt-hassio.cfg \ --mqttjson ``` -------------------------------- ### Condition Declaration Example: Value Range Source: https://github.com/john30/ebusd/wiki/4.5.-Conditions Example of a condition declaration checking if the first numeric field of a specific message falls within a given range. ```ebusd-config *[brinetowater],ehp,ApplianceCode,,,,4-10 ``` -------------------------------- ### Condition Declaration Example: Scan Success Source: https://github.com/john30/ebusd/wiki/4.5.-Conditions Example of a condition declaration that checks for the successful scan of the own slave address. This can also be used to check for a specific software version. ```ebusd-config *[SW],scan,,,SW,, ``` -------------------------------- ### Run ebusd Help Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Executes the compiled ebusd binary to display its command-line help. ```bash ./src/ebusd/ebusd --help ``` -------------------------------- ### ebusd Find Command Example: Specific Columns CSV Output Source: https://github.com/john30/ebusd/wiki/3.1.-TCP-client-commands Example of using the 'find' command with '-F' to list messages with only specific columns (name and comment) in CSV format, filtered by circuit and name. ```bash find -F name,comment -c broadcast outsidetemp ``` -------------------------------- ### Read values from an inline message definition Source: https://github.com/john30/ebusd/wiki/3.1.-TCP-client-commands Read a message using an inline definition. This requires the daemon to be started with '--enabledefine'. ```bash read [-f] [-m SECONDS] [-s QQ] [-d ZZ] [-v|-V] [-n|-N] [-i VALUE[;VALUE]*] -def DEFINITION ``` -------------------------------- ### MQTT Home Assistant Discovery Integration Source: https://context7.com/john30/ebusd/llms.txt Enables automatic device and entity registration in Home Assistant via MQTT Discovery. ```APIDOC ## MQTT Home Assistant Discovery ### Description Enables automatic device and entity registration in Home Assistant via MQTT Discovery. ebusd publishes discovery messages to `homeassistant//ebusd__/config`. ### Configuration - Start ebusd with `--mqttint=/path/to/mqtt-hassio.cfg`. - Override area name with `--mqttvar="area="`. - Enable write entities by appending `|^w` to the `filter-direction` line in the configuration file. ### Example Discovery Config (Sensor) ```json { "name": "Outside Temperature", "state_topic": "ebusd/broadcast/outsidetemp", "unit_of_measurement": "°C", "device": {"identifiers": ["ebusd"], "name": "ebusd", "area": "Heating"}, "unique_id": "ebusd_broadcast_outsidetemp" } ``` ``` -------------------------------- ### eBUS PIC Loader Help Output Source: https://github.com/john30/ebusd/blob/master/src/tools/README.md Displays the available command-line options for the ebuspicloader tool. Use this to understand the various settings for IP configuration, eBUS options, PIC options, and general tool settings. ```text Usage: ebuspicloader [OPTION...] PORT A tool for loading firmware to the eBUS adapter PIC and configure adjustable settings. IP options: -d, --dhcp set dynamic IP address via DHCP (default) -g, --gateway=GW set fix IP gateway to GW (if necessary and other than net address + 1) -i, --ip=IP set fix IP address (e.g. 192.168.0.10) -m, --mask=MASK set fix IP mask (e.g. 24) -M, --macip set the MAC address suffix from the IP address -N, --macid set the MAC address suffix from internal ID (default) eBUS options: -a, --arbdel=US set arbitration delay to US microseconds (0-620 in steps of 10, default 200, since firmware 20211128) PIC options: -f, --flash=FILE flash the FILE to the device -o, --pingoff disable visual ping -p, --pingon enable visual ping (default) -r, --reset reset the device at the end on success --variant=VARIANT set the VARIANT to U=USB/RPI (high-speed), W=WIFI, E=Ethernet, N=non-enhanced USB/RPI/WIFI, F=non-enhanced Ethernet (lowercase to allow hardware jumpers, default "u", since firmware 20221206) Tool options: -s, --slow low speed mode for transfer (115kBd instead of 921kBd) -v, --verbose enable verbose output -?, --help give this help list --usage give a short usage message -V, --version print program version PORT is either the serial port to use (e.g. /dev/ttyUSB0) that also supports a trailing wildcard '*' for testing multiple ports, or a network port as "ip:port" for use with e.g. socat or ebusd-esp in PIC pass-through mode. ``` -------------------------------- ### Start ebus Data Polling Source: https://github.com/john30/ebusd/blob/master/contrib/html/index.html Initiates a long-polling request to fetch ebus data updates since the last update. Use for real-time data synchronization. ```javascript var running = false, firstrun = true; var since = 0; var startRequest = function() { if (running) return; running = true; new Ajax.Request('/data/?verbose&since='+since,{ method:'get', onSuccess: function(trans) { if (firstrun) { firstrun = false; } for (var cname in trans.responseJSON) { if (!trans.responseJSON.hasOwnProperty(cname)) { continue; } var circuit = trans.responseJSON[cname]; if (cname!='global' && circuit.hasOwnProperty('messages')) { circuit = circuit['messages']; } for (var mname in circuit) { if (!circuit.hasOwnProperty(mname)) { continue; } var message = circuit[mname]; var lastup = message.lastup; if (lastup>since) { since = lastup; } var fields = message.fields; if (fields && allCircuits[cname]) { var cmessages = allCircuits[cname].messages; if (cmessages) { var msg = cmessages[mname]; if (msg) { msg.fields = fields; } } } var key = cname+'/'+mname; var needed = false; if (switchActions.hasOwnProperty(key)) { switchActions[key](fields); needed = true; } var elems = $$('div[data-id="'+key+'"]'); if (elems.length>0) { needed = true; } if (cname!='global' && !message.fields) { continue; } each(elems, function(elem) { elem.innerHTML = buildText(elem.getAttribute('data-format'), message, cname, mname); }); } } for (var i=0; i201][HW>=100]r,ehp,prerun,,,08,B509,0D9E01,... ``` -------------------------------- ### ebusd Data Format with Circuit/Name in Payload for Azure IoT Hub Source: https://github.com/john30/ebusd/wiki/MQTT-integration Example JSON payload when ebusd is configured to move circuit and message name into the payload by modifying the MQTT topic. ```json { "event": { "origin": "ebusd", ... "properties": { ... }, "payload": { "circuit": "broadcast", "name": "datetime", "fields": { "outsidetemp": {"value": 5.125}, "time": {"value": "14:22:02"}, "date": {"value": "05.02.2022"} } } } } ``` -------------------------------- ### TCP Client - Auth, Log, Reload, and Raw Commands Source: https://context7.com/john30/ebusd/llms.txt Miscellaneous daemon control commands. ```APIDOC ## ebusctl auth [user] [password] ### Description Authenticates with the ebusd daemon using provided user credentials (e.g., for ACL users). ### Method CLI Command ### Endpoint N/A ### Parameters - **user** (string) - Required - The username for authentication. - **password** (string) - Required - The password for authentication. ### Request Example ```bash ebusctl auth installer mypassword ``` ### Response 'done' on success. ``` ```APIDOC ## ebusctl log ### Description Queries the current log levels for different areas of the ebusd daemon. ### Method CLI Command ### Endpoint N/A ### Parameters N/A ### Request Example ```bash ebusctl log ``` ### Response Lists the current log level for each area (e.g., main, bus, update). ``` ```APIDOC ## ebusctl log [area] [level] ### Description Sets the log level for a specific area or all areas. ### Method CLI Command ### Endpoint N/A ### Parameters - **area** (string) - Required - The log area to set (e.g., 'all', 'main', 'bus'). - **level** (string) - Required - The log level to set (e.g., 'notice', 'info', 'error', 'debug'). ### Request Example ```bash ebusctl log all error ebusctl log bus info ``` ### Response N/A ``` ```APIDOC ## ebusctl raw ### Description Toggles raw message logging, which provides a hex dump of each complete bus message. ### Method CLI Command ### Endpoint N/A ### Parameters N/A ### Request Example ```bash ebusctl raw ``` ### Response Indicates that raw logging has started or stopped. ``` ```APIDOC ## ebusctl raw bytes ### Description Toggles byte-level logging, providing a hex dump of individual bytes transmitted on the bus. ### Method CLI Command ### Endpoint N/A ### Parameters N/A ### Request Example ```bash ebusctl raw bytes ``` ### Response Indicates that byte-level logging has started or stopped. ``` ```APIDOC ## ebusctl reload ### Description Reloads all CSV configuration files without requiring a restart of the ebusd daemon. ### Method CLI Command ### Endpoint N/A ### Parameters N/A ### Request Example ```bash ebusctl reload ``` ### Response 'done' on success. ``` ```APIDOC ## ebusctl quit ### Description Closes the TCP connection to the ebusd daemon. ### Method CLI Command ### Endpoint N/A ### Parameters N/A ### Request Example ```bash ebusctl quit ``` ### Response N/A ``` ```APIDOC ## nc -q1 localhost 8888 (shortcut) ### Description Uses netcat to send a single character command to the ebusd daemon on port 8888, acting as a shortcut for some commands (e.g., 'i' for info). ### Method CLI Command (using netcat) ### Endpoint N/A ### Parameters - **'i'** (string) - Example command character. ### Request Example ```bash echo "i" | nc -q1 localhost 8888 ``` ### Response Depends on the command sent (e.g., daemon info for 'i'). ``` -------------------------------- ### Send initial escape symbol Source: https://github.com/john30/ebusd/wiki/2.-Run Use the --initsend option to send an initial escape symbol after connecting the device, which can be necessary for UDP connections. ```bash ebusd --initsend ``` -------------------------------- ### ebusd Global Status Data Format for Azure IoT Hub Source: https://github.com/john30/ebusd/wiki/MQTT-integration Example JSON payload for ebusd global status when sent to Azure IoT Hub with the default topic configuration. ```json { "event": { "origin": "ebusd", ... "properties": { ... "application": { "circuit": "global" } }, "payload": true } } ``` -------------------------------- ### TCP Client - Info and State Commands Source: https://context7.com/john30/ebusd/llms.txt Commands for querying daemon status, device connection info, and bus signal quality. ```APIDOC ## ebusctl state ### Description Queries the current state of the ebus signal, including acquisition status and symbol rate. ### Method CLI Command ### Endpoint N/A ### Parameters N/A ### Request Example ```bash ebusctl state ``` ### Response Provides information about the bus signal quality and activity. ``` ```APIDOC ## ebusctl info ### Description Retrieves comprehensive information about the ebusd daemon, connected devices, and bus scan results. ### Method CLI Command ### Endpoint N/A ### Parameters N/A ### Request Example ```bash ebusctl info ``` ### Response Detailed daemon and bus information, including version, device details, signal status, and scanned addresses. ``` ```APIDOC ## ebusctl auth [user] [password] ### Description Authenticates with the ebusd daemon using provided user credentials. ### Method CLI Command ### Endpoint N/A ### Parameters - **user** (string) - Required - The username for authentication. - **password** (string) - Required - The password for authentication. ### Request Example ```bash ebusctl auth admin secret123 ``` ### Response Indicates successful authentication or an error. ``` -------------------------------- ### Serve static files with ebusd Source: https://context7.com/john30/ebusd/llms.txt Use the root path to serve static files from the directory specified by the `--htmlpath` option. ```bash # Serve a static file from --htmlpath curl http://localhost:8080/index.html ``` -------------------------------- ### Enable write entities for Home Assistant Source: https://context7.com/john30/ebusd/llms.txt Enable write entities for Home Assistant integration by appending `|^w` to the `filter-direction` line in the ebusd MQTT configuration file. Use with caution as values change immediately in the HA UI. ```bash # Enable write entities (use with care — values change immediately in HA UI) # Edit /etc/ebusd/mqtt-hassio.cfg and append |^w to filter-direction line ``` -------------------------------- ### Mosquitto Bridge Configuration for RabbitMQ Source: https://github.com/john30/ebusd/wiki/MQTT-bridge-remote This configuration snippet is for `/etc/mosquitto/conf.d/rabbit.conf` and sets up a bridge to a RabbitMQ broker. Replace placeholders with your specific environment details. Ensure the `bridge_protocol_version` is compatible with your brokers. ```mosquitto # example configuration for bridging a RabbitMQ broker using a _non-encrypted_ connection connection Rabbit # If try_private is set to true, the bridge will attempt to indicate to the remote broker that it is a bridge not an ordinary client. # If successful, this means that loop detection will be more effective and that retained messages will be propagated correctly. # Not all brokers support this feature so it may be necessary to set try_private to false if your bridge does not connect properly. try_private false # RabbitMQ server configuration, change IP address and add username/password if necessary address RABBITMQ_SERVER_IP_OR_HOSTNAME remote_clientid mosquitto_krypton remote_username RABBITMQ_USERNAME remote_password RABBITMQ_PASSWORD # MQTT tweaks (works for me(tm)) bridge_attempt_unsubscribe false bridge_protocol_version mqttv311 bridge_insecure true # forward ebusd MQTT messages between mosquitto server and RabbitMQ server # using prefix 'krypton' on RabbitMQ server instance # Note: in this example 'krypton' is the hostname of a host running # ebusd service allowing us to easily distinguish between multiple sources topic # both 2 ebusd/ krypton/ebusd/ ``` -------------------------------- ### Run ebusd with Security Options Source: https://github.com/john30/ebusd/blob/master/contrib/docker/README.md Run the ebusd Docker container with seccomp security options disabled to circumvent potential access restrictions on older operating systems. ```bash --security-opt seccomp=unconfined ``` -------------------------------- ### Fetch and Add Item Data Source: https://github.com/john30/ebusd/blob/master/contrib/html/index.html Fetches item data from a JSON endpoint using AJAX and then calls `addItemFin` to process and add the item to the UI. This is used for loading individual circuit configurations. ```javascript var addItem = function(parent, name, messages, allCircuits, needEndpoints, needUris) { new Ajax.Request('/items/'+name+'.json',{ method:'get', asynchronous:false, onSuccess: function(trans) { addItemFin(parent, name, messages, allCircuits, needEndpoints, needUris, trans.responseJSON); } }); }; ``` -------------------------------- ### Enable KNX Support Source: https://github.com/john30/ebusd/blob/master/CMakeLists.txt Manages the 'knx' option to enable or disable support for KNX handling. ```cmake option(knx "disable support for KNX handling." ON) if(knx STREQUAL ON) message(STATUS "KNX enabled") set(HAVE_KNX 1) else(knx STREQUAL ON) unset(HAVE_KNX) endif(knx STREQUAL ON) ``` -------------------------------- ### ebusd Circuit/Message Data Format for Azure IoT Hub Source: https://github.com/john30/ebusd/wiki/MQTT-integration Example JSON payload for specific circuit and message data (e.g., datetime) when sent to Azure IoT Hub with the default topic configuration. ```json { "event": { "origin": "ebusd", ... "properties": { ... "application": { "circuit": "broadcast", "name": "datetime" } }, "payload": { "outsidetemp": {"value": 5.125}, "time": {"value": "14:22:02"}, "date": {"value": "05.02.2022"} } } } ``` -------------------------------- ### Configure ebusd with CMake Source: https://github.com/john30/ebusd/wiki/1.-Build-and-install Generates Makefiles for building ebusd using cmake. ```bash cmake . ```