The enphase envoy binding that i use has a channel representing a timestamp as a string (last update). I have trouble parsing this string to a DateTime object so that i can use it for calculations etc.
For example the string is: ‘30-dec-2019 16:20:31’
Example rule
if (! _grpZonnepanelenReports.allMembers.filter[ (it.state as DateTimeType) < now.minusDays(1) ].empty
{
// handle situation.
}
How could i parse this string i tried looking into org.joda.datetime, but i can’t get it to work.
Somewhat offtopic:
The binding: [New Binding] Enphase Envoy Solar System gateway
The repository: https://github.com/HentschelT/openhab2-addons
I really like this binding, as it is not cloud based, but it is not maintained and there is no PR made. The best thing would be to change the channel to a real datetime or more useful format like: 2019-12-30T23:59:59