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

    Experiences with openHAB?

    Scheduled Pinned Locked Moved OpenHAB
    2 Posts 2 Posters 1.5k Views 2 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.
    • K
      knebb2
      last edited by

      Hi all,

      I am looking for a control unit for my upcoming smart hone.As I already have a M103 running for my heating (coded it on my own based on C) I prefer to use it for the control unit for smart home.

      I was thinking of using openHAB as it appears to be the most active and stable way for such a unit (tried with NodeRed but this looks really complicated for me) Some years ago I did some first steps in FHEM - I could imagine to get it running...

      Anyway, anyone here who has some experience with openHAB on a Neuron device?

      Thanks!

      /KNEBB

      1 Reply Last reply
      Reply Quote 0
      • K
        knebb
        last edited by knebb

        Hi,

        just for reference and to help future questions:

        I am running OpenHAB on a dedicated RasPi. It is a Java application which I do not want to run on a Neuron. Keep it simple and stupid.

        In C code it was not too complicated to get data from OpenHAB though curl calls.
        See code snipplet:

        /* Function gets calledd with an item name          */
        /* The url is defined here globally:                */
        /* url="http://openhab.domain.com:8080/rest/items/" */
        
        long get_2file(char *url, char *filename )
        
        {
        CURL *curl_handle;
        FILE *FI;
        
        int r,code;
        
        code = 0;
        curl_handle = curl_easy_init();
        
        /* set URL to get here */
        curl_easy_setopt(curl_handle, CURLOPT_URL, url);
        
        /* disable progress meter, set to 0L to enable and disable debug output */
        curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
        
        /* use default write function */
        curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, NULL);
        
        /* open the file */
        FI = fopen(filename, "w");
        if(FI) {
        
                /* write the page body to this file handle */
                curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, FI);
        
                /* get it! */
                r = curl_easy_perform(curl_handle);
                if (r != 0) {
                        code=-1;
                } else {
                        /* Data is now in the file */
                }
                /* close the header file */
                r = fclose(FI);
        } else {
                code=-1;
        }
        /* cleanup curl stuff */
        curl_easy_cleanup(curl_handle);
        
        return code;
        }
        
        1 Reply Last reply
        Reply Quote 0

        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