I am having few sensors (example: temperature, humidity, etc) this will send data to openhab through MQTT broker, as I have subscribed in openhab.
I want to upload the received Data in openhab to our own private server, which doesn’t support MQTT, How can I upload this data to any private server? is there any particular binding to upload? or else How can we configure?
Just guessing :
If you want to send your persistence data to another server, you need a smb share on your openHAB server accessible from the other side. Then you have to setup some kind of cron job on your private server to get the persistence data.
So this is all on OS side, nothing within openHAB.
Since you are using am MQTT broker, you likely want somwthinf supporting MQTT to forward the data. Again, this is outside of openHAB. Many of us here do not use MQTT. Perhaps a generic Smart home forum could assist.
When? You want to forward each piece of data as it it arrives in openHAB? Or are you planning on sending bulk data for a period of time?
That influences the “how?” part. If this is a bulk thing, who will initiate the transfer, openHAB or remote server?
If it’s bulk, how will you build that bulk data? Write a file? Or use OH persistence and recover the data when needed?
@rossko57 I want to forward each piece of data as it arrives in openHAB?
it’s a very small amount of data and frequency is also very less.
Here the thing is I don’t know how to transfer Data, Only thing I know is we have a private server that supports push, whenever we receive data in opnehab from MQTT device I just want to push this data to our own private server.
This is out of openHABs scope. You don’t tell us how the “push” is accepted from your private server.
Is ist a Webservice endpoint or what “push” methods are allowed.
So before asking us to define your solution, please give us more insight about the supported services or protocols of your private server.
I gues noone can give you explicit answers on this unless you can tell us the simple “w”-questions!
who needs the data?
why do you need the data?
which format does the data need to be: database, textfile, …
when do you need the data: on each creation, all updates “en bloc” every day
what do you want to do with the data after it receives “our private server”?
as told here: it has nothing to do with openHAB installation or configuration as is, but OH is capable of exporting data basically in whatever format you like. But to help you, we need the context of your use case - everything else is just speculation.
rule "forward data"
when
Item myMQTTItem received update
then
var myData = myMQTTItem.state
// now do whatever it is you need to do
// to "push" myData to server
end
I think you might want an example of what a “push” looks like from your mystery private server operators.
I have subscribed to topic “temperature” where I receive continuous temperature data, whenever data is received, I want to publish received data to another topic.
rule “MQTTRule”
when
Item mqtt_topic_sensorthingid_temperature_channeld changed
then
val mqttActions = getActions(“mqtt”, “mqtt:broker:brokerthingid”)
mqttActions.publishMQTT(“server”,mqtt_topic_sensorthingid_temperature_channeld.state.toString,false)
end