Page 1 of 1

Add support for CM113, Electrisave ampere meter

Posted: Friday 15 November 2019 11:01
by rtfmjoey
Hi,

I've added the CM113 3-phase ampere meter to the dashboard, but it shows up as a switch with 'on' status and does not display the current.

Is the CM113 currently unsupported? And if so, can it be added?

Re: Add support for CM113, Electrisave ampere meter

Posted: Friday 15 November 2019 11:47
by b_weijenberg
The CM113 is supported by the RFXtrx433XL.

Re: Add support for CM113, Electrisave ampere meter

Posted: Friday 15 November 2019 12:37
by Lokonli
rtfmjoey wrote: Friday 15 November 2019 11:01 Hi,

I've added the CM113 3-phase ampere meter to the dashboard, but it shows up as a switch with 'on' status and does not display the current.

Is the CM113 currently unsupported? And if so, can it be added?
Can you post the Domoticz device info? Then I'll have a look how to add it to Dashticz.

https://www.domoticz.com/wiki/Domoticz_ ... fic_device

Re: Add support for CM113, Electrisave ampere meter

Posted: Friday 15 November 2019 14:05
by rtfmjoey
I added the CM113 as a virtual device (Ampere (3-Fase)) in device creation) and am using it to monitor the current usage of an EV Charger.

Here's the raw json output:

Code: Select all

{
   "ActTime" : 1573823069,
   "AstrTwilightEnd" : "18:47",
   "AstrTwilightStart" : "05:60",
   "CivTwilightEnd" : "17:26",
   "CivTwilightStart" : "07:20",
   "DayLength" : "08:52",
   "NautTwilightEnd" : "18:07",
   "NautTwilightStart" : "06:39",
   "ServerTime" : "2019-11-15 14:04:29",
   "SunAtSouth" : "12:23",
   "Sunrise" : "07:57",
   "Sunset" : "16:49",
   "app_version" : "4.10717",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 100,
         "CustomImage" : 0,
         "Data" : "16.0 A",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 11,
         "HardwareName" : "dz-dummy",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveTimeout" : false,
         "ID" : "142D8",
         "LastUpdate" : "2019-11-15 14:04:28",
         "Name" : "Current EVSE",
         "Notifications" : "false",
         "PlanID" : "14",
         "PlanIDs" : [ 14 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "CM113, Electrisave",
         "Timers" : "false",
         "Type" : "Current",
         "TypeImg" : "current",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "displaytype" : 0,
         "idx" : "648"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
The field I'm interested in is the 'Data' field (obviously).

I've also noticed something strange with the AstrTwilightStart value, 05:60 is not valid. Already made a post in the main Domoticz bug thread

Re: Add support for CM113, Electrisave ampere meter

Posted: Friday 15 November 2019 15:19
by Lokonli
You can define a custom blocktype. In 'custom/custom.js' you can find the function getExtendedBlockTypes:

Code: Select all

function getExtendedBlockTypes(blocktypes){
	//blocktypes.Type['Lighting 2'] = { icon: 'fa fa-lightbulb-o', title: '<Name>', value: 'ds' }
	return blocktypes;
} 
Add your custom blocktype definition as follows:

Code: Select all

function getExtendedBlockTypes(blocktypes){
	//blocktypes.Type['Lighting 2'] = { icon: 'fa fa-lightbulb-o', title: '<Name>', value: 'ds' }
        blocktypes.Type['Current'] = {icon: 'fas fa-plug', title: '<Name>', value: '<Data>'};
	return blocktypes;
} 
I'm not able to test it at the moment, but this should work ...

Re: Add support for CM113, Electrisave ampere meter

Posted: Friday 15 November 2019 18:18
by rtfmjoey
Works like a charm, thanks!!

Re: Add support for CM113, Electrisave ampere meter

Posted: Friday 10 April 2020 18:03
by Lokonli
rtfmjoey wrote: Friday 15 November 2019 18:18 Works like a charm, thanks!!
Merged into latest beta as well.