golles / ha-kamstrup_403

Custom component that integrates the Kamstrup 403 heating system into Home Assistant. This component does also support a few other heating systems
MIT License
70 stars 10 forks source link

Multicall 403 sleeping after 4 min #69

Closed PrutzerNL closed 1 year ago

PrutzerNL commented 1 year ago

Did you read the instructions?

The problem

The script is working perfect. Thanks a lot, it works very nice!

I have a multical 403 from ennatuurlijk in the Netherlands. A version with a battery. When you press a button you can read the meter for 4 minutes. After 4 minutes it is going in a sleep modus and you have to press a button to wake it. After 4 minutes it will fall asleep again.

I do use this reader: https://wiki.hal9k.dk/projects/kamstrup with magnets. I already placed some more magnets, but it does not work. Does anyone have a solution for this, or do I have to add a servo wich will press the button before reading the meter? :-X

What version of this integration has the issue?

2.2.0

What version of Home Assistant Core has the issue?

Core 2023.2.2

Home Assistant log

No response

Diagnostics

No response

Additional information

No response

Marmachine commented 1 year ago

Well, i'm also a "Prutzer" here, quite new to this. I've build the same sensor, but never tested successfully, so i am not sure if it works at all. So, because i really would like to collect data from my Kamstrup 403, i've ordered one from Ali Check out the customer reviews there, that gave me hope that it could work! It's laying on my desk right now...

PrutzerNL commented 1 year ago

Hi Marmachine,

Thanks for you reply! My sensor (IR reader) is working when the kamstrup is awake. So I think buying another reader will not be the solution. In the customer reviews I don't see a solution to keep the multical 403 awake. Do you?

HAEdwin commented 1 year ago

The setup-loop in the 403 does not contain a configurable parameter for the IR sensor to sleep or disable, so I think you should be able to read the meter with any interval. This integration reads the meter with a default interval of one hour but you can decrease that if you wish.

I don't agree with the bug label, the integration is not to blame here because it doesn't bring the 403 to "sleep" nor is it able to keep it "awake". The backlit of the display is dimmed to preserve battery load.

@Marmachine The "near IR" head is the right choice, I also use the near IR option apposed to IR in the light spectrum. You might have to place the head upsitedown (at least I have to). So the wire is at the top.

HAEdwin commented 1 year ago

Update: I might have found the issue here (from reading the manual). image So placement of the magnets in the optical interface is key to your problem.

Wipnose commented 1 year ago

Am confirming HAEedwin's observation. Last half year I've an easy-to-replace as well as continuously working set up with a small magnat (3 cm long, 0.5 cm thick, 1 cm wide) on top of the Kamstrup (somewhere just above the window) and the eye centered 1 cm from the IR window. All is 'temperarily' fixed with elastic bands. Most pleased with the set-up ! A bracket such as mentioned at https://www.thingiverse.com/thing:5615493 may even be better, and I guess the magnat can then be permanently glued on the plastic lip.

By the way maybe an extra idea for Golles integration and related to the Kamstrup sleeping and awake (=testingreading) mode: the Intelligent battery saver function triggered by event on top of the default scan interval for contineous operation of say every hour. Dear Golles, please consider a scan interval that is variable depending the flow (or flow changes) and extra measurent triggered via one 'external' input. HA can configure to gather events such as douche_on, douche_off and radiator_heat_on and radiator_heat_off and summarise this to the input event of your integration. Then both batterylife (although not our oncern as the meter is owned and selected by the heatcompany and thus to be maintained by that company) can be extended as well as that we are getting more accurate (read frequenter) flow measurement at the start and stop of these heat peaks and during these peak heat loads. Why peak head loads? The heat grid has high capacity and hence (due to time based, present based switched on thermostat, douching people) most of heat consumption in the house is with 'shock loads'. See refered picture with a flow graph. The heat loads with a more steady pattern twice a day for one hour are caused by the heating of the floor.
Even the by smart thermostats regulated 'quick' radiators have a heat-consumption-time-sequence with a heat peak of 15 minutes and then 30 min offcooling while in constant heating mode. So when the Kamstrup heat readout is more frequent during those heat-up periods, then in-overall a more timed accurate measurement is made meanwhile saving battery during the none peak duration. And in that more accurate case HA can also such be configured to couple this time accurate heat measurement with time accurate water usage, and then HA can even calculate the heat usage e.g. for one shower, rather than per fixed e.g. 600 seconds. And if so, then HA can even substract the douche heat from the air heating and show to us more complete heat balance of the house. Anyhow, maybe the above mentioned idea is a bit over the top. I already much appreciate the current integration and am most pleased with the current set-up ;) .

