Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Question

Posted (edited)

QuickApp to read the EASTRON SDM630 V3 and SDM230 V2 Modbus Smart Meter for HC3

 

This QuickApp is for querying pretty much most of the parameters of the Eastron SDM630 / SDM 230 Modbus devices. It reads directly from the Modbus server, for example a Modbus Device Waveshare RS485 to RJ45 Ethernet Industrial Serial Server Modbus Gateway. 

 

Some important information:

  • After installation, only the parent device will be created. 
  • You can now use your own icons for parent and child devices; these must be entered as a variable with the icon ID's. If multiple device-ID's are used, you have to provide an icon for each device; comma separated. As soon as the device is activated, these are then used when the ChildDevices are created.
  • Hint: you can use http://<hc3-ip-address>/api/icons to get a list of your icons and icon-id's.
  • The query and creation of ChilDevices remains inactive until the variable SDM_ACTIVE is set to true. This allows you to adjust the other parameters, which are also set on the "Variables" tab, as required. After SDM_ACTIVE has been set to true, the ChildDevices are created automatically.
  • Further ChildDevices can be added or removed by setting the "enabled" parameter to true or false in the LUA code under "ChildDevicesDetails".
  • If you have a V2 device, simply delete the last two lines in "ChildDevices Details", these are for V3 only.
  • Tip: If you make changes and save the QA file, make sure that you delete all variables on the "Variables" tab beforehand. Otherwise, the variable settings of your saved QA file will be used and the entry "SDM_ACTIVE = false" will probably not be present and the QA will immediately try to create ChildDevices and read in values.

 

Variables: 

  • MODBUS_IP contains the IP address of the Modbus adapter, e.g. from Waveshare
  • MODBUS_PORT is the standard port of the adapter, 502
  • UNIT_ID is the ID of the Eastron smart meter
  • INTERVALL defines the polling intervals in seconds
  • ICON_PARENT sets the ID of the icon to be used for the parent device
  • ICON_CHILDS sets the ID's of the icons to be used for the childs. You can use different icons for different devices (IDs); comma separated entries
  • DEVICE_TYPE sets the Device, SDM230 or SDM630 are supported only
  • UNIT_IDS = comma-separated IDs of the smart meters. These must correspond to the IDs set on the smartmeter
  • SDM_ACTIVE stops all processes if false and continues them if true

 

Important: If ChildDevices are deleted using "enabled=false", the data stored for this ChildDevice up to that point is also deleted! If this is not desired, the device should be managed via the interface. I would not recommend reading all the parameters as the QuickApp has otherwise put too much load on the HC3 memory in my case. 

 

Use at your own risk, I have written the device myself for my own purposes and the code can be used without any guarantee of completeness and correctness. If you don't want to take any risks, just leave it. Code is still subject to change.

 

Have fun!

 

Please login or register to see this attachment.

Edited by uwuertz
Corrections

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...