Thanks for that. It really did the trick! ![]()
as I know nothing about JRuby, I just copy/pasted together this silly script:
min1 = Time.now + 1.minute
min2 = Time.now + 2.minute
min3 = Time.now + 3.minute
# create and populate a TimeSeries object
ts_data = TimeSeries.new
.add(min1, DecimalType.new(1))
.add(min2, DecimalType.new(2))
.add(min3, DecimalType.new(3))
# Send it to the item
testTimeSeries.time_series = ts_data
logger.info "timeSeries sent"
and got this in the logs:
2025-11-10 20:14:07.466 [INFO ] [ion.jrubyscripting.script.testSeries] - timeSeries sent
...
2025-11-10 20:14:07.509 [INFO ] [hab.event.ItemTimeSeriesUpdatedEvent] - Item 'testTimeSeries' updated timeseries with 3 values.
2025-11-10 20:15:07.477 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'testTimeSeries' changed from NULL to 1
2025-11-10 20:15:07.499 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'testTimeSeries' changed from NULL to 1
2025-11-10 20:16:07.474 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'testTimeSeries' changed from 1 to 2.0
2025-11-10 20:17:07.487 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'testTimeSeries' changed from 2 to 3
just a bit curious, why it is “2.0” but “1” and “3”…
and => how to invoke the sendTimeSeries via JS Scripting, cause I don’t know JRuby… ![]()