I have a neo coolcam Zwave power plug (a clone of Aeotec).
I need to read and then reset each day the value of energy consumption (to have a daily value).
Read is easy but resetting would mean send from HASS to the device a command, but how to do it, is it possible?
Here is the manual of the power plug
ih8gates
(Scott Reston)
August 10, 2017, 7:23pm
3
Research set_config_parameter.
But I don’t understand
action:
service: zwave.set_config_parameter
…??
can you give me an example?
I don’t know how to do this
“Lets the user set a config parameter to a node. NOTE: Use string for list values. For all others use integer.”
ih8gates
(Scott Reston)
August 11, 2017, 12:48pm
6
https://community.home-assistant.io/search?q=set_config_parameter
Or specifically:
I have an automation like this:
- alias: Set Doorbell Volume to 1
trigger:
- platform: state
entity_id: input_select.doorbell_volume
to: '1 - Quietest'
action:
service: zwave.set_config_parameter
data_template: {
"node_id": 20,
"parameter": 8,
"value": 1
}
- alias: Set Doorbell Volume to 2
trigger:
- platform: state
entity_id: input_select.doorbell_volume
to: '2'
action:
service: zwave.set_config_parameter
da…
action:
service: zwave.set_config_parameter
data_template: {
"node_id": 20,
"parameter": 8,
"value": 2
}
1 Like
Thanks, how would you store the value of energy of the previous day?
also which parameters … no parameter in this pdf says which is the energy reset …
1 Like
firstof9
(firstof9)
August 11, 2017, 4:24pm
9
Per the manual there is no command to reset the usage.
If you want a daily usage report, you’ll have to use a script and math it out.
A script would do?
Don’t know how to do it, can you give me an example?
firstof9
(firstof9)
August 11, 2017, 5:08pm
11
Actually looks like you can do it via the history component:
Example:
sensor:
- platform: history_stats
name: Power Usage Today
entity_id: zwave.your_device_name
state: 'on'
type: time
end: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
duration:
hours: 24
Replace the state with what ever state you’re tracking.
Hope this puts you in the right direction.
1 Like
firstof9:
platform: history_stats
name: Power Usage Today
entity_id: zwave.your_device_name
state: ‘on’
type: time
end: ‘{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}’
duration:
hours: 24
thanks trying now.
Like this shows the last 24 hours, like every minute is the last 24 hours correct?
I would rather have a value per day (from 00:00 to current time, and maybe retain the value of previous days)
firstof9
(firstof9)
August 11, 2017, 6:27pm
13
What I posted would be the previous day’s worth of usage. So to do from 00:00 to ‘now’ it’d be like this:
sensor:
- platform: history_stats
name: Power Usage Today
entity_id: zwave.your_device_name
state: 'on'
type: time
start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
end: '{{ now() }}'
Not sure I understand. Let’s make an example.
Today is 10:25 it shows from 00:00 to 10:25 or from 10:24 previous day to 10:25 today? (first is ok for me, second no)
firstof9
(firstof9)
August 11, 2017, 6:38pm
15
My 2nd post would show you “from 00:00 to now ” whatever your current time is
Hi, I receive 0 all time …
firstof9
(firstof9)
August 16, 2017, 2:46pm
17
Do you have the correct entity being monitored?
under sensor:
- platform: history_stats
name: Air Gilma Daily Energy last 24h
entity_id: sensor.neo_coolcam_power_plug_12a_energy
state: 'on'
type: time
end: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
duration:
hours: 24
- platform: history_stats
name: Air Gilma Daily Energy from 00:00 to now
entity_id: sensor.neo_coolcam_power_plug_12a_energy
state: 'on'
type: time
start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
end: '{{ now() }}
’
firstof9
(firstof9)
August 16, 2017, 6:45pm
19
Perhaps @bokub may have some insight if this is possible with the component.
Maaniac
(Yoav Tigelman)
August 16, 2017, 7:10pm
20
@anon35356645 this won’t work because the state that you want tracked is a numerical value, not ‘on’. I don’t think think component can track changing numerical values.