Hi
My teleinfobindings is working intermittently
This is what I get from the log file
Could you help?
Hi
My teleinfobindings is working intermittently
This is what I get from the log file
Hi @Dids,
Can you give me more details ? OH version, teleinfo binding version, teleinfo USB hardware, step to reproduce, etc.
Hi
I am using (more appropriate would be I am trying to use) openHAB 2.5
The binding version is your latest one i believe:
org.openhab.binding.teleinfo-2.5.0-20191104-2035.
I use RS232 modem from the meter to a serial device server (Sollae https://www.eztcp.com/en/products/cse-h20.php). TCP through my local network to my computer. On the computer I use a virtual serial port emulator (VSPE from eterlogic.com) that allows to split serial ports and use the same port on several applications.
It works with other software (homidom for example) but not fully with the binding as I get frames corrupted. It goes from unkown to online and rapidly after to offline.
The serial device server allows several configuration
Your achitecture is not simple
First, can you activated DEBUG logs on teleinfo binding and send me this log file plz ?
Second, your serial port seems be sharing on many softwares ("âŠand use the same port on several applicationsâŠ"). Have you tested the teleinfo binding when this serial port is not sharing with others softwares ?
I use your binding since a few weeks.
With time, the âcurrentPowerâ data is fired many many times very quickly. It increase with time.
I have to disable and re-enabled binding to start a new session and all gets ok.
But in a few hours or days, i will have the same behaviour.
Any idea ?
Hi @rgouyet, the âcurrentPowerâ is a computed data from IINST data and âcurrentPowerâ configuration value (named âpower factorâ). The defaut value of âpower factorâ is defined to 230 (volts). The currentPower value is (just) computed like that:
currentPower = IINST * powerFactor
So, if your currentPower channel is updated âmany many times very quicklyâ, then your IINST channel must have the same behavior, no ?
Can you give me some details about your electricty meter ? single-phase or tree-phase ? your pricing option (Base, HC, Tempo, EJP) ?
Single-phase Electricity meter with HC/HP option - CBEMM Evolution ICC (aka âCompteur Bleu Electronique MonophasĂ© Multitarif Evolution ICCâ)
I donât see IINST spaming in the log
My items are defined in .items file.
And the value 230 is the only thing editable in the binding page.
Can you send me suspicions logs please ? And the steps to reproduce ?
For information, the source code for âcurrentPowerâ channel updating is in the https://github.com/nokyyz/openhab2-addons/blob/master/bundles/org.openhab.binding.teleinfo/src/main/java/org/openhab/binding/teleinfo/internal/handler/cbemm/TeleinfoAbstractCbemmElectricityMeterHandler.java file. Here a copy of this code:
BigDecimal powerFactor = (BigDecimal) getThing().getChannel(CHANNEL_CBEMM_CURRENT_POWER).getConfiguration()
.get(CHANNEL_CBEMM_CURRENT_POWER_CONFIG_PARAMETER_POWERFACTOR);
updateState(CHANNEL_CBEMM_CURRENT_POWER, new DecimalType(frame.getIinst() * powerFactor.intValue()));
OpenHAB 2.5.3
org.openhab.binding.teleinfo-2.5.0-20191104-2035.jar
Here is my teleinfo device :
Here is the item definition :
Number:ElectricCurrent GF_Garage_Teleinfo_Isousc âIsouscâ (gTeleinfo, gPersistence) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:isouscâ}
String GF_Garage_Teleinfo_Ptec âPtecâ (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:ptecâ}
Number:ElectricCurrent GF_Garage_Teleinfo_Imax âImaxâ (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:imaxâ}
Number:ElectricCurrent GF_Garage_Teleinfo_Adps âAdpsâ (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:adpsâ}
Number GF_Garage_Teleinfo_Papp âPappâ (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:pappâ}
Number:ElectricCurrent GF_Garage_Teleinfo_Iinst âIinstâ (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:iinstâ}
Number:Power GF_Garage_Teleinfo_CurrentPower âCurrentpowerâ (gTeleinfo) [âDoorâ, âiss:room:Garageâ, âiss:type:DevElectricityâ] {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:currentPowerâ}
Number:Energy GF_Garage_Teleinfo_Hchc âHchcâ (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:hchcâ}
Number:Energy GF_Garage_Teleinfo_Hchp âHchpâ (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:hchpâ}
String GF_Garage_Teleinfo_Hhphc âHhphcâ (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:hhphcâ}
DateTime GF_Garage_Teleinfo_LastUpdate âLast update [%1$td/%1$tm/%1$tY %1$tT]â (gTeleinfo) {channel=âteleinfo:cbemm_evolution_icc_hc_electricitymeter:8494ef47:811775880891:lastUpdateâ}
And here are log files (2mn âŠ) :
events.log (147.9 KB) openhab.log (232.6 KB)
From your events.log, I think that each Teleinfo frame is repeated 10 times per second. In below sample, LastUpdate is updated 10 times with no changes for others Teleinfo values (IINST, PAPP,âŠ):
2020-04-04 08:36:40.838 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:39.138+0200 to 2020-04-04T08:36:40.808+0200
2020-04-04 08:36:40.855 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_Hchp changed from 10464961 Wh to 10464962 Wh
2020-04-04 08:36:40.857 [vent.ItemStateChangedEvent] - TeleinfoADCO811775880891_HCHP changed from 10464961 to 10464962
2020-04-04 08:36:40.938 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.808+0200 to 2020-04-04T08:36:40.819+0200
2020-04-04 08:36:41.039 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.819+0200 to 2020-04-04T08:36:40.862+0200
2020-04-04 08:36:41.104 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.862+0200 to 2020-04-04T08:36:40.864+0200
2020-04-04 08:36:41.131 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.864+0200 to 2020-04-04T08:36:40.866+0200
2020-04-04 08:36:41.132 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.866+0200 to 2020-04-04T08:36:40.878+0200
2020-04-04 08:36:41.133 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.878+0200 to 2020-04-04T08:36:40.893+0200
2020-04-04 08:36:41.134 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.893+0200 to 2020-04-04T08:36:40.905+0200
2020-04-04 08:36:41.135 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.905+0200 to 2020-04-04T08:36:40.911+0200
2020-04-04 08:36:41.137 [vent.ItemStateChangedEvent] - GF_Garage_Teleinfo_LastUpdate changed from 2020-04-04T08:36:40.911+0200 to 2020-04-04T08:36:40.914+0200
The normal frequency between each Teleinfo frame is about 1-2 seconds.
The Teleinfo binding performs ALL teleinfo frames from your hardware. So, IMHO this defect becomes from your hardware.
Can you dump the Teleinfo stream in a file directly from your hardware device ?
I used it since several years (with other piece of software) and I never had this issue.
As you wrote, it sends all data frame every 1 or 2 s (only once per data)
If I disable the teleinfo:serialcontroller and enabled it again, itâs ok for a few hours and then it cames back to repeat the streamâŠ
I think I will add a cron rule to diable and enable the serial control to avoid to spam my logsâŠ
Can you try to disable/enable teleinfo:serialcontroller many times and checks if the frequency increases (n times in same second) for the âŠ_LastUpdate item in your events.log ? maybe your problem is due to an suscription/unsuscription mechanism on disable/enable teleinfo:serialcontroller actionâŠ
Hi everybody,
Thanks to @hollysaiqs contribution, the Teleinfo binding has been submitted to OpenHAB reviewers 2 days ago (pull request 7516).
Maybe Teleinfo binding will be officially OpenHAB addons in few days !
Thank for your feebacks
Hi all,
The Teleinfo binding is an officially OpenHAB 2.x addon ! Available from openHAB 2.5.9 snapshot version (build #220).
Bye
Hi All,
First of all, thank you for the development of this binding.
I recently purchased this USB CGE module and connected it to my Raspberry Pi 3 running OpenHab 2.5.10 with teleinfo binding 2.5.11
When I type cat /dev/ttyUSB0 I get the teleinfo data correctly:
ADCO 8xxxxxxx1 R
OPTARIF BASE 0
ISOUSC 45 ?
BASE 012235168 â
PTEC TH⊠$
IINST 002 Y
IMAX 090 H
PAPP 00480 -
HHPHC A ,
MOTDETAT 000000 B
ADCO 811775366681 R
OPTARIF BASE 0
ISOUSC 45 ?
BASE 012235168 â
PTEC TH⊠$
But in openhab.log I get the following:
2020-12-27 22:33:31.124 [INFO ] [rial.TeleinfoSerialControllerHandler] - Try to restart Teleinfo receivingâŠ
And in event.log I get
2020-12-27 22:25:30.766 [hingStatusInfoChangedEvent] - âteleinfo:serialcontroller:teleinfoUSBâ changed from ONLINE to UNKNOWN: Serial Error: Retry in progressâŠ
2020-12-27 22:25:30.775 [hingStatusInfoChangedEvent] - âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteurâ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2020-12-27 22:25:32.555 [hingStatusInfoChangedEvent] - âteleinfo:serialcontroller:teleinfoUSBâ changed from UNKNOWN: Serial Error: Retry in progress⊠to ONLINE
2020-12-27 22:25:32.575 [hingStatusInfoChangedEvent] - âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteurâ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
2020-12-27 22:26:30.843 [hingStatusInfoChangedEvent] - âteleinfo:serialcontroller:teleinfoUSBâ changed from ONLINE to UNKNOWN: Serial Error: Retry in progressâŠ
My thing is
Bridge teleinfo:serialcontroller:teleinfoUSB [ serialport=â/dev/ttyUSB0â ]{
Thing cbemm_base_electricitymeter Compteur [ adco=â8xxxxxxxxx1â]
}
And my items:
Number TLInfoEDF_PAPP âPAPPâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:pappâ}
Number:ElectricCurrent TLInfoEDF_ISOUSC âISOUSCâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:isouscâ}
String TLInfoEDF_PTEC âPTECâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:ptecâ}
Number:ElectricCurrent TLInfoEDF_IMAX âIMAXâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:imaxâ}
Number:ElectricCurrent TLInfoEDF_ADPS âADPSâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:adpsâ}
Number:ElectricCurrent TLInfoEDF_IINST âIINSTâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:iinstâ}
Number:Energy TLInfoEDF_HCHC âHCHCâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:hchcâ}
Number:Energy TLInfoEDF_HCHP âHCHPâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:hchpâ}
String TLInfoEDF_HHPHC âHHPHCâ (GF_Garage) {channel=âteleinfo:cbemm_base_electricitymeter:teleinfoUSB:Compteur:hhphcâ}
Any support on diagnosing my problem would be very welcome.
Edit: I just uploaded the log trace of the plugin
Thank you and have a great New Year 2021
OlivierTrace openhab.txt (8.0 KB)
Hi Olivier,
It seems you have an electricity meter with the ICC evolution. Can you try to replace every cbemm_base_electricitymeter
by cbemm_evolution_icc_base_electricitymeter
?
You can also test the auto discovery feature of the binding, it should auto detect your meter configuration.
Olivier
Hi Olivier,
Thank you for your quick reply. I first tested the replacement of 'cbemm_base_electricitymeterby
cbemm_evolution_icc_base_electricitymeter` in my thing and item definition but it did not change the log file so I removed both and used the autodetect feature. I get the following resut in the attached picture.
So I cannot link Items. It seems that, somehow, the stream received from the serial port does not have the expected format.
Olivier
Hi Olivier, After many tests, modifications and Openhab restarts, it works !!!
Thank you again for the plugin and your help.
Kind regards
Good news! Have you done it with textual config or with paper ui?
Is your detected electricity meter a cbemm_evolution_icc_base_electricitymeter
?
Hi Olivier,
I think there was a problem in one of my config files. I rewrote them from scratch using a cbemm_evolution_icc_base_electricitymeter and it worked.
Thanks again for your help.