Announcement

Collapse
No announcement yet.

Arduino Plugin feature requests

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • logbuilder
    replied
    Originally posted by jimbell View Post
    What model of the 8266 modules are you using? I am using the WeMos brand here and they not work exceptionally well.
    I like the HiLetGo version of the nodeMCU. It works well on a breadboard. I get mine on Amazon for about $8.75.

    https://www.amazon.com/HiLetgo-Versi.../dp/B010O1G1ES

    I once got some of the LoLin V3 nodeMCUs. They were too wide to breadboard but I still used them. Seems to me their wifi is not as strong nor as reliable. Might have just been the batch I got.

    Leave a comment:


  • jimbell
    replied
    Which 8266 module

    Originally posted by logbuilder View Post
    @Greig - Feature Request

    I've really been having fun adding new boards through out my place. This environment is so cool. Thanks for your enabling.

    One thing that I don't look forward to is adding a new nodeMCU. I have this standard set of devices that get added but are not always used on each device. So far I'm up to 12 I think. Let me list them.

    Input 1 Motion (PIR or Ultrasonic)
    Input 2 Door/Window mag switch (HIGH or LOW) doubles as water leak sensor
    Input 3 Temp (DHT11)
    Input 4 Humidity (DHT11)
    Input 5 Heartbeat (updates each 5 mins)
    Input 6 Wifi dBm (updates each 7 mins)
    Input 7 Button1
    o
    o
    o
    Input 12 Button 6

    It would be neat if I could clone another board's devices instead of having to add each one. I do clone the sketch myself rather than downloading. I manually set the mac, ip, port, board id, ssid and pass. Quick and easy.

    Hope this makes sense.
    What model of the 8266 modules are you using? I am using the WeMos brand here and they not work exceptionally well.

    Leave a comment:


  • alphatech
    replied
    Originally posted by logbuilder View Post
    @Greig - Feature Request

    I've really been having fun adding new boards through out my place. This environment is so cool. Thanks for your enabling.

    One thing that I don't look forward to is adding a new nodeMCU. I have this standard set of devices that get added but are not always used on each device. So far I'm up to 12 I think. Let me list them.

    Input 1 Motion (PIR or Ultrasonic)
    Input 2 Door/Window mag switch (HIGH or LOW) doubles as water leak sensor
    Input 3 Temp (DHT11)
    Input 4 Humidity (DHT11)
    Input 5 Heartbeat (updates each 5 mins)
    Input 6 Wifi dBm (updates each 7 mins)
    Input 7 Button1
    o
    o
    o
    Input 12 Button 6

    It would be neat if I could clone another board's devices instead of having to add each one. I do clone the sketch myself rather than downloading. I manually set the mac, ip, port, board id, ssid and pass. Quick and easy.

    Hope this makes sense.
    @logbuilder, what do you use as sensor to monitor for water issues on the floor, I would like to monitor if I have issues in the basement when it rains a lot. I can get some water on the floor when it does from the ground up, I guess the water table rises pretty quickly.

    Thanks,
    Aldo

    Sent from my SM-G935V using Tapatalk

    Leave a comment:


  • logbuilder
    replied
    @Greig - Feature Request

    I've really been having fun adding new boards through out my place. This environment is so cool. Thanks for your enabling.

    One thing that I don't look forward to is adding a new nodeMCU. I have this standard set of devices that get added but are not always used on each device. So far I'm up to 12 I think. Let me list them.

    Input 1 Motion (PIR or Ultrasonic)
    Input 2 Door/Window mag switch (HIGH or LOW) doubles as water leak sensor
    Input 3 Temp (DHT11)
    Input 4 Humidity (DHT11)
    Input 5 Heartbeat (updates each 5 mins)
    Input 6 Wifi dBm (updates each 7 mins)
    Input 7 Button1
    o
    o
    o
    Input 12 Button 6

    It would be neat if I could clone another board's devices instead of having to add each one. I do clone the sketch myself rather than downloading. I manually set the mac, ip, port, board id, ssid and pass. Quick and easy.

    Hope this makes sense.

    Leave a comment:


  • enigmatheatre
    replied
    @jimbell

    What Logbuilder said

    The only other info you need is that you need to run the beta version of the plugin which can be found in the Beta section of the updater.

    The manual for the Beta can be found Here and all of the various builds can be found Here.

    Greig.

    Leave a comment:


  • logbuilder
    replied
    Originally posted by jimbell View Post
    I was using the homeseer arduino plugin with a USB connected Arduino micro about a year ago. I kind of lost interest in that over time. However, I saw your posting about using a arduino/homeseer with wifi and that sparked my interest again. I have several questions.

    Is there documentation on using a arduino with homeseer over wifi? I read the manual and I did not see a reference.

    I have a good deal of arduino experience, but without using homeseer. Is there now a library module for using wifi with the 8266?

    If there is a place that I can go to read about this, I would really appreciate it. Obviously, I need to "ramp up" my knowledge of using the arduino with the wifi modules.
    @jimbell

    Ok. I'll try to give a high level overview with the assumption you already know about the IDE and the basic structure of a sketch. I've been doing most of my work with wifi based ESP8266 class devices using the API version of the plugin sketch so that will be what I address.

    In the IDE, you will need to add new boards. In File/Preferences you will see where you can add URLs for other board managers. Here is what you enter:

    http://arduino.esp8266.com/stable/pa...com_index.json

    In library manager, do a search for ESP8266Wifi. You will need that too.

    Install the Arduino plugin in HS3.

    In the plugin, you can add boards. You are able to configure them as far as IP address, mac, ssid, password, port. Connection is IP. Type is NodeMcu API.

    You can now download a basic sketch for that board. It will contain the board specific items you configured. In the IDE you could compile and load it although it would not do anything other than connect to the plugin.

    Ok, so you are familiar with a vanilla sketch. The two big parts are setup() and loop(). The sketch you downloaded has those two parts. In the setup() function it calls HSSetup() which is in the sketch you downloaded but is empty. In the loop() function it calls HSloop() which, again, is basically empty. Think of those as your setup and loop. Stay out of the main setup and loop.

    In HSSetup() you can do most anything you would otherwise need to do in setup. Same for HSloop().

    Ok, now lets talk HS3 devices. In the Arduino plugin, for each board you can configure outputs and inputs. Each board can be configured however you want. Lets just take a DHT11 temp sensor and work thru that.

    In the plugin for that board, you would configure an input device. It will device ID #1. Second device would be device ID #2 and so on.

    In the sketch, somewhere before HSSetup(), you would #include whatever libraries you need and you can declare global variables just like you can in any arduino sketch.

    In HSSetup() you would put whatever you would normally put in setup() to support that DHT11 sensor.

    In HSloop() you would add your DHT11 handling logic. Now for the special sauce....

    In HSloop() you have two new commands. SendToHS(Device,Value) and FromHS[x].

    Here is commented doc from the sketch itself:

    Code:
    /* To Send Data to Homeseer use SendToHS(Device,Value)
         Eg.. SendToHS(1,200); where 1 is the API device in homeseer and 200 is the value to send
         To Recieve data from Homeseer look up the FromHS array that is updated when the device value changes.
         Eg.. FromHS[5] would be the data from API Output device 5
    */
    So in HSloop() you would read your temp sensor and get a temp. I then reformat it to be F rather than C. Then you would call SendToHS(1, temp) where 1 is the only input you have thus far defined for that board and temp is what you read from the sensor.

    Now if you look at that device in HS3, it should contain the temp and the timestamp of when you updated it. Now in events, do whatever you want.

    I hope that is helpful in getting you thinking in the right direction about how this stuff fits together and works.

    Leave a comment:


  • jimbell
    replied
    Need more information on using Arduino with wifi and Homeseer

    I was using the homeseer arduino plugin with a USB connected Arduino micro about a year ago. I kind of lost interest in that over time. However, I saw your posting about using a arduino/homeseer with wifi and that sparked my interest again. I have several questions.

    Is there documentation on using a arduino with homeseer over wifi? I read the manual and I did not see a reference.

    I have a good deal of arduino experience, but without using homeseer. Is there now a library module for using wifi with the 8266?

    If there is a place that I can go to read about this, I would really appreciate it. Obviously, I need to "ramp up" my knowledge of using the arduino with the wifi modules.

    Leave a comment:


  • logbuilder
    replied
    Originally posted by logbuilder View Post
    Just moved my first Arduino from the bench to its new home in my detached garage. It is probably 200 feet away. It is running a nodeMCU and using wifi. Power is AC supplied, no battery.

    I took my phone with me and using a wifi analyzer, I saw I was getting about 30% signal strength but was fluxuating +-5%. Placed the new node and came back inside to see that yes, it had connected to HS3.

    Got me to thinking though, it sure would be nice if the plugin could report the wifi signal strength for each nodeMCU. Maybe update a device once per minute with the percentage or dBm. I see in wifi.h that there is a function that returns the signal strength in dBm. Don't know if you use that lib or not.

    Just a thought.
    Originally posted by petez69 View Post
    You could probably code that value into the API code when its released and update a device with the latest value....
    Greig,

    I just coded this. Works great. One thing I did have to do was move your #include <ESP8266WiFi.h> to the top of the sketch. You might want to think about moving them up in the base API sketch.

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by dreambox View Post
    Hi,
    It would be nice to have also an inverted option for outputs, like there is now for the analog input.
    Many relay boards use zero as the active High.

    I solved it now in the Homeseer.ino in this way:

    Code:
     case 'O':
    
            pinMode(Byte3, OUTPUT);
            if (Byte4 > 1) {
              OutPinArray[Byte5 - 1] = Byte3;
              OutputMillis[Byte5 - 1] = Byte4;
              bitWrite(OutputToggle, Byte3, 0);
              previousOutMillis[Byte5 - 1] = 0;
            }
            else
            {
              Byte4 = !Byte4;  // Inverted output Alex Houben 20170328
              OutPinArray[Byte5 - 1] = -1;
              bitWrite(OutputToggle, Byte3, 0);
              digitalWrite(Byte3, Byte4);
              previousOutMillis[Byte5 - 1] = 0;
            }
            break;

    Alex
    You can do this now on each output. Go to the device manager and click on the output name to get to the device configuration page and then click on the Arduino tab. The invert option is there.[emoji6]

    Greig.

    Sent from my SM-G925F using Tapatalk

    Leave a comment:


  • dreambox
    replied
    Hi,
    It would be nice to have also an inverted option for outputs, like there is now for the analog input.
    Many relay boards use zero as the active High.

    I solved it now in the Homeseer.ino in this way:

    Code:
     case 'O':
    
            pinMode(Byte3, OUTPUT);
            if (Byte4 > 1) {
              OutPinArray[Byte5 - 1] = Byte3;
              OutputMillis[Byte5 - 1] = Byte4;
              bitWrite(OutputToggle, Byte3, 0);
              previousOutMillis[Byte5 - 1] = 0;
            }
            else
            {
              Byte4 = !Byte4;  // Inverted output Alex Houben 20170328
              OutPinArray[Byte5 - 1] = -1;
              bitWrite(OutputToggle, Byte3, 0);
              digitalWrite(Byte3, Byte4);
              previousOutMillis[Byte5 - 1] = 0;
            }
            break;

    Alex

    Leave a comment:


  • enigmatheatre
    replied
    Why not just add it to a second board with the normal Sketch?

    Greig.

    Leave a comment:


  • chris2ffer
    replied
    Originally posted by logbuilder View Post
    How would you envision this working? Are you wanting the color picker UI to be on the HS3 device web interface? What is your specific use case?
    Sorry for not clarifying I was thinking the same way it works when you have the board in regular "Arduino" mode. When you have added at least three outputs you can choose which output to use for which color.

    Leave a comment:


  • logbuilder
    replied
    Originally posted by chris2ffer View Post
    Is it possible to add a Color picker also when in API mode? I like using API mode but the picker would be nice to have
    How would you envision this working? Are you wanting the color picker UI to be on the HS3 device web interface? What is your specific use case?

    Leave a comment:


  • chris2ffer
    replied
    Is it possible to add a Color picker also when in API mode? I like using API mode but the picker would be nice to have

    Leave a comment:


  • Pierre
    replied
    Serial reading pin

    Hi,

    I wish I could have my HS-connected Arduino
    - connect on a serial com on one pin
    - and transmit the message in a HS device or by any way I could parse it with scripting.

    The plugin is going really great!
    So far I have transferred 10 inputs, 8 relay inputs and 14 1-wire temperature probes , from out-of-date hardware and software to a simple Mega Arduino and the plugin.
    Scripting and event changes where very easy to manage.
    Only disappointed with the input long delay.
    Transferring the serial messages from my electrical counter directly through Arduino to HS via the plugin will help me get rid of my very-old Quatech serial-to-ethernet box, and many cables.

    Thanks
    Pierre

    Leave a comment:

Working...
X