-
-
Notifications
You must be signed in to change notification settings - Fork 460
[profiles] Add divide system profile #4151
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
base: main
Are you sure you want to change the base?
Conversation
|
We had a discussion about that some years ago and the result was that only the most basic profiles should be part of core and other profiles should go into add-ons, see #779. |
|
@J-N-K I've read #779 and I believe this PR meets its spirit and your comment above. To have the offset profile is only half of basic arithmetic (add/subtract), while adding this profile merely fills the absence of the other basic arithmetic operators (divide/multiply). I don't think overloading the offset profile as proposed in #3538 was appropriate, but the need discussed was never met. I agree that all other manipulation (computation, string formatting, etc.) should go through the transformation path. |
Signed-off-by: John Cocula <john@cocula.com>
Signed-off-by: John Cocula <john@cocula.com>
Signed-off-by: John Cocula <john@cocula.com>
Signed-off-by: John Cocula <john@cocula.com>
|
I really see the need for a multiply / divide profile and will support its implementation. Especially with the new dimensions for @watou Are you volunteering to move this implementation to the Basic Profiles bundle (or introduce a new |
|
I am definitely not volunteering to exert more effort when the discussion was never concluded and my PR just withered until an "important" person comes along a year later with his own idea. I put huge effort into openhab code some years ago, suffered blatant plagiarism from some random newcomer whilst working on the project, was insulted and dismissed by the project lead for even raising the issue, and then later found some of my commit histories wiped. The idea that I would willingly suffer more capricious and dismissive treatment from an unhealthy developer culture is completely out of the question. Unsubscribed. |
@watou Are you referring to me here? If so, this makes me very sad. You have always been an extremely respected community member for me and if I have ever insulted you in any way, this must be due to lacking social skills on my side - in no way I would have ever dared to intentionally insult you or scare you away in any other form. My sincere apologies, if this was the case. And I'd invite you to PM me to clarify the situation, but this is clearly fully up to you, if you are willing to share with me what has led to this unfortunate outcome. |
|
Perhaps you do not have a memory; perhaps you do. I'm not interested in dialogue about a years-old event or lobbying to restore my vanished commit histories. Apologies framed conditionally also tend to have the opposite effect. It is what it is. Regardless, please don't tag me in again as I'm still troubled by how I was treated all these years later and I find it upsetting. |
|
Just for anyone reading this here: These accusations didn't leave me at ease, so I digged in the past - I guess what watou refers to is this PR from 8.5 years back (which I indeed had no memory from anymore, since that feels like eons to me). I checked with ChatGPT (Thinking Pro...) to get a somewhat neutral assessment of my behavior at that time, here's what it said: Me: ChatGPT: What Happened (Short Timeline)Feb 10, 2017: Feb 24–27, 2017: Feb 25–27, 2017: Mar 2–4, 2017:
Aug 10, 2017: Aug 22, 2017: (That PR also links a community thread where users remark on the earlier “flame,” but Kai isn’t the source of it in that discussion.) Was Kai Insulting or Negative Toward watou?From the 2017 Nest binding conversation: Kai’s interventions read as moderation and conflict resolution, not personal attacks.
He does challenge claims (asks for proof of copied code that survived into the final PR) and proposes concrete resolution steps (authorship adjustments, commit squashing). The heated language in that thread came from another participant (pinkfish), not from Kai. ConclusionYes, there was a dispute in 2017 over the Nest binding rewrite. I guess that will help me sleep relatively ok tonight - sorry to everyone for this off-topic post, though... |
|
My God what a vulgar person you are Kai, to think you can use AI to excuse events from years ago, to miss critical details and not involve the victim in the telling of events. How completely shameful of you, and entirely consistent with my memory of the kind of person you are. To then say, after your contrived telling of the distant past using AI as a pretend neutral voice, that this leaves you at ease, is entirely shameful. Your transparently self-serving attempt at telling of the past should only leave neutral observers embarrassed for you. How dare you pretend that your AI exercise puts you in a fair light. Instead it only draws attention to a guilty conscience where you try to be your own judge and jury. For shame. Please stop abusing me finally. |
If it doesn't go in core, it might be appropriate to add it to the Basic Profiles add-on. There are already a lot of profiles along these lines there. Don't forget to make it UoM aware though. In the meantime, inline script transformations will do the trick. For example: JS: | parseFloat(input) / 1000 As for the controversy over the Nest add-on years ago, I read that thread shortly after it happened, and I have to say IMO watou (not tagged since he requested not to above) was not treated fairly. Primary authorship has to count for something. My human reading of that thread back when it happend and now when I reread it was watou's concerns were simply rejected out-of-hand and the main concern was "how can we get this PR merged" without recognizing the impact. I agree with watou, the Nest binding was basically stolen from him with the blessing of the project and I almost quit OH over that thread and that thread is one I still think about from time to time. That thread is a major reason I jumped at the opportunity to help mediate the jRuby helper library issue which was a very similar situation. I said to myself "we don't want another Nest 2.0 mess on our hands!". I think we came to a better if still not wholly satisfactory conclusion to that situation (the primary author had to give up support due to his employer's policies when the project moved to the openHAB project so he lost control anyway). But at least everyone involved was able to agree on a path forward and now we have first class jRuby support in OH without a lot of bad feelings. That thread is also a major reason I don't write add-ons or contribute code to the project even though I could. As a project overall we are not good at approving PRs in a timely manner, and when we do accept PRs, we are not always careful to negotiate these types of controversies as they come up. The risk may be low, but it's possible someone may come in and decide they can do it better and take away my code. |
The
offsetprofile addresses addition and subtraction, but there are use cases for division and multiplication that should be addressed by a complementary system profile.Some use cases can be addressed with UoM where the items use SI units and devices report in factors of 10 different from desired (such as a devices reporting tenths of Volts so specifying
unit="dV"solves that). However other use cases cannot be addressed, such as reporting tenths of kWh but there is no suitable SI unit, or when there is no suitable UoM concept for the data.See #3538 for further discussion. I can add other doc and UI PRs with some guidance. Thanks!