I just realized the Modbus Regular Poll refresh timer starts after the previous poll finished. So when I set a refresh time of 30000ms while the Modbus Slave needs additional time to start and process the request - let’s say 2000ms, the actual refresh time is >32000ms. While I can roughly compensate for that by setting the refresh to 28000ms, there is some small processing delay that varies due to the network delay and amount of data being transferred. I’d like to have a precise refresh of every 30sec. I guess this is not a specific OH4.2 issue but more of a general binding topic. Can that be improved to start the poll refresh times based on the clock rather than the previous event finished?
This is not specific to the OH4.2 release, please start a separate thread for questions like this.
But to give an answer, bindings have the option to use the scheduler in two different ways: scheduleWithFixedDelay() that schedules a new task the specified amount of time after the previous task has finished, and scheduleAtFixedRate() that schedules tasks on a specified interval.
The behaviour you see is the former method, which is the recommended unless there’s a specific need in the binding to have (more) exact timing. This is (someone correct me if I’m wrong) for performance reasons.
In generic bindings like the Modbus binding it could be argued that this choice should be up to the user. If you have a compelling reason you can file a feature request to have this implemented (or make a PR yourself)
Thanks for the suggestion. This is on the Pi at our vacation home, and I have learned by sad experience not to try to fix something like this when I’m not physically at the machine. I will be there next week and will try to move the directories.
The SD card is only a month old, though I suppose new cards can have problems.
I was able to move rm: ‘/var/lib/openhab/tmp/kar/org.smarthomej.binding.tuya-4.2.0/org/smarthomej/addons/bundles’ to another folder
I was not able to move ‘/var/lib/openhab/cache/org.eclipse.osgi/331’
mv: cannot move '331' to '/var/lib/openhab/temp/331': Bad message
I asked the Internet what to do about “Bad Message” in Linux. The advice is beyond my knowledge and skill, something about unmounting (but I couldn’t figure out what to unmount) and repairing the disk.
I would appreciate any guidance on how I can address this.
Looks like a confirmation that the SDcard is faulty.
I would suggest to replace it, how you move openHAB or restore backups to a new card depends on your setup and on how bad the current card is.
Personally I have had several sdcard related problems and never ever going to use those again as primarily drive. Best to switch to a nuc or use SSD if you stick to the rpi.
This is not related to the 4.2 release so if you have specific questions, please start another thread.