-
Notifications
You must be signed in to change notification settings - Fork 26
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
Question for team: How to handle the MQTT state-req message with PCF8574 #147
Comments
It will definitely break current clients if you will send 3 bytes instead of 2. =) |
I agree. Just wasn't sure due to lack of experience with clients. I'll implement a new command. Perhaps state-req2? Unless someone has a better idea. |
Code changes: - Addressed Issue #138 "Consider parsing URL commands as a string instead of digits" - Addressed Issue #147 "Question for team: How to handle the MQTT state-req message with PCF8574" - Addressed Issue #156 "URL command /82 is not returning a valid webpage" - Addressed Issue #157 "When changing code load types the Configuration settings need to be checked for compatibility" - Addressed Issue #158 "BME280 build - all pins are outputs even if defined as an input" Document changes: - Added section “Developers: URL Command Map” - Updated section “Notes on MQTT” to include the new state_req24 command for PCF8574 hardware configurations per Issue #147. - Improved the "Selecting Alternative Pinouts" section. - Added Issue #148 to the 20230312 release notes. It was addressed in that release but the notation was not included. #148 "When ST-LINK V2 is used to program the device it starts running before reset is released" - Addressed Issue #160 “PCF8574 startup: All outputs are "weak pullup" for several seconds at power on or reboot” by adding section “Notes on PCF8574 Outputs”. - Added section “LED” to describe the red LED on the HW-584.
Addressed in release 20230324 1435 by adding MQTT command "state-req24" and response "state24". |
My brain is fried so I'll throw this one out there for comment;
First, what I did with REST commands is that /98 or /99 report 16 pin state digits if no PCF8574 is found. But /98 or /99 report 24 pin state digits if a PCF8574 IS found. I leave it up to the user to detect this is whatever REST interpreter they are using.
Now the question: What do I do with the MQTT state-req command. It current returns two text bytes with the pin states of the 16 pins on the STM8 processor. But what if a PCF8574 is added. Should I return 3 bytes? Or should a new state-req command be added that returns 3 bytes? I'm asking because I'm not sure what complication this creates for MQTT software ... probably not any more complicated than the REST logic. I've never written an MQTT Client app so I'm looking for some suggestions.
For the moment the Pre-Release will never report the PCF8574 pin states when a state-req PUBLISH is received. It will operate as it does now reporting only the 16 pins on the STM8.
Mike
The text was updated successfully, but these errors were encountered: