SDM630 modbus integration launched

For those interested i made a Eastron SDM630 modbus integration.

It supports profiles (basic, basic-plus and full registers) to keep it as lean as you want. You can change profiles on the fly. Also you can create multiple hubs if you have more of these devices in your system.
Works for serial(RS485) and TCP connections (via TCP to modbus devices), includes support of multiple slaves per connection.
Super easy, clean, no yaml needed!

I just wanted this because of the messy yamls and dont like the energy wizard.
Enjoy :slight_smile:

Install via custom repositories (see repository for details). Pull request for brands is running, not sure if will be honored. So maybe available via HACS later… maybe…

Thanks for the plug in, very useful and thanks for sharing!

Few pieces of feedback:

  1. I faced exceptions when connecting my eastron via modbus. I create a pull request with the fix I had to suppress these exceptions - Fix exceptions by kyczawon · Pull Request #1 · partach/ha_sdm630 · GitHub
  2. I found a generic implementation for querying sdm via modbus - GitHub - nmakel/sdm_modbus: Eastron SDM Modbus data collection library. It supports multiple modbus implementations and has more features. I think it’d be great to integrate that functionality into your repo

In the mean time accepted your contribution and seems to run fine. I plan to release an update this weekend (or sooner if i find the time).
Thanks!
On that note: please see protocol_wizard in my repository. It supports basically any modbus device without the need for any yaml. AND lets you play with any register run time. No reboots required when adding new devices or registers.

I have created a much improved any Modbus (and SNMP) device integration. It supports loading any register run-time and bulk load via templates.
It also support playing with the device run time from a HA card. Templates are some included but really easy to make especially via AI. But the kicker: all runtime. No need for reboots.

See: GitHub - partach/protocol_wizard: The Protocol Wizard helps you build your home assistant devices without need for any yaml!
See also Readme for details in the repository.

Just started the ‘HA Brands’ journey which sadly takes more than 3 weeks now as a pre cursor for adding it to HACS (brands test is part of hassfest … all tests green except this stupid brands icon that is not in the HA repository and takes a long time to get).

I would love to get input on devices you use, create the templates for them and add them to the repository, so please feel free.

Thank you so much, this is awesome!

May I ask, if the sensors can get the appropriate measurement classes and device classes to get statistics created according to this: GitHub - partach/protocol_wizard: The Protocol Wizard helps you build your home assistant devices without need for any yaml!

Also, I created (haha, I adapted, YOU created :slight_smile: ) a template ‘mid’ for the SDM630 - it is basic plus frequency:

[
  {
    "name": "Phase 1 Voltage",
    "address": 0,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "V",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Phase 2 Voltage",
    "address": 2,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "V",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Phase 3 Voltage",
    "address": 4,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "V",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Phase 1 Current",
    "address": 6,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "A",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Phase 2 Current",
    "address": 8,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "A",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Phase 3 Current",
    "address": 10,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "A",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Phase 1 Power",
    "address": 12,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "W",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Phase 2 Power",
    "address": 14,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "W",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Phase 3 Power",
    "address": 16,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "W",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Total Power",
    "address": 52,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "W",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Frequency",
    "address": 70,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "Hz",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  },
  {
    "name": "Total Energy",
    "address": 342,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "kWh",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
  }
]
1 Like

Great! I could extend the template and integration to also add device_class and such. Will have a look right away.
Keep the tips coming!
You could help by sharing your mid file (it now also supports export template in 0.4.5 so everyone can share their creation).

Thanks, Partach. I added the file above - just did not do so in the first post.
How would I add it to the template? Just like that?

  {
    "name": "Total Power",
    "address": 52,
    "data_type": "float32",
    "register_type": "input",
    "rw": "read",
    "unit": "W",
    "scale": 1.0,
    "offset": 0.0,
    "byte_order": "big",
    "word_order": "big",
    "allow_bits": false
    "device_class": energy
    "state_class": total increasing 
  },

Hi, yes just like that.
I released a new version that should now incorporate device_class, state_class and icon. I already update a few templates within with this new information. (SDM630). Let me know what you think, templates always welcome. And you can also export templates of the creation you have!