• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    SimpleParser documentation?

    Scheduled Pinned Locked Moved Mervis
    4 Posts 3 Posters 2.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Matt
      last edited by Matt

      Is there any documentation available for the SimpleParser channel protocol? It looks like it will be appropriate for interfacing with one of our pieces of equipment, but I don't see anything anywhere about the syntax for the "Expected response" field in the Command Definitions. I also hit an error of "Invalid format of format string" for the datapoint--what's the correct format to use here?

      Thanks!

      J 1 Reply Last reply
      Reply Quote 0
      • J
        JasperJackson @Matt
        last edited by

        @mdturnerphys Same here! I want to try to make an interface between domoticz and unipi, but no documentation at all :(

        1 Reply Last reply
        Reply Quote 0
        • T
          tomas_hora administrators
          last edited by

          Hello @mdturnerphys @JasperJackson!
          Simple parser is a tough one :) It was designed as a simple tool to ease the process of implementing custom communication protocols of serial devices. It might be good for parsing 1way communication with a device which only sends data to the line, but for any advanced functionality, I recommend implementing it in ST.

          Unfortunately, it is not yet documented but we have requested at least basic description from the Mervis developers... If you want, you can check the example project to be found at downloads.unipi.technology

          M 1 Reply Last reply
          Reply Quote 0
          • M
            Matt @tomas_hora
            last edited by

            Thanks, @tomas_hora. I've just gone ahead and written my own in ST, based off the custom serial protocol example. I'm not sure if that sample actually works for serial communications, but for TCP I had to split Case 3 into 2 cases:

            3:
            	if io.getportstatus(handle) = 0 then 
            		state := 4;
            	end_if;
            	
            4:
            	received := io.readport(handle, adr dataRecv[0], 100);
            	if received > 0 THEN
            		output_string := bytes_to_string(adr dataRecv[0], received);
            		output_length := len(output_string);
            		command_out := command_in;
            		last_output_time := getutctime();
            		state:=5; 
            	END_IF;
            

            Not doing this seemed to result in the read buffer being reset before the bytes could be read.

            1 Reply Last reply
            Reply Quote 1

            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
            • First post
              Last post