Protocol Wizard part 1. No more YAML! Run-time addition and control of devices and registers on the fly

Hi everyone! :wave:

I just published a new integration that makes working with ANY Modbus device in Home Assistant much easier — especially when you’re dealing with poorly documented hardware.

Introducing Modbus Wizard

No YAML! No restarts. Full runtime control.

With Modbus Wizard, you can:

  • Add serial (RS485/USB) or TCP/UDP Modbus devices directly from the UI
  • Test connectivity automatically on setup
  • Add, edit, or remove sensors at runtime — no need to restart HA!
  • Use templates to quickly load all needed device entities
  • Use the included Lovelace card to read/write any register live (perfect for reverse-engineering devices)
  • Configure scaling, offset, byte/word order, data types, and more — all per-register
  • Support for multiple devices simultaneously
  • Build your sensors runtime and onetime for ANY and multiple Modbus devices

Runtime register

Add and configure sensors without touching YAML or restarting

Live read/write card
Probe any register in real time — great for discovering undocumented devices

Why I built this

I got tired of:

  • Editing YAML and restarting HA just to test one register
  • Guessing addresses and data types
  • Dealing with devices that have no official integration
  • Endless yaml head-ache and maintenance

Modbus Wizard lets you explore first, then create only the sensors you actually need.

Try it out!

GitHub: https://github.com/partach/ha_modbus_wizard

Installation:

The included card is auto-registered — just add it to a dashboard and select your device.

Work in progress — but already very usable! Feedback, bug reports, and contributions very welcome.
This is a setup to a Protocol Wizard. Same setup but for many more protocols lke SNMP, etc. (if there is enough interest)

Let me know if you try it with your inverter, meter, or weird industrial gadget — I’d love to hear how it goes! :rocket:

Thanks! — Partach

3 Likes

Looks good. You still need to know what you are doing, so this may be a disappointment for the instant gratification crowd that are averse to reading documentation, or want their AI bots to hand things on a plate for them. It will make reverse engineering a whole lot easier.

You have some preset values in your code. Could you also have ‘templates’ that could be developed to have common default values that people encounter in certain setups and common boards such as the WaveShare RS485 series, and they could be preloaded to save typing mistakes?

Could you add a reminder note on the first page about the 120ohm termination resistors required. Two and only two, one at each end of the wiring chain. Maybe a diagram too?

Will this support multiple masters as well as multiple slaves?

Can the returned values from interrogation be displayed as HEX, ASCII and bitwise to help match up with documentation?

For support purposes, could a report summarising existing values be prepared, suitable for posting in these forums for troubleshooting or shared debugging and development? In yaml format he cheekily asks… :wink:

1 Like

Thanks for the detailed feedback and enthusiasm, really appreciate it! :blush:

Basically: Modbus Wizard is aimed at users who are willing to explore and learn their device as well making adding a device less cumbersome It lowers the barrier dramatically (no YAML, no restarts, live probing), but you still need to know (or figure out) addresses and data types. For many, that’s exactly the sweet spot — especially when official docs are missing or wrong.

As indicated, it is in early development, but i recognize many of your points. Most are on the backlog, but also want to see if there is need in the community for this.

Templates for Common Devices

Pre-defined templates would save a ton of time and reduce typos.

I was thinking about a “Load template” button/dropdown in the “Add register” flow with community-contributed presets, e.g.:

  • Waveshare RS485 boards (common voltage/current registers)
  • Popular inverters (e.g., generic float32 voltage at 0/2/4)
  • Energy meters (standard holding registers)
    Could you help create those? I have ordered a waveshare device yesterday for this and for active development and can use it as a basis.
    Also my other integrations is made (SDM630 and Felicity inverter) i can use to create the templates

Users can load a template as a starting point, then tweak. Contributions welcome via GitHub — I’ll set up a templates/ folder.

Termination Resistor Reminder

I can add a prominent info box on the first setup page:

Important: RS485 Termination For reliable communication, install 120Ω termination resistors at both ends of the RS485 chain only. More than two can degrade the signal; none can cause reflections and errors.
With some kind of link to futher explain. Personally i don’t use it much and seems to work pretty much always (also feels like raising the threshold to add this much detail / scare people away from playing around, on the other hand if it doesnt give reliable results you can get the same)

