About This File
QuickApp to read the EASTRON SDM630 V3 Modbus Smart Meter for HC3
This QuickApp is for querying pretty much most of the parameters of an Eastron SDM630 Modbus device. 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. 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 SDM 630 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 of the icon to be used for the child device
- 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 and the code can be used at will, without any guarantee of completeness and accuracy. Code is still subject to change.
Have fun!
Edited by uwuertz
Recommended Comments
There are no comments to display.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.