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

add messaging areas #33

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add messaging areas #33

wants to merge 4 commits into from

Conversation

skimj
Copy link
Contributor

@skimj skimj commented Jan 22, 2018

User Messaging Area (UMA) is only available on the CT80. I believe that Price Messaging Area (PMA) is available for most all models so I put it in the CommonThermostat class but I was only able to test against the CT80. The API allows 4 lines for the PMA but I could only make 2 work, may be different per model?

User Messaging Area (UMA) is only available on the CT80. I believe that Price Messaging Area (PMA) is available for most all models so I put it in the CommonThermostat class but I was only able to test against the CT80. The API allows 4 lines for the PMA but I could only make 2 work, may be different per model?
@craftyguy
Copy link
Contributor

Functionally, it seems to work well. I was able to set the price & user messages on my CT80.

If the line numbers are constrained by API and device model, the function should test for this and apply constraints, raising errors if an invalid line number is passed (e.g. if user passes 2 for line number on a CT80 when only 0-1 are supported).

That said, interestingly enough, if I pass a line number greater than what the API supports, it seems to just put the message in the greatest line number supported by the device. I don't know if we can trust this for all devices.. I generally error on the safe side and treat any behavior not explicitly allowed by an API to be undefined, hence why I think this patch should test and warn/error if an invalid value is passed.

@skimj
Copy link
Contributor Author

skimj commented Apr 22, 2018

I agree that it would be nice to do some validity checking. I had originally planned to do just that but ran into many troubles. Especially for the 26 and 1/2 character thing, I started to test lots of characters to see what would work in the 27th position and quickly tired of non-automated testing (need to automate reading the screen!) Also, the on/off behavior is unpredictable (even noted in the API doc). There would also be a need to test against other models like the CT30 and my fear is that it may be different per model... I quickly realized that the value wasn't keeping up with the invested effort, gave up and just left my findings as comments.

I use the messaging area but I just treat it as unpredictable and accept that burden with my client code.

@craftyguy
Copy link
Contributor

There's a small merge conflict with this PR now, if you don't care to resolve it I can.

But, I think we should change this so that it's specific to the CT80 (move it from CommonThermostat) since you (or I) are unable to test on other devices (e.g. CT30). If anyone with a CT30 can test this and confirm it works, then keeping it in CommonThermostat would be fine.

That's my two cents at least. I would appreciate input from @TD22057 too in case I am wrong :)

…messaging

merge from upstream, resolve conflict
@skimj
Copy link
Contributor Author

skimj commented Apr 19, 2024

Merge conflict resolved, should be good to go.

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

Successfully merging this pull request may close these issues.

3 participants