Input from file or webservice

  • Is there any option read value in Mervis from file or webservice?

    I have Arduino with sensors and I would like to retrieve values from this device.

    Can someone advice me?

  • @Martin-Trojan @tomas_hora any suggestions?

  • administrators

    @Martin-Trojan There are actually three ways of doing that:

    • TCP Modbus - you can create a TCP Modbus server in Mervis and map your variables to the registers and read it from a client
      *Fastcgi interface - unfortunately the is no documentation for that (I will try to get it) but the implementation is done in the webserver that is running on UniPi in javascript
      *SSCP - the hard way, implementation done in Cpp and available at downloads....

  • @Martin-Trojan Did you manage to find a way using the TCP Modbus server in Mervis?

  • I'm interested in this as well. From other posts, I know Others have been looking to do this as well.

    Can someone explain the best way to implement via modbus tcp?


  • administrators

    Hello @Drewscm,

    you have to decide who will provide the Server and who will be the client. In Mervis, both options are possible. Just create a new Channel (when implementing client) or Server Channel and select Modbus protocol on TCP and set the proper IP/port settings. Than:

    • Server
      • Add a data point and map the corresponding variable
    • Client
      • Add a new Grou with type read or write (determining whether the data points within this group will be writing values from Mervis into the server or reading data from server into Mervis)
      • add data point

    Then you will be facing a few questions of how to set up the groups and data points but that is nicely described in the help of Mervis (press F1) and search for Modbus - there are two articles Modbus server setup and Modbus driver settings.

  • Hi,

    I'm testing C modbus library and zmq lib to connect my WMR200 weather station to Mervis. That's working. If someone nead some example code, ask for me.


Log in to reply