Multiple Masters / Multiple Slaves

  • Multiple slaves: Already fully supported (different slave IDs per device/integration instance). Also multiple devices as ‘hubs’ in HA.
  • Multiple masters: Not directly — HA acts as the master. But you can have multiple HA instances or other masters on the same bus (as long as they don’t transmit simultaneously).

Display Values in HEX, ASCII, Bitwise

Good one In the card’s “Raw Mode”, I’ll add toggle options to show the raw register(s) as:

  • Hex (e.g., 0x41E0 0x0000)
  • ASCII (if possible)
  • Binary/bitwise breakdown

Super useful for matching against device manuals.

Diagnostic Report Export

Needs some futher though I can add a button in the device options: “Export diagnostic report” → downloads a YAML/JSON with:

  • Device config
  • All defined registers
  • Current values
  • Connection status
  • Last errors?

Perfect for pasting into forum threads for troubleshooting.

Summary

All your suggestions are recognized and will make the integration much more user-friendly and powerful. I will need to prioritize:

  1. Termination reminder + diagram
  2. Raw mode display options
  3. Diagnostic export
    BUT i also want to turn this into a protocol wizard. Not only for Modbus so i will have to balance those.

Thanks again — feedback like this is great. It helps with developing it further into someting truly usefull for the community.
Watch the repo for updates!

If you (or anyone) has a Waveshare board or specific device you’d like a template for, let me know — happy to add the first few.

— Partach

Cheekily or not — your challenge was accepted, and I think we delivered! :smile:

New version v0.4.0 is live with some big improvements:

  • Device Templates — Pre-defined register sets for popular devices! Load them with one click → instant sensors, no manual entry needed. Currently included: SDM630 (3-phase meter) — fully tested and working great! More coming soon (WaveShare RS485 series templates added based on community data — untested by me yet, would love feedback!)
  • Raw Mode in the Card — Toggle to see register values in HEX, ASCII, and binary/bitwise views. Super helpful for matching device manuals during debugging.
  • Card readability improvements — Better layout, clearer labels, and overall polish.

Adding your own templates is easy! Just drop a JSON file in custom_components/ha_modbus_wizard/templates/ (see README for format). Have a device register map in YAML/table/PDF? Paste it here or feed it to Grok/ChatGPT with the SDM630 example — it’ll convert it to the right JSON format in seconds.

GitHub: Full details in the updated README.

Would love to hear what you think — especially if you try the SDM630 or WaveShare templates! Any devices you’d like to see added next?

Thanks again for the inspiration — this is getting really fun to build!

— Partach

1 Like

OK, quick updates and great functionality.

In your termination diagram, Waveshare might not be happy that their device is depicted, but then again, they might. Often a jumper has to be moved to enable an on-board termination resistor, and often you have to supply both resistors.

Can the wizard inspect a known working environment to document it and tweak it, where some default setting values have been overlooked, work anyway, but might break in the future? I’m thinking of those countless battery charging and solar inverter systems out there.

Where are you going to store the templates? Initially on GitHub, but once you have downloaded them locally, will you retain them as is, update them regularly when you release a new version, or just download them live each time they are needed? Is version control going to be needed where there are different versions of the same board by the same manufacturer? How about Chinese knockoff/clones - do they get a category too? Match your board by picture in a database? How are you going to keep up with the flood of new devices, making more and more templates as you go along?

Just ideas…

1 Like

I could make the USB dongle anonymous… but then again, it is great device, i have 3 and they work great! So free publicity? I dunno, just found a freely avaiable picture on the internet… If someone has a real problem with it, i will anonymise it.

Regarding your question “Can the wizard inspect a known working environment to document it and tweak it”, Yeah, basically it was one of the reasons to make it. If you have some issue you can test / adjust / change run-time. Maybe adding a feature to export that as template? Would be nice…?

Did not give the template storage much thought yet. I thought about adding directories in the template directory per device type and let it grow. Certainly do not mean to have them ‘all’, just the mostly used stuff. People can use the basic templates and tweak where they need by removing or adding some registers by hand via menu options of the integration. Let’s see where the road takes us :slight_smile: But certainly do want to let it grow and have some good examples in there (in github and installed by default). So if you have them, please provide :slight_smile:

Glad you like it!



Which one of these shall i use for requesting the hacs brands?
I like the simplicity of the first, yet the little 8-bit-ish look of the second.
Slight preference for the second myself…

Looks a bit Halloween-ish to me. You don’t want to scare the users away.
Oh wait - Wizard - of course. How about a magic wand as well?