VSCP
29 posts in this category
Bed buttons and wake-up lights for the kids, driven by VSCP: the lights turn green at a set time on weekdays and later at the weekend. The decision matrix rows that make it work.
Firmware v1.20 for the Mespelare node adds the Control TurnOn and TurnOff actions, needed for the kids’ bed buttons and lights. Shows where the new code hooks into the decision matrix.
Sending VSCP events at set times from the daemon’s decision matrix, for example to turn off every light that was left on at night. Each field of the DM row explained.
Switching lights on the VSCP bus from a web page, with buttons and status indicators that talk to the VSCP daemon over websockets. Includes the decision matrix and daemon configuration.
A short video tour of my VSCP-based home automation system.
My checklist for configuring each Mespelare node as it goes into the house: loading the register template, mapping inputs to outputs and setting the LED and output control registers.
Installing vscp_software on a Raspberry Pi, every command with its output, from package updates and dependencies to building the software.
Switching the Hasselt VSCP firmware from its non-standard 250 kbps CAN bus speed back to the 125 kbps everyone else uses. A small register change in vscp18f_init().
Making a Mespelare VSCP node switch its own relays from its own buttons, so the lights keep working when the bus is down. Covers the code hook, a configurable output mapping and output modes.
Fixing a hang in sendCANFrame() when VSCP Works reads many registers at once, with a one-second send timeout.
Changing the Hasselt firmware’s Timer0 tick from 10 ms to 1 ms for the Mespelare node, and updating the code that relied on the old period. Includes a scope capture of the result.
A new Pulse action for the Hasselt firmware, so the decision matrix can drive the pulse relays in my house. Firmware, MDF and decision matrix changes.
How VSCP register addressing works: how registers in the MDF map onto the node’s application space and how the firmware stores them.
A walk through the structure of a VSCP Module Description File, from the XML header and module information to the registers, using the Mespelare module’s own MDF as the example.
Migrating the Mespelare firmware from Microchip’s retired C18 compiler to XC8, following the migration guide section by section.
A final prototype, Mespelare v9, to make sure the board design is right before ordering production PCBs. The fixes from v6, the tests and the firmware.
My roadmap for a VSCP home automation system, from the toolchain and testing Kurt’s boards to the Mespelare node, production and a reflow oven.
Updating the Mespelare node to the latest vscp_firmware from GitHub, and the compile errors and changes that came with it.
A DumpEEPROM() routine that prints the node’s EEPROM over the serial port, to check what VSCP Works actually wrote. Needed because every published Hasselt MDF turned out to be wrong.
Adding a serial debug port to the Hasselt VSCP firmware, so you can watch variables and program flow while the PIC runs. One #define switches all the debug output on or off.
Configuring the Mespelare node’s decision matrix through its registers so it reacts to events on the VSCP bus.
A function-by-function walk through the Hasselt VSCP firmware that the Mespelare node is based on, from the interrupts and main() to event handling, with a program flow diagram.
Getting the USB2CAN interface running with VSCP on Ubuntu: the driver, the VSCP daemon and testing the bus with VSCP Works.
Installing, configuring and testing the VSCP daemon on Windows, so several applications can share one bus interface. Includes the catches I ran into.
A reading list for VSCP beginners: the protocol introduction and specification, VSCP Works, filters and masks, the decision matrix and setting up the daemon on Linux.
Adapting the Hasselt code to the Mespelare board: pin assignments, the MDF location and setting the registers, then running it on the hardware for the first time.
Compiling kurtsidekick’s Hasselt firmware for the first time in MPLAB X, as the starting point for the Mespelare firmware: target settings, preserving EEPROM and programming the test board.
The hardware and software I use to learn and develop for VSCP: MPLAB X, a PICkit 3, a USB2CAN converter and VSCP Works.
The Mespelare VSCP node: a CAN bus board that reads a Niko six-button panel, drives its LEDs and six relay outputs, and breaks out the rest of the pins for expansion boards.