Add support for CM113, Electrisave ampere meter

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
rtfmjoey
Posts: 8
Joined: Friday 09 February 2018 15:24
Target OS: -
Domoticz version:
Contact:

Add support for CM113, Electrisave ampere meter

Post 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?
b_weijenberg
Posts: 518
Joined: Friday 12 July 2013 18:13
Target OS: -
Domoticz version:
Location: Netherlands
Contact:

Re: Add support for CM113, Electrisave ampere meter

Post by b_weijenberg »

The CM113 is supported by the RFXtrx433XL.
RFX-433, RFX-433EMC, RFX-868
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Add support for CM113, Electrisave ampere meter

Post 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
rtfmjoey
Posts: 8
Joined: Friday 09 February 2018 15:24
Target OS: -
Domoticz version:
Contact:

Re: Add support for CM113, Electrisave ampere meter

Post 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
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Add support for CM113, Electrisave ampere meter

Post 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 ...
rtfmjoey
Posts: 8
Joined: Friday 09 February 2018 15:24
Target OS: -
Domoticz version:
Contact:

Re: Add support for CM113, Electrisave ampere meter

Post by rtfmjoey »

Works like a charm, thanks!!
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Add support for CM113, Electrisave ampere meter

Post by Lokonli »

rtfmjoey wrote: Friday 15 November 2019 18:18 Works like a charm, thanks!!
Merged into latest beta as well.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest