Replies: 4 comments 7 replies
-
I don't know openHAB, but can't you subscribe to
I really think this is backwards. The Home Automation System should handle the topics and mappings for the devices and not the other way around. |
Beta Was this translation helpful? Give feedback.
-
You should be able to have a unique topic for each plate, so you can differentiate between MQTT messages for a specific plate, e.g. idle etc. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Just testing synch/lag with the new configuration. Seems great. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I expect I am in a minority as an openHAB user of openHASP and that the approach to using openHASP might be quite different if I were using the Home Assistant integration.
I love the potential of this project and have acquired 10 or so Sunton ESP32-2432S028R screen jobbies with the view to placing one of these units above each of the light switches in my home each with a default screen representing at least the control options available at the switch and the ability to swipe left or right to access other screens.
All plates are configured with exactly the same screens but defaulted to the screen designed for their position. Some switches are represented on multiple screens depending upon where the screen is positioned.
Integrating a plate currently involves a lot of configuration in OpenHAB. This includes:
NB: I may be able to simplify this last rule after seeing that there is a synch option available.
Reproducing the above configuration for each device would be problematic for many reasons and the most elegant option is to configure each of the plates to subscribe to the same MQTT topics. This is how MQTT is designed to work, and it does work very effectively ensuring that each of the ten plates is updated with every change and stays perfectly in synch with changes on one unit instantly reflected each of the others.
NB: This is now easy to configure with the most recent firmware. Previously it was necessary to use the same name for every plate which mostly worked but was confusing.
I am however unable to find a way to configure MQTT in openHASP so that the command and state information for on screen objects like hasp/foo/state/p12b1 and hasp/foo/command/p12b1.val all go to the same path like hasp/foo but other stat messages related to the individual plate like hasp/foo/command/backlight, hasp/foo/state/idle or hasp/foo/state/input22 to be directed to an individual topic.
Hopefully I'm missing some option which would allow me to differentiate between differently scoped properties. The additional options in firmware 0.7.0 MQTT configuration seems to have improved things in that I can specify the same Node Topic rather than having to use the same plate name for all plates which is a huge improvement.
The documentation for 0.7.0 doesn't seem to detail any of the new MQTT settings. Monitoring the output with mqtt-spy doesn't indicate that there is an option to differentiate plate specific changes such as idle state by sending them to a plate specific topic.
On a related matter, I have purchased IR sensors for the purpose of waking the screen of each plate when there presence is detected near them. The state of these sensors is available under hasp/foo/state/input22 which doesn't allow me to tell which device to wake up in response to presence being detected. The best I could manage seems to be to wake all screens in response. If there is a way to respond locally via cmd files (or something) to the IR input, that would also solve my problem.
If there is not currently a way to differentiate MQTT messages which are specific to the operation of each plate (as opposed to the status of objects on pages) by sending them to a plate specific topic, then adding this option would make it much easier to achieve certain things such as controlling the screen brightness based on a presence sensor. Another option might be to add additional properties to the events to indicate the node name they have been sent from.
Overall, it has required a lot of work to generate the objects and scripting required to maintain synchronisation between plate switches etc and the things in openHab which they represent. I think it would be much easier to integrate openHASP into openHAB, and probably other platforms, if it were possible to add MQTT definitions to each of the objects in the pages.jsonl file.
openHAB supports the option of publishing all internal states to MQTT for read/write access to everything in openHAB. Being able to connect openHASP objects directly to these MQTT topics would simplify integration a great deal. I imagine it would be necessary to define both the MQTT topic to link to and a transform or mapping for the values something like (1 = "ON", 2 = "OFF") or (1 = "HEAT", 2 = "DRY", 3 = "FAN", 4 = "COOL") for each of the pages.jsonl objects. I guess lvgl might not make this as easy to implement as I imagine so something like a mqttmappings.json file describing overrides for the default MQTT topics and mappings would work equally well.
Thanks for all of the effort that obviously goes into openHASP. It's an excellent project and I'm excited to be adding openHASP to my home. I appreciate any advice that you might be able to offer and understand that there are always tradeoffs when selecting which features to add to a project.
Cheers,
Mick.
Beta Was this translation helpful? Give feedback.
All reactions