-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cant get it log my meter - Multical 602 #3
Comments
@MBJ-M2BI |
And check you are connecting the IR head correctly. |
I can try that again.
But I have an original kamstrup optical eye connected to the raspberry pi where home assistant is installed and that one is getting data, but I would like to have it wireless on a esp unit, but could not get any values, I think I tried the play button, but could try again
Sendt fra min iPhone
Den 17. feb. 2023 kl. 22.07 skrev Ali Bahrami ***@***.***>:
And check you are connecting the IR head correctly.
—
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A5FPETB65DEIK3ZZMDOMOELWX7SCFANCNFSM6AAAAAAU72CR4Q>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Maybe 402 and 602 are different. You can try this repo which is for 602: |
I have tried both this morning, without any luck, the one I use from kamstrup connected directly to the raspberry pi with HA is using the HACS 402 kamstrup integration, and that is just working.
But in the case I need it to be running on esp home, I hoped you could help me out with what I am doing wrong ? Maybe some settings in my .yaml is wrong or something like that, as I use esp_01s board as showed I the link about my hardware
Sendt fra min iPhone
Den 17. feb. 2023 kl. 23.18 skrev Ali Bahrami ***@***.***>:
Maybe 402 and 602 are different. You can try this repo which is for 602:
https://github.com/ProudElm/ESPHome_multical_sensor
—
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A5FPETELZA4FMKI2CVE2JRTWX72MHANCNFSM6AAAAAAU72CR4Q>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thank you, i will try that
Sendt fra min iPhone
Den 7. mar. 2023 kl. 14.11 skrev Ali Bahrami ***@***.***>:
I don't know anything about the pinout of the ESP Device you are using, but:
rx_pin: GPIO03
tx_pin: GPIO01
[image]<https://user-images.githubusercontent.com/57097646/223431405-4a3c3c16-dddb-47f4-a649-abdf85b1d833.png>
Maybe you need to work with IO0 and IO1
—
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A5FPETCJX2NUJBAA24HYVQLW24XZLANCNFSM6AAAAAAU72CR4Q>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi @MBJ-M2BI Did you get it working? I'm pretty sure it can work. Here's the technical information for 602: https://documentation.kamstrup.com/docs/MULTICAL_602/en-GB/Technical_description/CONT90C6D93022A54253A84D8345A5325B55/?page=104 If not try these options:
|
Hi' @cenobitedk Just pulled your latest commit 14de2ea and confirm that it's working on Multical 602 without any changes. Any long term experience regarding battery drain issues using e.g. 10 min/hourly updates in production ? Thank you for this ESPHome Custom Component. Really appreciated! 😎 Regards |
That's great to hear, thanks @htvekov ! 🙏
I actually don't know. The battery level is not available to read, and I'm not sure if it's available in the meter menu either. But for the same reason I have set it read out only 1 time per minute. The tech sheet has some expected battery life time numbers, maybe that can help: https://documentation.kamstrup.com/docs/MULTICAL_602/en-GB/Technical_description/CONT90C6D93022A54253A84D8345A5325B55/?page=81
My pleasure! Happy to help |
To avoid ir port 'reading qouta' issues, as observed in other threads for other meters, I've for now set mine to 10 min. interval. That should be sufficient data for my district heating usage. And as I'm using a Multical 602, I've revised my uart config to two stop bits. Can't see any difference in behaviour with one or two stop bits, though. One thing has caught my attention. If I'm not consuming (power value zero on the Multical display) then the power sensor value isn't updated nor returned at all, leaving the sensor state in HA as unavailable for hours. I would expect the sensor to be updated with value zero when not consuming ? Haven't had time to look at the actual code - yet. When consuming, the power sensor of course is returned with a value. Next step is to check if I can read out anything from my Landis Gyr / Kamstrup UW50 cold water meter with a tweaked version of your repo 🤞🤞🤞😀Hopefully registers are identical. Couldn't really find anything usefull when searching for info for the UW50 meter. |
Okay, thanks for the info. Good to know.
Interesting. I'll take a look at the code and see if I can spot why it's not being published.
As far as I can tell the UW50 sensor needs to be connected to a Multical meter. But Landis+Gyr only seem to make power meters, right? |
Great if you could look at the code 🙂 My cold water meter is this type depicted below. My version has an IR port at the red marked circle. |
I looked and the issue is actually fairly evident. During readout the value starts as 0 and is overwritten with the meter value. If the value is still 0 after a complete readout, the value is not published, because 0 is equal to any error case (timeout, CRC error, bad data, etc.). A large part of the code is sourced from other repositories, and it is not sophisticated enough to distinguish between an error situation or an actual 0 value. I don't have a solution for this atm. But it could be possible to utilize the However, I'm a bit surprised you get 0 power. The lowest number I have over the past 10 days is 0.1, and typically around 0.3 in idle state. I'm not sure how power is calculated, but I'd presume it involves the temp diff, which I can see is as low as 1.3° on your first screenshot, where mine is around 3°. Maybe your equipment is newer and more efficient, that could explain it.
I see a lot of their meters use the EN 62056-21:2002 standard, so I would try that. See this https://aquaticus.info/iec62056.html and this https://community.home-assistant.io/t/new-iec62056-21-component/555236. |
I guess using Great with the 62056 ESPHome component reference 🎉😎 |
No it won't work as is now. I'll need to update the code to check for
Happy to help! 🍻 |
At no time are any negative values read from the meter and pushed to the sensors, So I've made a crude temporary quickfix by setting the
And just checking for that value when pushing the state instead of checking for a non zero value
This will for sure work when values are correctly read without any errors and if no bytes are read at all (timeout) A proper and more correct solution could be to introduce an error flag and instead push states according to that flag |
Just tested if the quickfix would handle CRC errrors as well. It did. So basically all happy/error flows will be handled properly with that quickfix. Not pretty, but it works 🙂 |
That's great @htvekov! How did you verify the CRC errors? |
In this specific use case you are right. But for other Multical meters this might be an issue if one were to create a general KMP esphome component.
Absolutely. This was my original idea, but it took much more time than I anticipated and ended up with a simple solution to get going. |
Manipulated the code to calculate wrong CRC 😆 |
Yep. As I wrote: Not pretty, but it works 🙂 |
Is a PR in the pipeline then ? |
Sort of. I want to make it, but first I want to make a sensor for my electricity meter. It has an optical port but unfortunately is using and old ANSI C 12.18 standard which I haven't found any implementation for. I did find a library for ESP but it needs to be adapted to work with esphome. |
No rush 🙂 Currently I've other issues to attend. I'm struggling with my touchline climate component (underfloor heating system) trying to implement a forced state change based on current- and target temperature calculation. The client doesn't provide registers for the valves states, so they're hardcoded to |
Just FYI https://community.home-assistant.io/t/kamstrup-flowiq-2200/403109/7 |
@htvekov Cool! I have the exact same meter as well, and I'm working on that atm. 😆 However I'm not using the optical port for this, but wireless mbus. I had to pay for the decryption key (KEM file) however, but since I only have 2 optical readers (I need the 2nd for the power-meter), and I don't have a generic KMP component yet, I wanted to try something else. I was hoping to use this (https://github.com/SzczepanLeon/esphome-components) but it doesn't support B frames and I haven't been able to make it work yet, and I will need to write a driver as well, so a bit more work. Fun thing though. I found out that my Multical 402 also have a wireless mbus module and bursts out updates. But I don't have the encryption key for this, and don't want to pay again since it's already working fine with the optical reader. |
I had aquired two IR probes, so basically that's why I tested the optical solution first for the water meter, before going down the wireless mbus route. I'm a bit baffled that you actually had to pay for keys to access your own data... Perhaps I should try and email my supplier and ask for the keys for both the district heating- and water meter. Have you managed to find any documentation regarding the actual registers in the FlowIQ 2200 meter (or the Multical 21) ? So far (three days and counting), I've not experienced any register read throttle issues as has been reported from all other users trying to read out data using the optical port. I guess my meter is a newer version that hopefully doesn't have that throttle restriction in the firmware. The meter itself also seems to be an altered version when I compare with pictures on the web. The mbus radio is installed in a 'plastic cap' kind of module that can be removed from the meter. I guess the module could be replaced with whatever communication module needed for that specific country/region. I'll put up my production configuration for the IQ2200 meter as well, when I'm done and ready locating the last registers. |
Just by accident I found a price sheet for Sabro Vandværk here in Denmark. 700 dkk + VAT for keys to be able to read your own data.... |
I was surprised as well but the explanation makes sense. I gain wireless access to the meter, and if/when I move they will have to replace the meter, so I no longer have access. I'm assuming here that they don't have means to change the decryption key remotely, or that it require physical access, or that it's only Kamstrup can do it. Something along those lines.
Unfortunately no, but I think you can get technical documentation from Kamstrup. According to this issue (https://stackoverflow.com/questions/29392226/wm-bus-extended-layer-decoding) a user was provided documentation when requested. |
Hi there.
thank you for the very good application for the Multical Optical reading.
i just have the issue, that i cant get it read from my meter.
i get this error:
if i take it of the meter it get the this error you make the troubleshooting at:
my hardware is this one here:
https://www.ebay.com/itm/354359025520?hash=item5281719f70:g:BgcAAOSwPqxjWj~H
and here is my .yaml code
`substitutions:
device_name: multical602
friendly_name: Multical 602
esphome:
name: ${device_name}
platform: ESP8266
board: esp01_1m
includes:
- kmp.h
- multical402.h
Enable logging
logger:
baud_rate: 0
Enable Home Assistant API
api:
encryption:
key: "S8FouGpCYDTCDmnP+uSO2m3/bIAChyGLBEtjORhjtFg="
ota:
password: "5050a1d09c9b1a4ad46202cc65d9aa21"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Kamstrup-Multical"
password: "b1jzffPzfgBh"
#Multical UART
uart:
rx_pin: GPIO03
tx_pin: GPIO01
baud_rate: 1200
data_bits: 8
parity: NONE
stop_bits: 1
#Multical Custom Sensor (first variable is update interval in ms; 3600000 is 1 hour)
custom_component:
auto multical402 = new Multical402(
10000,
id(uart_bus),
id(m_energy),
id(m_power),
id(m_tin),
id(m_tout),
id(m_tdiff),
id(m_flow),
id(m_volume));
App.register_component(multical402);
return {multical402};
components:
sensor:
#Multical Custom Sensors
name: "Multical Energy"
platform: template
id: m_energy
icon: "mdi:lightning-bolt"
unit_of_measurement: MWh
accuracy_decimals: 3
state_class: "total_increasing"
device_class: "energy"
force_update: true
name: "Multical Volume"
platform: template
id: m_volume
unit_of_measurement: m3
accuracy_decimals: 2
state_class: "measurement"
name: "Multical Temperature In"
platform: template
id: m_tin
icon: "mdi:thermometer"
unit_of_measurement: °C
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
name: "Multical Temperature Out"
platform: template
id: m_tout
icon: "mdi:thermometer"
unit_of_measurement: °C
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
name: "Multical Temperature Diff"
platform: template
id: m_tdiff
icon: "mdi:thermometer"
unit_of_measurement: °C
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
name: "Multical Power"
platform: template
id: m_power
icon: "mdi:flash"
unit_of_measurement: kW
accuracy_decimals: 1
state_class: "measurement"
device_class: "power"
name: "Multical Flow"
platform: template
id: m_flow
unit_of_measurement: l/h
accuracy_decimals: 0
state_class: "measurement"`
i see the red IR in the sensor make the blink every 10 sec.
i have tried to rotate the eye on the meter withou luck.
can you in some way help me out here ?
BR
/Mike
The text was updated successfully, but these errors were encountered: