Issue: I want to send a String or Date/Time command to MQTT from Opoenhab2.
For the life of me, I can’t figure it out how using items as it only seems single direction for string or date/time Types.
I have a script that allows me to receive an incoming message on my ESP that is related to a wifi_schedule/turn_off and wifi_schedule/turn_on topics that use a 24hr time reading to schedule the modem chip on/off. I was hoping to send this from openhab but can’t seem to figure a way with items file or the paperUI.
I found some stuff related to OH1x and the MQTT Action, but this does not seem to be available in OH2 so I am guessing there is a better way.
I was hoping for a method that allowed a time picker in the UI (control) and published that on selection/submission, but the action seems to be triggered by another event.
Not sure I am missing something or it can not be done.
I suppose I could write the schedule out in the rules but if someone wanted to update it they couplent just simply pick a time in the UI, ie. “start” and “finish” items.
If you just wanted the messages sent at fixed times, you could use a time-based rule to send them. Someone else asking how to do that had a sample rule that would run at the right time, and then use the commands in the rule that Opus sent before.
I’m not sure what you’re looking for with the time picker, or where you’d expect to find that. There isn’t a date time or time picker in the sitemaps or in HABpanel. You’d have to get really creative with a bunch of simple integers and then building the string you need from them in a rule. Getting it into the UI is harder than it sounds.
OpenHAB seems to be really good at making things happen when conditions are met, but not as effective at user interactions.
Can’t say what you are talking about by “when the time is changed”, however having an Item holding “the time”, you could just use the Changed -Event of such item.