Rule to Write values to a custom db table

When a rule is triggered I would like to write to a database table time, value and two other variables?
Eg current time, sensor and state

You cannot change what persistence writes to the database. It creates a table for each Item you persist and each row consists of a timestamp and the Item’s state.

If you need more you will need to write the code yourself. If the database you want to use does not have a REST API you will probably have the best luck writing a script to save the data and calling that script using executeCommandLine from your rule.

Thanks, this wasn’t for persistent storage, so I’ll use commandline but would be good to have api for database updates

Feel free to open an Issue on the Eclipse SmartHome github project. If you are a coder we would welcome a PR that implements this.