image

golles commented 1 year ago

Fascinating conversation, this could also explain an issue I had a while ago. I wasn't getting data from my meter for a couple of days and after replacing the optical eye, it worked again. Probably the magnet was too far away by accidentally changing the placement of the optical eye...

Dear Golles, please consider a scan interval that is variable depending the flow (or flow changes) and extra measurent triggered via one 'external' input. HA can configure to gather events such as douche_on, douche_off and radiator_heat_on and radiator_heat_off and summarise this to the input event of your integration.

@Wipnose, doing something depending on flow is very difficult (chicken-egg problem); you need to read from the meter to know the flow... However, you can do manuel updates without changing the scan interval. If you trigger the homeassistant.update_entity service with any given entity from this integration, all the values will be read from the meter:

service: homeassistant.update_entity
target:
  entity_id: sensor.kamstrup_403_heat_energy_e1

In your case, you can trigger that service every x seconds/minutes with an automation while your douche_on is set.

HAEdwin commented 1 year ago

I was reading this with interrest @Wipnose though the simple solution could lie in the addition to install a 24V adapter. It would indeed be great to increase the interval when for example the bathroom lights are switched on. Can the interval also be influenced by calling the service somehow? I see the DataUpdateCoordinator must be implemented first to enable changing the interval without restart probably.

I'll call Eneco and ask if they are willing to provide me an adapter (but it will need an installer and costs time/money). The installer that came by yesterday could not provide one (out of scope of duties).

PrutzerNL commented 1 year ago

I have found the solution.

In my reader are 4 magnets. I printed a new housing with place for 1 round 10mm magnet just above the display. It failed. Turning the magnet 180 degree fixed it. It looks like the magnet has to be above the display and north / south of the magnet does matter.

Wipnose commented 1 year ago

@Golles: invoking the heat reading with a service invoked/called by homeassistant.update_entity solves the time issue ! Great. I will set my Kamstrup integration scan interval to 3600 sec and once the douche starts and during other detected 'heat peak loads' my automation in Node Red will call the measurement service in much shorter time intervals.
Thanks for your trigger suggestion.

golles commented 1 year ago

I have found the solution.

In my reader are 4 magnets. I printed a new housing with place for 1 round 10mm magnet just above the display. It failed. Turning the magnet 18- degree fixed it. It looks like the magnet has to be above the display and north / south of the magnet does matter.

Awesome that you managed to resolve this. Maybe you can add a short summary to #38 or mention this issue with a post in there as well. I'm pretty sure that this information will help others as well!

Also, if you want, you can close this issue, if you want to leave it open to continue the discussion for some time, I'm also happy with that.

PrutzerNL commented 1 year ago

I have found the solution. In my reader are 4 magnets. I printed a new housing with place for 1 round 10mm magnet just above the display. It failed. Turning the magnet 180 degree fixed it. It looks like the magnet has to be above the display and north / south of the magnet does matter.

Awesome that you managed to resolve this. Maybe you can add a short summary to #38 or mention this issue with a post in there as well. I'm pretty sure that this information will help others as well!

Also, if you want, you can close this issue, if you want to leave it open to continue the discussion for some time, I'm also happy with that.

I will do that. I'm desining a new housing for the IR reader with 1 round 10mm magnet. I will post a picture and a URL of the desing here. Thanks very much for all the reply's and the help!

PrutzerNL commented 1 year ago

Here are some pictures and a new housing:

https://www.thingiverse.com/thing:5179312

It works perfect. HA does read the kamstrup every 3600 seconds without falling in sleep. Thanks!