HMI Pushbutton



  • Hi everyone!

    I'm looking for a way to create a pushbutton on the HMI. MouseDown should send a True and MouseUp a False.. Is there a way to do just that?

    Regards,

    Jasper Jackson



  • @JasperJackson

    @JasperJackson said in HMI Pushbutton:

    Hi everyone!

    I'm looking for a way to create a pushbutton on the HMI. MouseDown should send a True and MouseUp a False.. Is there a way to do just that?

    Regards,

    Jasper Jackson

    I found a dirty workaround to create an impulse switch on the HMI Panel. I Made a second FBD that must run after the last program that resets all global variables that are used in the HMI as push button to FALSE. It works, but it's dirty....


  • administrators

    Hi @JasperJackson!

    There's a couple of ways of doing it, but any solution will probably look similar to yours. The issue is that the HMI does not have internal logic/state, but instead connects directly to the Mervis runtime. We are developing several other non-web HMI solutions, including a phone application and all-in-one industrial displays, which is the primary reason for this.

    As such there unfortunately is not a better solution for now, but we'll try and see if we can provide similar functionality anyhow. It probably will not be any time soon though, most likely not in the next Mervis release, which is slated to be out in the next month.

    There will however be a very large number of other improvements to the HMI system in the next months release, as it has been a major focus of Mervis development for the past 6 months.



  • Hi Jasper,

    could you share your solution please

    Thanks Fey





  • @JasperJackson said in HMI Pushbutton:

    @Feyiama 0_1524994896165_upload-459828a5-1647-4052-8858-1e2bf70c7711

    Hi! It is really easy, just make a seperate FBD (in this case ResetHMIButtons) which only sets all the global variables used as HMI buttons to FALSE.

    Have fun!



  • @TomasKnot Hi Thomas! Thanks for the reply, the workaround is working fine for the time beiing. I have another question. I want Mervis to control my processes and influence them using Domoticz which controls the rest of my domotica in my house. I'm working on a Python Plugin for Domoticz that does that through the HMI interface using JSON commands. As that is rather complicated i was wondering if it is possible to run EVOK and MERVIS and MERVIS HMI at the same time on a raspberry PI3B? Just asking because i don't want to ruin my Mervis installation, and running just mervis takes my raspberry to an average load of 2.17 already :(, any ideas?

    Regards~!

    Jsaper


  • administrators

    Hi @JasperJackson!

    Unfortunately running EVOK and Mervis in parallel can cause issues, as they each run on a separate cycle and can overwrite instructions from each other. It may be possible to use it for reading, but not for commands. Probably the best solution would be to write a TCP Modbus server in Python, which you could then connect both Mervis and Evok to.

    But by that point it may be easier for you to proceed with the HMI-to-Domoticz interface yourself.

    If you want to try and install EVOK anyhow you will need to do so manually (without using the installation script). It should be enough to install all the apt-get and pip packages which the script uses, along with copying the /opt/evok folder into, well, /opt/evok. The various system setup steps will have already been done beforehand for Mervis.

    In the next Mervis release we will include BACNet support, which should make connecting to Mervis somewhat easier. We have been thinking about creating a Mervis-to-Modbus-to-EVOK interface ourselves, but we are worried that it could still cause synchronisation issues. We'd like to create some means of integrating Mervis and EVOK in the future, but for now they are kept separate.

    In brief: what happens if both EVOK and Mervis send the same command? Mervis performs continuous writes for digital IOs, and therefore these would simply send a quick pulse. For analog IOs the coupling of reads and writes in Mervis would likely cause the output oscillate between the Mervis and EVOK values. This is of course possible to solve in your Mervis program, but could quite easily confuse users who are not ready for it.

    This does not occur with HMI/SSCP(/in future BACNet), as they write directly to Mervis variables rather than into device state (whether virtual or physical).



  • @TomasKnot Hi Thomas! Thanks for the extensive reply! Really cool! I didn't think of the modbusserver solution, it sounds way more compatible and standard than the way through the HMI api. But i'll wait for the BacNET/IP interface, that sounds even better. I'll finish off the Python plugin for Domoticz anyway, it works great already with booleans and is even bidirectional :), next step is to add analog values... Thank you!