Skip to content
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

Feature Request : Integration of DPT 235.001 / DPT_Tariff_ActiveEnergy #1108

Closed
bbreton09 opened this issue Dec 18, 2022 · 12 comments · Fixed by #1466
Closed

Feature Request : Integration of DPT 235.001 / DPT_Tariff_ActiveEnergy #1108

bbreton09 opened this issue Dec 18, 2022 · 12 comments · Fixed by #1466
Labels

Comments

@bbreton09
Copy link

bbreton09 commented Dec 18, 2022

Hello, do you think it's possible to integrate the DPT 235.001. Is a 6bytes DPT. This contains DPT 13.010 and 5.006+1 data validity byte.

image

Thank you

@bbreton09 bbreton09 changed the title Feature Request : DPT 235.001 intégration Feature Request : Integration of DPT 235.001 / DPT_Tariff_ActiveEnergy Dec 18, 2022
@farmio
Copy link
Member

farmio commented Dec 18, 2022

Hi 👋

Currently we don’t support “compound” DPTs as sensors. It would need a quite big change in how HA entity creation works.

Such a feature could also be used for other DPTs like RBG color etc.

@bbreton09
Copy link
Author

Hi, it's bad new :'( thank you for quick answere.

@farmio
Copy link
Member

farmio commented Dec 18, 2022

It's not like this feature wouldn't be welcomed. It's just that someone would need to find time to implement it.

@farmio
Copy link
Member

farmio commented Dec 18, 2022

🤔 thinking about that a little bit more, it might actually be trivial to add support for HA events and services (not sensors / entities).
I guess that would be a good start as sensors might get created from templates easily then.

@bbreton09 do you want to start working on that?

@bbreton09
Copy link
Author

🤔 thinking about that a little bit more, it might actually be trivial to add support for HA events and services (not sensors / entities). I guess that would be a good start as sensors might get created from templates easily then.

@bbreton09 do you want to start working on that?

Hi @farmio,

Unfortunately, I'm not a developer at all. I can however test things I have a machine with Hass.io and a module that supports DPT 235.001.

@marvin-w
Copy link
Member

Hi @bbreton09,

could you tell me a little bit more about your usecase with this particular DPT? What would you want to do with it?

@bbreton09
Copy link
Author

@marvin-w

I have a Hager TX230 module which receive the active energy in kWh via teleinfo. Unfortunately this module uses DPT 235.001. Therefore active energy DPT 13.010 is combined with Tariff DPT 5.006. The goal here is therefore to be able to recover the active energy in kWh to use the HA energy module.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please make sure to update to the latest version of xknx (or Home Assistant) and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Mar 24, 2023
@farmio farmio added no-stale 💡 feature request Feature request and removed stale labels Mar 24, 2023
@bbreton09
Copy link
Author

bbreton09 commented Nov 1, 2023

Hi, any news about this DPT ? How can i help ?

Not shure it help but in jeedom KNX plugin the décoding is make like this:

case "235":
	if ($dpt != "235.001"){
	/*if ($value < 0)
	$value = (abs($value) ^ 0xffffffff) + 1 ; */
	foreach(explode('|',$option["ActiveElectricalEnergy"]) as $tarif => $ActiveElectricalEnergy){
	$value=cmd::byId(str_replace('#','',$ActiveElectricalEnergy))->execCmd();
	$data= array(($value>>24) & 0xFF, ($value>>16) & 0xFF,($value>>8) & 0xFF,$value & 0xFF,$tarif,(0<< 1) & 0x02 | 0);
	}
}
			case "235":
				if ($dpt == "235.001"){
					$value = $data[5] & 0x01;  
					if($value == 1)
					   break; 
					log::add('eibd', 'debug', 'La valeur de la énergie electrique est valide');		
					$value=($data[5]>>1) & 0x01;
					if($value == 1)
					   break;
					log::add('eibd', 'debug', 'La valeur du tarif est valide');	
					if ($option != null){
						if ($option["ActiveElectricalEnergy"] !=''){	
							$ActiveElectricalEnergy=explode('|',$option["ActiveElectricalEnergy"]);
							$Tarif=$data[4];
							log::add('eibd', 'debug', 'Nous allons mettre à jour le tarif '. $Tarif);	
							$ActiveElectricalEnergyCommande=cmd::byId(str_replace('#','',$ActiveElectricalEnergy[$Tarif]));
							if (is_object($ActiveElectricalEnergyCommande)){
								$valeur =$data[0] << 24 | $data[1] << 16 | $data[2] << 8 | $data[3] ;
								if ($valeur >= 0x80000000)
									$valeur = -(($valeur - 1) ^ 0xffffffff);  # invert twos complement    
								log::add('eibd', 'debug', 'L\'objet '.$ActiveElectricalEnergyCommande->getName().' à été trouvé et va être mis à jour avec la valeur '. $valeur);
								$ActiveElectricalEnergyCommande->event($valeur);
								$ActiveElectricalEnergyCommande->setCache('collectDate', date('Y-m-d H:i:s'));
							}
						}
					}
				}

@farmio
Copy link
Member

farmio commented Nov 3, 2023

Hi 👋!
No news on this front. The first answer to this issue still applies.
Parsing the payload is not the problem - handling the result down the pipeline in xknx devices, HA entities, services and events etc. is.

@bbreton09
Copy link
Author

Thank you ! Do you know how many time is take to this update is include in haos ?

@farmio
Copy link
Member

farmio commented May 27, 2024

It will need some changes in the integration code and the frontend too. And some testing would be good too.
So definitely not in the coming release (that's in 2 days).

I did plan to release this as part of a bigger (breaking) change to xknx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants