Accessing Mervis variables through Evok
-
Hi,
Is there any way to set and get the variables defined in Mervis through Evok? Let's say i have a script that gets some data and would like that my mervis program acts upon that data. Can i use the Evok API in order to set some variable to the value that i get from the script? Or is this possible in any other way?
Regards
-
@n1lp0int3r Right now you can do it but not easily. When someone is asking for an interface between Mervis and other application, we suggest making a TCP Modbus channel and device in Mervis and map the variables to registers.
In Evok, there is no full support of making a proper TCP/RTU Modbus client or server (even though the TCP Modbus client is used to interface with neuron IOs and TCP Modbus Server provides access to DI of UniPi 1 for Mervis). But the support is hardcoded in evok so you would have to figure it out yourselves how it works...
-
Oh ok. One point that i didn't understood correctly is how we can make that mapping. In order to acomplish that i should interact with the TCP Modbus server and present to it a new device is that it?
If i understood correctly is there any documentation that you can point?Thanks
-
@n1lp0int3r Exactly...
You can use the Modbus Client in evok https://github.com/UniPiTechnology/evok/blob/master/evok/modbusclient_tornado.py which is used in Neurons and create a custom device which will periodically read from registers or write to register on event...
-
Ok i can see now. Thanks
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login