Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. dbemowsk
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by dbemowsk

    • RE: What did you build today (Pictures) ?

      Though not fully finished, I am prototyping a new in-wall switch/scene controller with an integrated 128x64 OLED display. The design is made to fit my decora wall switch design that I had posted a while back. Here is a mock up of how I think the keypad and screen will be layed out.
      !0_1513471867393_4ef1b764-81be-48e7-9047-0493e0467626-image.png
      0_1513471973166_221268ef-db5a-4572-9929-536364bbd172-image.png

      For the screen, I am hoping to display the current room temperature and possibly the outside temp. I can also scroll messages across the screen if needed. I can also do some custom graphics and icons.

      I have tested the display connected to my uno with the Adafruit sample code and think it does a nice job. This is not my video, but it is the same sample code that I used to test it.
      128x64 cheap OLED display Adafruit library Arduino UNO – 00:59
      — Cutter Slade

      I'll post more as I get further along.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • Custom icons

      I thought I would post a few custom icons that I made for my Domoticz setup. If anyone is interested I will post the zip files needed to add them to Domoticz.
      Garage door controller Garage door off Garage door on

      Irrigation zone sprinkler Irrigation zone off Irrigation zone on

      Motion detector Motion detect off Motion detect on

      posted in Domoticz
      dbemowsk
      dbemowsk
    • Driveway motion light

      So my latest project has been to replace an X-10 FloodCam (VT38A) motion sensor light controller with a MySensorized controller. I had been having some problems with the light getting stuck on for very long periods of time. The other issue was that this, like a lot of my other X-10 modules, I couldn't get a status reading from it, which was annoying. It had a built in camera which was wireless, but you needed an X-10 receiver to use it, and where I had my equipment, the picture was crappy at best.

      I had some relay modules that were given to me by a friend, so I thought I would use one on this node. The node has 3 parts, the motion sensor, an LDR sensor, and the relay module. The concept is simple. The LDR is used to detect dusk/dawn to only allow the motion to turn on the relay/light when it is dark outside. I had a project box that I bought a while back for another project that I never used, so I figured this was the perfect project for it, but the trick was making everything fit.

      The relay module was a 12 volt module, so I needed a 12 volt supply. I opted for the HiLink HLK-PM12. On the 5 volt pro mini that I was using, the regulator would get quite hot with 12 volts on the RAW input, so I decided to use a second regulator (LM7808) to drop the RAW voltage from 12 to 8 volts. It meant that I was regulating the voltage twice, but it worked well.

      I took the old mounting tube off of the old floodcam and used it on the new setup. That now lets me swivel and point the sensor box to wherever I need it. It also lets me run my 120 volt power wires into the light assembly. The power wires are:

      • Black - Hot
      • White - Neutral
      • Blue - Switched hot for lights

      One other thing that can't be seen in the pics is that I put hot glue over most of the screws and nuts that were coming out of the plastic case. I did this to help prevent them from getting wet and rusting. I did this at the last minute before I installed it which is why it can't be seen in the pics.

      Here are some pics of the setup.
      BoardsPartially assembledClosed assemblyFull assembly

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: Your workshop :)

      Still need to do some setup and sorting of things, but here are some pics of my newly remodeled workshop area.
      0_1524016993863_1a09cf98-8ebf-490f-a7e2-7a10530d3313-image.png
      0_1524017006148_3ab1bd48-9155-4a51-a18b-947c280681b7-image.png
      0_1524017053672_60ffb747-570b-4b77-b440-16025b9ca1cd-image.png
      I really need to get rid of that old Leader analog scope and get myself a DSO. It is a conversation piece though. I have it connected to my old heathkit square/sine wave audio function generator. Does anyone have a recommendation on a cheaper DSO that would be good for microcontroller work?

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      Finally finished my 2.2.0 gateway and have it mounted in the new enclosure. It appears to be talking to my 2.0.0 sensors just fine.!
      0_1525234938553_567ab940-cceb-4167-8ed1-bb8038ab854a-image.png

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      Though not MySensors related, I thought I'd post my latest build that has been consuming a lot of my time lately. This is the main reason I haven't been on the forum much lately. I bought a drone kit recently. Here are some pics from the initial assembly:
      0_1529865599257_6cb603d6-6e77-4f65-98b2-32cbd703de6e-image.png
      0_1529865626778_5bb010ca-c35a-439f-9692-920fbdfcda7d-image.png
      0_1529865650762_bb4e8b1d-dffb-49a9-8769-74567b7cd332-image.png

      Since the initial build I have flown it and from a hard landing broken one of the cheap plastic legs that it came with. I designed a replacement with my 3D printer and some 1/4 inch aluminum rod.
      0_1529865823787_21b6acc1-aa67-49ed-9c48-ab10d691b0c5-image.png
      0_1529865845366_4cde4d44-e6d0-4dc7-894a-77c38d0f958e-image.png

      Here are some pics at it's current stage. I have designed and printed some prop guards and a few other add-ons:
      0_1529866240417_f94e6de8-d3cc-4b8e-8c41-80f8b9dce60d-image.png
      0_1529866316628_d7cdb2a3-b4ee-4632-8c84-9f97f656daa3-image.png
      0_1529866388984_33f28a28-a295-4375-ab92-048a259f8efa-image.png

      I have also designed and built a small servo based 3 axis camera gimbal. The controller was built using one of my spare 5 volt pro minis and an MPU-6050 accelerometer. Still working on the parts that will attach it to the drone, and I still need to pick up an FPV camera to attach to it, but a simple FPV cam is cheap.
      0_1529866448927_8a3084ed-1e2f-49ac-a1f8-797ac13bec1c-image.png
      0_1529866856366_8e332d29-99f0-4dd4-bf3f-7ade3bc3dbd8-image.png
      0_1529866891384_bcf7406a-5e68-4ad6-95aa-cf3324f2cb9a-image.png

      posted in General Discussion
      dbemowsk
      dbemowsk
    • MySensors weather station

      So after getting my 3D printer I was thinking of all the MySensors projects that I could build with it. One of the things that I had looked at previously was setting up a weather station for my setup. The problem was that I would have had to buy some commercial weather station hardware and try to convert it to work with MySensors. The hardware alone for these was a bit expensive, not to mention the work it would take to convert it.

      Having a 3D printer now has opened new doors for this project. I started working on designs for the parts to this and have some good progress. I still need to work out some of the electronics, but that will come in time as I get parts built.

      One of the first things was designing a tipping bucket rain gauge which I have some posts on in a topic under hardware in the forum. I still need to print some parts for this. Started printing some things and ran out of white filament. Just got my new roll in the other day, so I will most likely start these in the next couple days.

      No weather station is complete without wind speed and wind direction sensors, so that's what I decided to embark on next. Since I had to wait for my new roll of filament, I decided to work on some of the design. Here is the proposed design that I came up with:
      0_1492579442253_upload-9d6f2c2d-b14f-4e01-aa55-2676b8a767a0
      This design is loosely based off of some setups that I saw when doing some google image searches. I started with the anemometer cups. I found an OpenSCAD design for these on thingiverse http://www.thingiverse.com/thing:34644 and used that as my starting point. I designed all of the other parts around this. So the only part of this that I can say is not truly my design is that. There are 12 parts total that I printed for this:

      • 3 anemometer cups with arms
      • Central cylinder that the cups mount to
      • Bottom case with square mounting peg that holds the anemometer sensor
      • wind speed rotor that holds the magnet for the sensor
      • Top case that holds the wind direction vane
      • The wind direction cap
      • 2 wind vane arms to hold the tail fin and the nose cone
      • The tail fin
      • The nose cone
        One last part that I have not designed yet which will be pretty simple is the internal wind direction rotor that will hold the magnet for the direction sensor.

      Here are some pics of the finished parts:

      Wind direction vane inside showing 1 inch roller bearing
      0_1492580928347_upload-e9276313-c9ee-4021-82f3-0f2b47e71763

      Anemometer inside showing the mounted rotor.
      0_1492581218664_upload-12a03fee-2522-449a-a4e3-8f32a3575725

      The full assembly
      0_1492581353570_upload-83e77ae4-8c44-4276-8ecb-eef6b5b55eb7

      For the screw posts to hold the cap and base together, I took some stainless circuit board mounting posts similar to the ones below that I had in my parts bin and use my soldering iron to melt them into the holes. My guess is that the melted plastic took a good hold of the threaded end, so I doubt they are coming out.
      0_1492581503247_upload-99e1007c-c652-4aa9-acf5-2a99d761c30a

      All in all, the project is coming together nicely. Once I get a few more pieces together, I will post all of this on my thingiverse page and give the link to the group. I will post further details on this as I get things done. I always welcome comments and suggestion to my designs, so if you have any, feel free to post them here.

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: Logo

      First attempt playing with the logo. I did a manual filament change from yellow to blue. Didn't have any black PLA, only ABS, otherwise I would have used black. This is more of a lithophane style which didn't do the best, but is still okay. I want to try to figure this out using paths in inkscape and exporting them to OpenSCAD. Having some trouble with that though. I'll figure it out in time.

      The picture is next to a soda can so you can get an idea of the size.
      0_1518854620201_a241d8c1-cfe2-48f9-89c3-50dbe1c7d346-image.png

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      So I have uploaded the 3D design files for my MySensors gateway case to thingiverse for anyone that is interested.
      https://www.thingiverse.com/thing:2904969
      I have included the OpenSCAD file used to generate the .stl files. I would be interested in seeing posts of other makes or remixes of the design.
      0_1526002262637_67192e23-fb8e-466b-94f5-fcd97b18d713-image.png
      0_1526002292130_7b6ba83e-5139-4e4a-9e80-711f9522b90d-image.png
      0_1526002312195_131bcc11-a1ab-4c59-874a-6399fd4fe029-image.png

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: Merry X-mas and Happy New 2018

      Thanks to the core team for a great platform and all the work that you have done, and Merry Christmas to all on the forum.

      posted in Announcements
      dbemowsk
      dbemowsk
    • MOWBOT: Resurecting a 15 year old project

      So in the early 2000's, 2002 2003 somewhere in there, I had started working on an idea for making a robotic lawn mower. I had worked on the project for a few years and kept having recurring problems with the electronics. The project ended up getting put in storage for around 15 years. I saw it rusting away in my basement and said, "I really need to bring that back to life."

      THE ORIGINAL DESIGN

      All the major hardware was designed by me. The main frame is a custom welded steel frame. The main deck was fabricated from a piece of acrylic that I had gotten from someone who had used it originally for a science fair computer display. The blade motor carriage was designed to fit at 3 different levels for different blade cut heights.

      For the electronics, I had started using an old robotics micro-controller called OOPic. With it, I had a dual H bridge motor controller to give it differential steering. The front and rear both had custom bent aluminum bumpers which could detect directional contact with the use of micro-switches around the edge. I had side looking IR distance sensors for short range side sensing, with a front mounted ultrasonic distance sensor for longer range of vision.

      I had gotten so far as to start designing an outer shell for it that I was going to make out of fiberglass. In some of the pics you will see the styrofoam shell mold I had started building.

      AFTER PULLING IT OUT OF STORAGE

      I didn't have it covered or protected, so in the time it has been in storage, the frame has rusted, motors and electronics are corroded, deck is dirty, the front of the acrylic platform broke off and the front part broke in two pieces. WHEW, that was a mouthful. Looking at this picture, you can see that it is in rough shape. This is before any cleanup work so I have a before and after view when it is done.
      0_1508737895580_upload-ed294247-a598-4800-b6ab-d36bd1643abc
      I edited that picture in gimp to give an idea of what the full deck somewhat looked like.
      0_1508738055664_upload-ae4e0874-9796-4355-b8a9-710cf816314d

      THE GOAL

      The end goal of the whole thing is to hopefully get this thing operational. I would like to MySensorize some parts of it, though I haven't thought out exactly what parts yet. First thing is going to be to take it all apart, clean all of the parts, and then start rebuilding. I need to re-figure all of the electronics. I figure I can get better vision and control with newer and cheaper electronics.

      Here are a few more teaser images.
      0_1508739333705_upload-709a3839-c39d-4c9e-9a60-85015889469e
      0_1508739404916_upload-31cff1a6-26cb-4a91-9a9f-74404fe200e0

      I actually have 17 pics of this, so instead of posting them all here, I put them in an image gallery on my website.
      https://dan.bemowski.info/image-gallery/nggallery/robotics/Mowbot

      This is probably going to be a long drawn out project, and I don't know at what intervals I'll post progress, but I will post progress at some points.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      Here are a few more pictures of the new layout with the new anemometer cups.
      0_1499087266284_upload-2b958d54-e3bb-4ae1-9ba4-815bc9ac5f88
      0_1499087278053_upload-dec6c2b6-ee03-4891-9f89-161246ed722f
      0_1499087288381_upload-164b9af0-fe6c-4ebf-ab25-e675e10c41d7

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • My new website

      Just figured I'd give a plug for my newly converted website. The old site and CMS that ran it were out of date. I have converted to WordPress and hope to put information and tutorials related to my automation stuff and other things. I like the new look and feel of the site. Give it a look.

      http://dan.bemowski.info/

      posted in General Discussion
      dbemowsk
      dbemowsk
    • Questions for a thermostat project.

      So this project at this point in time is not a MySensors based project, but I may make it into one in the future and use one for my home. That said,

      MY PROJECT

      My project is a digital thermostat using an arduino uno and a 3.2 inch touch screen TFT shield. This thermostat is going to replace the thermostat in my RV.
      One difference from an RV thermostat to a normal house thermostat is that the house system typically runs on 24 volts AC whereas the RV runs on 12 volts DC. My original plan was to use the incoming 12 volts to power the uno. The specs for the UNO say that you can put up to 12 volts in the barrel jack. The only problem I have with this is that the linear regulator that the UNO has gets quite hot when running it from 12 volts. This heat will no doubt affect the temp sensor that reads the open air temp. I need to find a reasonably small way to regulate 12 volts to 5 volts without a lot of heat.

      MY DESIGN:

      And now a bit about my design. I have most of this built and my firmware is nearly ready. I am designing it as an auto changover setup with a relay for fan speed (low or high). Here is the board setup that I have.
      thermostat setup
      The area of the board marked in yellow will be where the screw terminals will go for connecting it to the system. The 3 relays are heat, cool and fan. I was originally going to use 5 volt relays supplied from the 5 volt pin on the arduino. I found out that when two relays would trigger, the UNO would reset. I tried adding a capacitor to the power line near the relays, but that didn't help. I am changing the relays to 12 volt relays so I can just use the incoming 12 volts to power them. I am triggering them with NPN transistors connected to 3 digital pins.

      Here are a few more pics of the setup. I have designed and 3D printed a case for this also.
      boards mounted in case
      This is with the TFT shield in place.
      case with TFT shield
      And this is with the cover in place. The cover needs a little bit of cleanup work, but otherwise not too bad.
      alt text

      MY FIRMWARE

      And now a look at the firmware. The first image is the main screen. The main screen shows the current temp with the HVAC, fan status and set point on the right side of the screen.
      main screen
      The main screen has two touch areas, the gear in the upper left corner and the set point box. Touching the gear icon gets you to the settings page, seen here.
      settings screen
      When you touch to change any setting, it is stored in the EEPROM on the UNO allowing it to recover on the same settings if it were to loose power. Most of the settings are pretty self explanatory except for the threshold and changeover settings.

      The threshold value is either added or subtracted from the set point to offset when the heater or AC is switched on to know if it should have the fan on high or low. if the temp is with the threshold value of the setpoint, the fan is set to low, otherwise set it to high. On the RV, this just sets the fan to low or high. On a house multi-stage HVAC system it could switch stages.

      The changeover value tells the system how many degrees the temperature must go up or down from the setpoint before the system changes over from heating to cooling or vice versa.

      Clicking Exit at the bottom will take you back to the main screen.

      On the main screen, clicking anywhere in the box that shows the set point temp will take you to the setpoint screen.
      set point screen
      This screen is self explanatory in its function. The up and down arrows let you set a new setpoint, and Exit at the bottom will take you back to the main screen. The setpoint value is also saved to EEPROM on any change in value.

      posted in My Project
      dbemowsk
      dbemowsk
    • Desktop 8 button scene controller

      So recently I had to change over one of my last remaining rooms that had X10 hardware over to MySensors. This happened to be our master bedroom which I had been using a couple of these X10 tabletop controllers:
      0_1546675522046_61a180c1-14e6-46df-99b4-05e84cc5890f-image.png
      My wife loved the fact that she had control of the light and ceiling fan right next to the bed. When I switched over to MySensors control of the room with my Vera controller, I was no longer able to use the old X10 controller. I had thought of gutting the controller and rebuilding the electronics, but that seemed like more work than designing my own controller. I started mocking up a design in OpenSCAD and here is what I came up with.

      This is the full mocked view showing the 8 buttons.
      0_1546674026628_512d5a30-2da7-4566-9f4b-0020254e5d0e-image.png

      This is with the cover off and the mock of the Easy Newbie Board by @sundberg84 in place to see how it would fit. The hole in the back of the case is for a DC power cable. I figured rather than have to design in a power supply, I figured I would just use a 5 volt wall wart power supply.
      0_1546674229935_36e80dd8-2eab-4b2a-912f-5d1728ab84f9-image.png

      I had a couple of these laying around, so this will be my DC in jack. wired through the small hole in the back directly to the raw in to the Easy Newbie board.
      0_1546674893401_91f4cdc0-755e-495c-ad90-4b3d89db33d4-image.png

      This is the underside of the top cover showing the mock up of the 40 x 60mm proto-board with switches mounted to it, again to size up the fit.
      0_1546675142295_12b1df22-154e-4737-ba2a-61744f6c0e1f-image.png

      I currently have the first revision of the case on the printer. I may at some point add an OLED or LCD display to a future revision for feedback, but for now just to see if the idea is sound, I am keeping it as simple as possible.

      Once I get this finished and know it works I will post it to thingiverse. If anyone had comments or questions, feel free to post them here.

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      So for some time now I have been working on a conversion to my 3D printer to allow me to change between different tool heads easily, thus increasing the versatility of the machine. To jump right in and give a little background on the mod, I have a plate that mounts to my X carriage that has 4 10mm neodymium magnets in it. These magnets hold the tool in place that will be used which also has 4 magnets in it's mounting plate.0_1549168718079_Resized_20181230_084440_8356-2.jpg
      0_1549168740823_Resized_20181230_084411_8868-2.jpg
      The first tool that I did was my 3D printer head. I obviously did that one first because I would need that to make future parts and tool heads to expand the machine. Here is my 3D printer head mounted to the working assembly.
      0_1549169544562_Resized_20190118_013816_2670.jpg
      Another tool head that I made for this is my simple pen plotter tool for drawing.
      0_1549169817834_Resized_20190202_225547_6180.jpg
      Here is a sample of something I did with the pen plotter using fine point sharpie markers. The left is the original image, and the right was done with the plotter.
      0_1549170644769_0f86124a-cf32-4e8a-a078-f2e4870df5a3-image.png
      The most recent tool head that I did was my laser engraver tool. This tool is the main reason for this post. This is the 6 watt laser module mounted to the carriage.
      0_1549170198674_Resized_20190202_230033_4069.jpg
      So what I am looking to do with this on the MySensors end of things is to build some sort of flame sensor that can monitor the engraving operation to indicate a small fire and take some sort of action, and also report it to my vera controller. Exactly what action I would have it take I have not figured out yet. If anyone has suggestions I'm all ears. I was thinking of something that could easily extinguish the small flame. As for the flame sensor, I know they make these small flame sensor modules, but I don't know how reliable they are, ore even how they work.
      0_1549171496732_6c6a2026-c4f2-408a-83a5-745076ec537d-image.png

      For anyone interested, here is a sample engraving on a piece of thin plywood. The left image is the original. The center is at a low resolution, and the right one was at a high resolution.
      0_1549172116707_f5a6f311-a35e-4363-8e9d-e4c3cb6460a6-image.png
      One other thing that I want to test with this is I've seen people that make circuit boards with these. They spray a layer or two of paint on their blank copper clad and then laser etch their pattern on the painted surface. Then they run it through their ferric chloride or other etching solution. Finally, sand off the layer of paint.

      Any suggestions or help people can give is greatly appreciated. Thanks for viewing.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: S_HVAC in domoticz

      @diamantmatch said:

      i guess this means that V_HVAC_FLOW_STATE and V_HVAC_SPEED are not implemented in domoticz yet?

      If you read through this post that I have out there for the RS485 bridge that I am working on for my RCS thermostat, there is some information regarding this in there. Regarding your comment directly, @pjr stated that V_HVAC_FLOW_STATE, V_HVAC_FLOW_MODE and V_HVAC_SPEED are not implemented in Domoticz yet.

      There is some other useful information in that post if you are looking to do something with your thermostat. My RS485 bridge is still a work in progress, but I had to put it on hold for a while as I am a beta tester for a different thermostat, so I currently have my RCS thermostat disconnected. I think it is worth it though to post to the Domoticz community that this would be a useful implementation.

      posted in Domoticz
      dbemowsk
      dbemowsk
    • RE: UI5 Mysensors library 2.0 gateway issues

      So it appears that the saga has been solved. The problem in fact WAS with the FTDI adapter. In all of the testing that I did I am guessing that the FTDI's receive data was working, but the transmit data was the issue. I put my spare FTDI on and Vera was detecting devices left and right. I think I am going to have to redo the inclusion because it said that there were 5 devices found, but nothing was added to Vera, but like I say, the devices did not appear to be presenting at the time.

      I want to say though that I appreciate all the time that people spent trying to help me get this going. This forum is a GREAT crowd of people.

      posted in Vera
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      Working on a smart clock project. Need to make some major code modifications to the example, but should work. I have a test sketch that just passes the time from the RTC to the display, so I know that is all working.

      0_1509332623272_upload-b119edce-2231-4ce0-9b9c-c5bd4ca629d5
      0_1509332689597_upload-2dbe753a-35af-4793-bf46-52669aed4bb0
      0_1509332950856_upload-a1744ea1-3830-4cf6-816b-f273431a596b

      posted in General Discussion
      dbemowsk
      dbemowsk
    • US decora style wall switch

      So I am trying to design a wall switch that will work similar to the older 4 (8) button X10 XPT switches that I have in some places in my house. For those that don't know what these switches are like, here is a pic.
      alt textalt text
      I have also seen other switches out there that have an LED next to to each button such as in the second pic. Much like the XPT switches, the buttons on these will just transmit back to the MySensors gateway or possibly directly to another relay or dimmer node.

      Design:
      So here are my thoughts on how the design of the switch would be. The faceplate would be made from a decora style blank such as one of these:alt text
      The design would be something like this:
      alt text
      I am thinking that this could be laser engraved onto the decora blank. The switches would be laid out like this on the top pcb so as to have a switch under each engraved tab:
      alt text
      I tested a couple switches on a protoboard and when the board sits on the back of the blank plate, the caps of the buttons gently rest on the back of the wall plate. The laser engraved areas on the front should flex just enough to hit the buttons underneath. The LEDs next to each row will just be a simple on/off status LED.

      Wiring:
      The wiring should fit for all of the components if my calculation is correct. Six data lines are needed for the switches (4 rows and 2 columns), and 4 lines for the status LEDs. After wiring the radio to the node there are data lines 3 through 8, and analog lines A0 through A3. The analog lines would be used for the LEDs as there are 4 of them. The 6 digital lines would be used for the push buttons. The wiring for the switch board would look something like this:
      alt text
      The LEDs would be 1.8mm LEDs like these:
      1.8mm LEDs

      Connecting the controller:
      What has been shown so far has just been the switch board. The idea is that the switch board would stack on to the controller board with one or two header connectors. The controller board would use a PCB the same size as the switch board. There is plenty of room on the second board to put the nano and the nRF radio along with the 3.3v regulator.

      Power
      My next hurdle in this is figuring out power. I am thinking of using another board stacked on to the assembly and using one of these AC/DC converter.

      Design advantages
      Here are some key advantages to this design.

      • The 3 board design makes it modular. You basically have your power supply board, your processor board, and your switch board. This makes switching parts that may fail easier.
      • With the front switch panel being a plug in module, other switch configurations can be created to change the functionality. This does not have to be only for switches, as you could build other sensors or indicators that could fit a standard decora style wall plate.
      • If status LEDs are not used that would open up 4 more lines for more switches or other sensors.

      Conclusion
      So far these are all just ideas. I am open to comments and criticisms on any thoughts or ideas that I have noted. Any ideas on where I can get some of the parts done at like the laser cutting and possibly a good PCB manufacturer, that would all help too. I haven't looked yet, but I am assuming that there is a matrix switch assembly sketch out there somewhere that I could use as an example.

      I will post more as this project moves on.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      @Yveaux You can NEVER forget the WAF. Luckily, my wife is to the point of just asking, "so what are you building now".

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      So I have all of the keys soldered in and wired. I did some simple tests to see how things were working. I tested with a font size of 2, and again with a font size of 4.

      Font size 2.
      OLED keypad test #1 – 00:27
      — Dan Bemowski

      Font size 4
      OLED keypad test #2 – 00:27
      — Dan Bemowski

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: US decora style wall switch

      So here is my latest update. I now have the controller board made that the switch board will stack on to. It currently uses all analog and digital pins of the pro mini except pins A4, A5, A6 and A7 which are not in the standard header rows. This is the board as it is right now.
      0_1484724472906_upload-0f59998c-25dc-47e2-b3ca-7213ae13c44d

      And this is the controller board stacked with the switch board.
      0_1484724556313_upload-284b133f-0a5a-4c24-bdc9-f4c133784b1f

      I wrote a simple sketch to test the keypad which is just a 2x4 matrix. One thing that I realized that I forgot which I will fix in the next couple days is the current limiting resistors for the 4 LEDs.

      For testing until I figure out the design of the power supply board, I am just powering this using the supply from my UNO as it has both the 3.3 and 5 volt outputs.

      My plan for now is to use each row as an OFF and an ON button with a corresponding status LED, but the possibilities for this are much greater. This could be used as a controller for 8 individual scenes, bright/dim controls, or whatever you can think of. This could be used to talk directly to other nodes for lighting control or any number of things. You could build other switch boards for this that would maybe contain more switches (eliminating the LEDs of course), or any number of combinations of switches and sensors.

      The final setup is going to be quite bulky and will need a deep US wall box to fit everything, and even that might be tight. For now this is a proof of concept design to test the feasibility of this as a controller. Eventually if things work out, I may seek help from the forum to create a dedicated PCB for this which could be stacked into a smaller package.

      I welcome any thoughts, comments and feedback on this design.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      Well, the part finally finished. Roughly 46 hours. Overall, I think it will work good. It was a bit of a job clearing out all of the support material though.
      0_1498016481853_upload-8d7bd6b4-81c8-47d1-b5ea-634de160c85f

      The bottom turned out well.
      0_1498016713961_upload-c8b84df7-4dee-468d-baeb-ac2c8d91188b

      The first few layers had some issues, but really nothing that will defeat it's purpose. Had me worried for a short time though, but I gave it the benefit of the doubt.
      0_1498016851444_upload-f03e5ee9-a10f-498c-93dd-0d5985544c58

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      Today's progress on the new switch consists of finishing the basic 3D model of the wall switch plate and working on some of the programming.

      For the wall plate design I do not have buttons as of yet, but the main part of the wall plate turned out good. I did the initial print in yellow because I am out of white at the moment. I am still trying to figure out the best way of printing it. In the video, you will see that the tabs are looking a bit rough. That is because I printed this one face down with supports for the tabs. If I decide to print them that way, it won't be bad because the tabs will be hidden under the wall plate cover. I will try printing them both ways to see which comes out better.

      For the programming, I created a couple bitmap icons and did a sample of those icons animated on the screen. The animations toggle back and forth and each runs for about 10 seconds. One bitmap is a rain drop, and the other is a snow flake. The idea is to use these to display weather conditions. I will probably design some clouds and a sun as well and have 4 possible animated weather displays.
      raindrops and snowflakes – 00:31
      — Dan Bemowski

      posted in General Discussion
      dbemowsk
      dbemowsk
    • Hacking a remote control Hunter ceiling fan controller

      So a while back I got a used Hunter ceiling fan controller with a remote from a friend. It has 3 fan speeds as well as a line for a light. The remote runs on 350 MHz and I have been trying for a while to figure out a way to MySensorize it. I decided to dig it out again today and take another look. Here is a pic of the main controller:
      0_1485752967713_upload-33ce6c75-df62-44db-a6ae-cd703ac91896 0_1485754229270_upload-7a9a9b1f-b2d3-4e9e-ad41-650753165985
      After popping the cover on the unit, one of the first things I noticed was the radio receiver daughter board which has 4 connections that go to the main board (VSS1, VSS2, P3 and DATA):
      0_1485753241827_upload-a8c2bb4e-ba47-43a4-a943-b74befbadd27
      I then decided to look inside the remote. The remote runs on a Holtek HT-12E chip which I found out is a remote control encoder chip which I believe is what the E stands for.
      0_1485753938806_upload-e87808d9-5cfd-4148-a4ed-a9ca9ea39456
      I looked up the data sheet for the chip and it seems pretty straight forward as far as how to run the chip. It looks like the buttons on the remote connect to the data lines of the chip and pull the lines low. I am thinking that I can get one of these chips and interface it with a pro mini fairly easy. I should just be able to wire the output of the chip to the DATA line from the radio on the controller. I could take it a step further and also get an HT-12D chip which is the decoder and wire that also to the data line. This way I could still have use of the remote and be able to receive commands from the remote to report back to my Vera controller on the MySensors end. The main controller apparently uses a chip-on-board version of the HT-12D chip that is under a black epoxy dot on the main board, so it is not easy to interface to it which is why I figure I'd need to get the decoder chip. I can get 2 sets of these from ebay fairly cheap: http://www.ebay.com/itm/2Pair-4pcs-Hotek-HT12D-HT12E-DIP-18-IC-Remote-Decoder-Encoder-/272410557408?hash=item3f6cef3be0:g:cAQAAOSw-CpX~hgD

      If I can get this all working, and, if I can get more of these, I can use these in all of my ceiling fans. I'll keep the board posted on the progress as I make headway. I'll order the chips today, but coming from China may take a while.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      So, for the latest addition to my weather station, I decided to make a radiation shield to house a DHT22 temp and humidity sensor. I figured that I would also need a place to put the arduino to be used as a connection hub for everything and I figured this would be as good a place as any. This is my design for it:
      0_1498978951186_upload-fc2eb2a2-f4be-4e60-b58f-d8acacfde543

      The under side of the base is where the electronics will be mounted. I have designed the standoffs to mount an easy newbie board. and should have plenty of room for wire connections as these will be fairly basic.
      0_1498979383692_upload-f73c8994-4742-42f0-b710-6d097e4e3fbc

      In the event that water should get inside of the unit due to wind or other factors, I have designed the bottom cover with a tapered center going to a drain hole.
      0_1498979569506_upload-bba6491f-732a-4a60-bc61-897dc90f2f70

      I have the radiation shield and rain gauge partially assembled for now for programming and testing. I will get some better pictures of that tomorrow and post them to the thread.

      One other change that I decided on was for the wind direction sensor. Since I had a bit of trouble with the other designs that I tested using reed switches and IR phototransistors, I decided to try an AS5047P magnetic direction sensor. I ordered this one off of ebay. It was a bit expensive at $16 US plus $3.39 for shipping, but the person selling it mentioned that it comes with an extra chip. These sell on Digikey for $17 plus $7 and change for shipping, and the chips alone sell for around $9, so I didn't think it was that bad of a deal. I should have that later this week.
      0_1498980091138_upload-31626253-dcaf-4ca5-b68e-f4d11c479f05

      Once I get this assembled I think the last thing will be to figure out all of the programming, which I have a bit of a start on using the rain gauge code from the build section of the site. I have been researching the code for the anemometer, and that may take a bit of planning with everything else that I have running, but I think it can be done. With the new direction sensor module, that should be pretty straight forward as far as connection and code, I just need to decide if I want to connect it with SPI or straight analog. I am thinking though that this project is nearing completion. It was a bit of a learning curve building all of the parts, but I think it was a good journey.

      As mentioned, I'll post more pics tomorrow.

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      So I now have 4 weather animations designed. Rain, snow, sunny and cloudy. The idea for now is to have the screen switch between 4 screens. Indoor temp, outdoor temp, current weather animation and current time read from my Vera controller. Here is a sample of my 4 weather animations.
      Weather animation tests – 00:51
      — Dan Bemowski

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: US decora style wall switch

      Just an update on this. I gave the wall switch another spin on the design. I made a version of this with nice rocker switches. I think this design looks a bit more professional.
      0_1490417693163_upload-0ee6eb29-3f96-46ab-a046-7a6b227a5ce8
      Because of having the rocker switches I have added one more piece to the design which is a rocker support for the switches to prevent both the on and off buttons for a switch to be activated simultaneously.
      0_1490417962877_decora_rocker_switch_openscad_parts_view.png
      Here is a view of the prototype with the rocker support in place.
      0_1490418038867_PCB_layout_top_view_support_installed.jpg

      The LEDs that I currently have installed are 3mm white LEDs. I went with 10k resistors on them so as not to make them too bright since at full brightness these can be a bit blinding. I chose those because they are what I had available in my parts bin. Red or green LEDs might be a better fit for this. Choose a resistor value that gives whatever LEDs you choose suitable brightness as this can vary between LEDs.

      For anyone interested I posted the 3D design files on thingiverse. Everything you need to make this switch board is posted there.
      http://www.thingiverse.com/thing:2202434

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      Here are a couple pics of my first prototype mounting layout of the sensors. I may still use some elbows and get the anemometer and wind direction vane moved a bit higher than the other sensors. My fear is that with all of the sensors sitting on the same plane, wind passing by the other sensor housings may affect the readings of these. The main one I am concerned with is the rain sensor. This is a minor obstacle that can be fixed with two PVC elbows.
      0_1499028515008_upload-d23be907-c68e-4994-863c-4f73824bb0ba0_1499028531031_upload-1b3c57ac-913d-4ddd-aa07-2552f9f2e78e

      Another thing, I was thinking about the batteries that I want to use with this and I noticed that I have had the 4 - AA battery pack on for a few days now and they are still running. If I put together a pack of 2 18650 batteries, I should be good. Those batteries run at 3.7 volts, so 2 of them should give my 7.4 volts which should be no problem on the RAW input of the pro mini. My only worry with these would be overcharging them. Being that these are lithium ion batteries, they can be dangerous if overcharged. Just need to find a decent solar charging circuit for them. I am open for suggestions if anyone has any.

      I hope within the next week I can have all of the OpenSCAD files cleaned up and posted on thingiverse. I wanted to post some of them a while back, but ended up making a few minor tweaks.

      Enjoy...

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      So for a few days now I have been working on my idea for a homebrew CNC machine made from mostly salvaged parts. This weekend I made some good progress getting the Y axis drive assembly mostly done. I have not tested anything yet, but I hope to in the next few days. Anyways, here is what I have...

      The stepper motor is one salvaged from an old dot matrix printer. The gear on it was press fit on the shaft with no real way to get it off, so I opted to make a geared drive assembly. I realize that this will slow the Y axis down, but it should also give it a bit more precision. Below is the stepper motor.
      0_1517204931227_b940ccdf-0d30-4a67-bfe2-071e6eec469a-image.png

      For mounting it, I designed this adapter plate which carries a steel roller bearing for the screw shaft.
      0_1517205082429_fe119ca7-5e6d-48b2-bc48-ba86a09ed33c-image.png

      This is an early mounting plate design before I added the upper and lower mounting tabs. This shows the gear with the shaft attached. The gear was made using an OpenSCAD gear library.
      0_1517205252644_2d35f97c-b9b9-482c-b811-f7562f164049-image.png

      Yesterday I designed the bracket that attaches to and drives the Y axis platter/build plate (Sorry, forgot to take a decent pic of that part).
      0_1517205734481_60ec4f33-b3c8-4ead-83cd-ca103751669d-image.png

      Today I was able to finish the front and rear frame braces and got parts rough fitted together. the 2 rails with the small white linear bearings are some rods that were salvaged from a couple old scanners. These were used as the rail for the scanner head. I have pics of the full assembly as well as the motor assembly mounted on the rear brace.
      0_1517205974794_758e9eae-82f2-462d-968a-17ea5ca0307e-image.png 0_1517205984333_5e431750-c309-480c-98a4-5475945bd9a6-image.png

      I can't say how well the design will work, if at all, but it has been a fun journey so far trying.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: US decora style wall switch

      So, one of my big days is here. My first ever fabricated PCBs that I designed are here. A slight change in the switch board from what's shown above, I did a design of one that used through hole components instead of the SMT components shown above. Really the only thing that I did as SMT in the above design were the LEDs and resistors, the switches were still through hole. Anyways, are some pics of the top and bottom sides of the finished product.
      0_1496872600633_upload-185bf16e-c44f-43c9-b67f-87f633cb9943
      0_1496872607779_upload-460c8e0e-3045-4cae-94d4-19f5cd5cc742
      I designed them and ordered them through the EasyEDA website. I got 5 each of the boards, so 15 total, for $24.63 plus $18.41 for DHL shipping to the US which comes out to $2.87 per board. For a small test run, I thought that wasn't too bad.

      Tonight I plan to assemble one of the switches to see about how long it takes. I also received my new batch of thermal fuses needed for the new boards, so I should have everything I need. Once done, I will do another post showing a finished and assembled switch.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: HC-SR501 on batteries

      @dbemowsk Printed with Wood PLA.
      0_1509241596097_upload-5157a48d-0efe-4071-8ea3-15f52ee4621f
      0_1509241619596_upload-71d2537f-8eb9-4694-81cf-b9183eda8108

      posted in Hardware
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      Working on setting up a new work bench in my back room in my basement where my HA equipment rack is. I wanted to build a case for my serial nRF24L01-PA-LNA gateway built on a rev8 Easy Newbie board. I just had the board sitting on a shelf on my rack, and now I want to mount it on my MDF board with all of my other equipment. Here is the design that I came up with for the case.
      0_1523766811586_6c9ecee9-2040-43ef-a6ee-29fe5c21f0e1-image.png

      This is the inside bottom of the case:
      0_1523768012922_fe041e3f-d5a2-4b98-a29d-39c4d6d38e75-image.png

      And here is inside the top of the case:
      0_1523768171460_d2faabd3-4762-4ca4-a161-b42d2a5cf5e9-image.png

      It has a spot for 3 - 5mm LEDs for the transmit, receive and error lights. There is a hole on the right side of the case for the PA-LNA antenna connector. The oval hole on the lower right side of the case is for the DC in jack. I had one of these in my parts bin:
      0_1523767172381_9e6f475c-0442-4e9d-9434-ddfd85377ea4-image.png
      The hole on the bottom right is for the FTDI adapter connection. I am using one of these adapters that has a mini-USB connector:
      0_1523767301286_5a03d8e4-74c9-417a-b1dc-8cf143d575fc-image.png

      I have the case running on the printer now. I will post pics when it is done.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • DIY CNC mill from mainly salvaged and 3D printed parts

      So I have a couple posts in some other threads on this subject, but wanted to move it to it's own thread in the interest of not Hijacking one of the other threads.The other project with posts are the "What did you build today" and the "CNC PCB milling" posts.

      So as not to be too repetitive, I will not do a lengthy first post for this repeating what I said in other posts, but I will post some of the pics that I posted in the other threads so people can get a visual as they start to read this.
      0_1517783145836_f7c11e3f-5a0d-4623-a4aa-bcaec43ba6bb-image.png 0_1517783162627_f8049541-2a33-4336-9d45-dc05ce944c3f-image.png 0_1517783182634_ff92ad83-8ccf-490b-83dd-dddec5a3e86c-image.png 0_1517783214723_7a67953c-c7a3-46dd-a3bf-5f29aee56ac6-image.png 0_1517783191959_8837a4b7-18d8-4a94-8a52-b19f37184855-image.png

      I will have more to post here later tonight as I am in the process of 3D printing the bearing mounts for the platter. Once I have that done I will probably shoot a short video showing the current workings so far.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: DIY CNC mill from mainly salvaged and 3D printed parts

      @neverdie The one thing that I like about OpenScad is that it is structured like a programming language. This is how I call the module to make a gear:

         difference() {
              gear (number_of_teeth=78,
                          circular_pitch=90,
                          gear_thickness=2.5,
                          rim_thickness=4,
                          rim_width=4,
                          hub_thickness=9,
                          hub_diameter=16,
                          bore_diameter=7,
                          circles=8);
              translate([0, 19, 6]) {
                  rotate([90, 0, 0]) {
                      cylinder($fn=360, 38, d=3.15);
                  }
              }
              english_thread (diameter=5/16, threads_per_inch=18, length=0.4);
          }
      

      This produces a gear like this which even has the center part with the threads already on it so I can just thread it on to the Y axis rod.
      0_1517959204795_94362ae3-d0cc-4fdd-9e0d-970db77c07ec-image.png

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: Are folks here happy with Domoticz?

      I was using Domoticz before getting my Vera controller. It had some limitations, as most of them do, but overall I thought it was good. I think Domoticz has easier to use graphing than Vera. I am actually still trying to figure out data mining on the Vera.

      posted in Domoticz
      dbemowsk
      dbemowsk
    • RE: Choosing the right Controller

      I went with Domoticz. I also have the paid version of the Domoticz android app. I tried the lite version, but I wanted to try some stuff with geofencing which was only available with the paid version. One thing that I liked about Domoticz was that it had native support for Dallas 1-Wire. I already had a network of 1-Wire sensors around the house and that worked right off the bat. In looking at some of the other controllers, their support didn't seem to be as good for some of the hardware I already had. I chose Domoticz because it was free.

      There seems to be a lot of great support for Vera, but that is a hardware device that you must purchase ($149.95 US for the Vera Plus). Since my Raspberry Pi died I found a new board of similar size called an OrangePi PC. I picked it up for $17 US and it has been working well with Domoticz. It has a GPIO header that is pin compatible to the R-Pi. Haven't used it for much other than the serial port pins that I have my gateway connected to. The unit is like the R-Pi in that it boots from a micro-SD card, but I use an external hard drive as the main drive with the micro-SD pointing to it at boot. I did this to reduce the failure of the SD card from too many writes. I went through a few with my R-Pi even buying ones with wear leveling.

      Bottom line, you can get a pretty decent system running with a cheap computer board and Domoticz.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: Has anyone made their own lab power supply out of a PSU?

      I happen to be in the middle of making one right now. I have kind of been working on it slowly in between my weather sensor project. I am using an ATX supply that I pulled from an old computer to give me 12V, 5V and 3.3V, and then I plan on also having a variable supply. For the variable supply I am using a buck converter with a current and voltage meter. I will steal one of the 12 volt legs from the ATX supply to run the buck converter for the variable supply.

      Here is my 3D design for the unit.
      0_1494074261963_upload-5e3fb8da-13f1-4c21-bd35-20b51322da73

      I have the front panel printed, I just have to find the time to print the outer shell and the back panel. Here is what the front panel looks like with some of the components dry fitted.
      0_1494074505657_upload-ee43baef-40bc-4ca5-a7be-28a8c4d6557b

      This is the buck converter that I got from ebay and these are the multi-turn pots that I bought that I will use to replace the small on-board ones that are on the buck converter for voltage and current adjustment. The last thing is the voltage and current meter/display. This is the one that I bought on ebay.

      The most expensive parts were the multi-turn pots. I got mine $2 cheaper per pot than they have them listed for now. I had a hard time finding anything cheap that was panel mountable. As I said, this is a slow work in progress project that I think will be pretty useful once I get it done.

      posted in Hardware
      dbemowsk
      dbemowsk
    • RE: Automated garage door

      OK, so today I decided to take a small leap and run a test. I created a simple circuit with two LEDs that would trigger with two pushbutton switches. I created a sketch so that when either button was pressed the corresponding LED would turn on.

      /* sketch 1 
      turn on a LED when the button is pressed
      turn it off when the button is not pressed (or released)
      */
      int pinButton1 = 8; //the pin where we connect the button
      int LED1 = 2; //the pin we connect the LED
      int pinButton2 = 7; //the pin where we connect the button
      int LED2 = 9; //the pin we connect the LED
       
      void setup() {
        pinMode(pinButton1, INPUT); //set the button pin as INPUT
        pinMode(LED1, OUTPUT); //set the LED pin as OUTPUT
        pinMode(pinButton2, INPUT); //set the button pin as INPUT
        pinMode(LED2, OUTPUT); //set the LED pin as OUTPUT
      }
       
      void loop() {
        int stateButton1 = digitalRead(pinButton1); //read the state of the button
        if(stateButton1 == 1) { //if is pressed
           digitalWrite(LED1, HIGH); //write 1 or HIGH to led pin
        } else { //if not pressed
           digitalWrite(LED1, LOW);  //write 0 or low to led pin
        }
      
        int stateButton2 = digitalRead(pinButton2); //read the state of the button
        if(stateButton2 == 1) { //if is pressed
           digitalWrite(LED2, HIGH); //write 1 or HIGH to led pin
        } else { //if not pressed
           digitalWrite(LED2, LOW);  //write 0 or low to led pin
        }
      }
      
      

      I then disconnected the digital input lines 7 and 8 from the switches and connected them to points B and C in my original picture, and connected point A to ground. I ran the test and everything worked as expected. The only thing I might change would be to add a couple diodes to B and C coming into the arduino to help prevent any chance of backfeeding into the door opener circuit.

      The next step is to finalize the board and come up with a sketch. This will be my first MySensors node sketch, so I am sure I will be coming to the forum for help.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: Possible to change LED effects from controller/domoticz?

      What I did for my thermostat controller to set the thermostat mode (Off, Heat, Cool, Auto) was to create a dummy switch as a selector.
      alt text
      When creating a selector switch, you can create custom selector levels. This is where I would put your different pattern selections.
      selector switch
      On the MySensors side, create a child node using S_INFO and V_TEXT. In my case, I named that "Furnace Mode" on the domoticz side. This is just the device that will pass the information to your MySensors device to do the switching. I then use a lua script in Domoticz that looks like this:

      --
      -- Thermostat mode switch to MySensors
      --
      commandArray = {}
      
      --if (devicechanged['Thermostat Mode'] ~= nil and (devicechanged['Thermostat Mode'] ~= otherdevices['Furnace Mode'])) then
      --   commandArray['Furnace Mode'] = devicechanged['Thermostat Mode']
      --   print('Setting thermostat mode to ' .. devicechanged['Thermostat Mode'])
      --end
      
      --if (devicechanged['Furnace Mode'] ~= nil and (devicechanged['Furnace Mode'] ~= otherdevices['Thermostat Mode'])) then
      --   commandArray['Thermostat Mode'] = devicechanged['Furnace Mode']
      --   print('Setting furnace mode to ' .. devicechanged['Furnace Mode'])
      --end
      
      if (devicechanged['Thermostat Mode'] == 'Off') then
          ttidx = otherdevices_idx['Furnace Mode']
          -- print("Furnace Mode idx: " .. ttidx)
          commandArray['UpdateDevice'] = ttidx..'|0|O'
          print("Furnace Mode = O")
      elseif (devicechanged['Thermostat Mode'] == 'Heat') then
          ttidx = otherdevices_idx['Furnace Mode']
          -- print("Furnace Mode idx: " .. ttidx)
          commandArray['UpdateDevice'] = ttidx..'|0|H'
          print("Furnace Mode = H")
      elseif (devicechanged['Thermostat Mode'] == 'Cool') then
          ttidx = otherdevices_idx['Furnace Mode']
          -- print("Furnace Mode idx: " .. ttidx)
          commandArray['UpdateDevice'] = ttidx..'|0|C'
          print("Furnace Mode = C")
      elseif (devicechanged['Thermostat Mode'] == 'Auto') then
          ttidx = otherdevices_idx['Furnace Mode']
          -- print("Furnace Mode idx: " .. ttidx)
          commandArray['UpdateDevice'] = ttidx..'|0|A'
          print("Furnace Mode = A")
      end
      
      return commandArray
      

      This is what takes the information from the dummy switch and converts it to the MySensors node. As you see the "|0|O", |0|H", "|0|C", "|0|A" , the O, H, C, and A are what you would test for in your MySensors node under your receive() function. The O, H, C and A can be anything you want, so you could name them "pattern1", "pattern2", etc... and in your lua script you would format like:

      commandArray['UpdateDevice'] = ttidx..'|0|pattern1'
      

      Hope that helps some.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: Board and hardware failures

      Your pictures from your original post are a bit blurry, but pins 10 and 11 don't appear to come through to the bottom side of the board, and you solder joints don't look the best. Not sure why those pins aren't coming through the bottom side of the board, but that could be a major part of your problem. The traces that connect them to the radio are on the bottom side, so if there is not a good solder connection there, you will most likely have issues. Especially if the through hole plating is damaged in any way.

      Suggestions:

      • Use some flux and your soldering iron to clean up those solder joints. You may need to use some solder wick, or even a bare piece of copper wire with some flux on it to remove excess solder from your joints if it doesn't wick away with the tip of your iron.
      • When soldering, apply heat to both the pad and the lead coming through the hole for a second or two, then apply the solder, then remove the iron. Don't hold the iron on the pads for extended periods as you can damage the pads.
      • Use a small chisel tip rather than a conical tip. You will get better heat distribution when soldering. Hold the flat part mostly on the solder pad and touch the protruding wire when soldering.

      Here are some examples of good and bad solder joints:
      0_1495249926544_upload-cea33903-a168-4481-9820-eaab835295c6

      MAKE SURE that the tip of your soldering iron is clean too any time you are going to touch it to the board. A dirty iron tip can cause some of the issues shown above. If your tip looks anything like this, GET A NEW ONE:
      0_1495250269924_upload-cf1cb7f2-bdfd-4414-b4b9-e159546c5f87
      Here is an example of before and after wiping your tip when soldering:
      0_1495250557100_upload-b2fcd114-78bf-4717-a417-6f6dc67ad7a5

      Hope that helps.

      posted in Hardware
      dbemowsk
      dbemowsk
    • RE: Irrigation Controller (up to 16 valves with Shift Registers)

      So I figured I would share my progress with my version of this project. The majority of the build was done to the schematic from the build section of the site. The only changes I am making are eliminating the use of Q0 on the shift register, and wiring in diodes like I mentioned in my previous post to control my pump start relay using relay channel 8 when any zone is turned on. I may even add a connection for one more digital line for a pump only startup, but will have to see about the code mods to do that.

      One of my hurdles that I wanted to overcome was what kind of case I would be building this in. I searched on ebay a bit, but couldn't find what I wanted. I was digging through some old stuff one day and found an old composite video A/V switcher that I no longer use.
      A/V switcher front
      A/V switcher back
      Rather than recycling it, I figured, why not up-cycle it. The case was the perfect size for the 8 channel relay board. I even kept the back portion of the original circuit board to re-use the old DC in jack and build my regulator circuit on using an AMS1117 3.3v regulator. The output of the power board is Ground (black), +5V (red) and +3.3V (yellow).
      relay/power boards
      AMS1117 regulator
      I cut a slot in the front of the case to allow access to the relay connections.
      front cutout
      The connections came out just enough to allow access to the screw terminals. You can also see the mouning of the LCD, push button and status LED.
      screw terminals
      main board
      I designed the circuit board so that it could plug directly on top of the 8 channel relay board. Notice the header connector strip between the pro mini and the shift register. There is just enough room above the blue 3 input power connector to attach the FTDI cable for programming the pro mini. The last thing I need to add to the board is the 8 diodes to control the pump start relay which will be channel 8 on the relay board. Currently the code uses outputs Q0 thru Q7 of the shift register to control relays 1 thru 8. I will need to make a slight change to the code to use Q1 thru Q7 as the first 7 relays as it was easier to connect it that way to the header connector. I am eliminating the use of Q0 in the circuit.

      I am having a few issues with compiling the code to upload to the pro mini. It is telling me that it can't find the LiquidCrystal.h file, and I have the library in my arduino library folder. The folder has both the LiquidCrystal.h and LiquidCrystal_I2C.h files, so I am not sure what is up there. I hope to have it figured out soon so I can test the assembly.

      Thanks for reviewing.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: Why I quit using MySensors for actuators

      How are you connecting these actuators? What type of actuator is it? Maybe you need some kind of different coupling to your actuator circuit. Motor type actuators can create a lot of noise and if not properly filtered can cause issues.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: Board and hardware failures

      @Nca78 Years ago I bought this desoldering iron from Radio Shack. This thing works great for thru-hole components as you can heat up the pad and lead with the tip and suck it away right away while it is hot. I have had a few troubles on some things, but overall it has worked well for me.
      0_1495292523253_upload-c347566e-310c-470b-a7a5-c5b1bd818568

      posted in Hardware
      dbemowsk
      dbemowsk
    • RE: Irrigation Controller (up to 16 valves with Shift Registers)

      I am very close to having this working. The hardest part so far is sorting out all the text devices in Domoticz. I needed to use JSON calls to set the data for each of the text devices, but once they are set I shouldn't have to change them. But being JSON calls I should be able to easily change them with a script if needed.

      So I have the node present S_INFO devices for each of the 3 variables (all zones time, individual zone time, and zone name). I have 4 zones, so that presents 12 new devices to Domoticz. I have set zone names and they display correctly on the irrigation controller, I just need to figure out some of the zone time variables and what devices they are attached to.

      I should have this working in the next couple days and once I get it I will post the code with some notes on configuring it all.

      posted in My Project
      dbemowsk
      dbemowsk
    • One day I'll be my own automation node

      Talk about wearable technology....

      https://www.facebook.com/mashable/videos/10155563293694705/

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: DH22 Sensor puzzle

      @zboblamont It may be a board that they use for a few different sensors. They make these as boards with the necessary pull-up resistors and things to minimize the need for extra components when breadboarding a circuit for testing or other purposes. You could potentially unsolder the DHT22/AM2302 from the board if it didn't fit your design. You would just then have to remember to include the pull-up in your design.

      posted in Hardware
      dbemowsk
      dbemowsk
    • RE: Automated garage door

      For those interested, I have updated my sketch for my garage door controller to MySensors 2.0.

       /*
        MyGarageDoor for MySensors
      
        Arduino garage door control
      
        Originally built for MySensors 1.5 June 16,2016
        Updated to MySensors 2.0 October 21, 2016
      
        This will allow the MySensors gateway to monitor and control your garage door opener.  This will
        monitor the internal upper and lower limit switches of the door opener to determine door position
        for status as well as have a relay switched output that can control either the momentary contact
        switch connected to the door opener or wired directly to the switch contacts of a door opener
        remote to activate the door.
      
        This sketch features the following:
      
        Allows you to monitor the door position and return it's status based on the following:
          1 - When either the upper or lower door limit switches are reached, the door is said to be
              either fully open or fully closed. When a limit switch is triggered, the lastLimit and
              currentState variables are set to either OPEN or CLOSED based on the limit switch that was
              triggered.
          2 - If the upper and lower limit inputs both read high, then the door is said to be in motion.
              The door's direction of motion is determined from the lastLimit variable.  If the lastLimit
              of the door is OPEN, then the currentState variable should be set to CLOSING.  If the
              lastLimit of the door is CLOSED, then the currentState variable should be set to OPENING.
        Checks for door obstructions and throws an error by checking the currentState and lastLimit
        variables when the upper limit is reached.  If the upper limit is triggered and the currentState
        is set to CLOSING and the lastLimit is set to OPEN, this should indicate that the door reversed
        when closing and returned to the fully opened position.  The error state should only appear if
        BOTH the lastLimit and currentState conditions match.  If lastLimit is OPEN and the lastState is
        OPENING, this would indicate that the door was manually reversed.  This chech should only be
        needed when the upper limit is reached.
        Allows you to toggle the opener to either open or close the door.  When the door is toggled, the
        currentState should be checked and if the state is either OPENING or CLOSING, the currentState
        should invert telling that the door has changed direction.  This is done to prevent an error if
        the door is reversed manually when closing.
      
        PARTS LIST:
        Arduino pro mini
        nRF24L01 radio module
        AMS1117 3.3v regulator
        0.1uf capacitor
        10uf electrolytic capacitor
        4.7uf electrolytic capacitor (for radio module)
        5v reed relay
        2N3904 transistor for relay
        1k resistor
        Two small signal diodes for incoming signals from door opener
      
        Wiring from garage door opener
        Yellow = Upper limit D7
        Brown = Lower limit D8
        Gray = Signal ground
      
        Relay D5
      
        Version history:
        1.1 : Added the V_TEXT variable and S_INFO sensor type, and created the "Status" child
        1.2 : Added the heartbeat signal to tell the controller that the sensor is still alive.
              Scripting or other code must be used on the HA controller side to react to the 
              heartbeat signal and take appropriate action.
        2.0 : Converted to MySensors 2.0
      */
      
      //Set up the nRF24L01+
      #define MY_RADIO_NRF24
      
      #include <SPI.h>
      #include <MySensors.h>
      #include <SimpleTimer.h>
      
      #define SKETCH_NAME "MyGarageDoor"
      #define SKETCH_VERSION "1.2"
      
      #define CHILD_ID_OPENER 0
      #define CHILD_ID_STATUS 1
      
      #define UPPER_LIMIT_SENSOR 6  //Pin used for input from the garage door upper limit sensor
      #define LOWER_LIMIT_SENSOR 7  //Pin used for input from the garage door lower limit sensor
      #define DOOR_ACTUATOR_RELAY 5 //Pin used to toggle the door actuator relay
      #define RELAY_ON 1            // GPIO value to write to turn on attached relay
      #define RELAY_OFF 0           // GPIO value to write to turn off attached relay
      
      #define TOGGLE_INTERVAL 1500  //Tells how many milliseconds the relay will be held closed
      #define HEARTBEAT_INTERVAL 120000 //Number of miliseconds before the next heartbeat
      
      #define CLOSED 0
      #define OPEN 1
      #define CLOSING 2
      #define OPENING 3
      
      #define OBSTR_MAX 20
      
      const char *currentState[] = { 
                                   "Closed", 
                                   "Open", 
                                   "Closing", 
                                   "Opening" 
                                   };
      
      //Current state of the door
      int cState;     
      
      //Last state of the door
      int lState;     
      
      //The last full limit position of the door (open or closed)
      int lLimit = 0; 
      
      //Used for the error condition when the door is unexpectedly reversed
      boolean obstruction = false;
      
      int obstruction_count = 0;
      
      // the timer object used for the heartbeat
      SimpleTimer heartbeat;
      
      MyMessage msgOpener(CHILD_ID_OPENER, V_STATUS);
      MyMessage msgStatus(CHILD_ID_STATUS, V_TEXT);
      
      /**
       * presentation - Present the garage door sensor
       */
      void presentation() {
        
        sendSketchInfo( SKETCH_NAME, SKETCH_VERSION );
        
        // Register the garage door sensor with the gateway
        present( CHILD_ID_OPENER, S_BINARY );
        present( CHILD_ID_STATUS, S_INFO );
        
      } //End presentation
      
      /**
       * setup - Initialize the garage door sensor
       */
      void setup() {
      
        // Set up the pins for reading the upper and lower limit sensors
        pinMode(UPPER_LIMIT_SENSOR, INPUT);
        pinMode(LOWER_LIMIT_SENSOR, INPUT);
        // Set up the pin to control the door opener
        pinMode(DOOR_ACTUATOR_RELAY, OUTPUT);
      
        Serial.println( SKETCH_NAME );
      
        // Set the heartbeat timer to send the current state at the set interval
        heartbeat.setInterval(HEARTBEAT_INTERVAL, sendCurrentState);
        
      } //End setup
      
      /**
       * loop - The main program loop
       */
      void loop() {
      
        //Get the state of the door
        getState();
      
        //Here we check if the state has changed and update the gateway with the change.  We do this
        //after all processing of the state because we need to know if there was an obstruction
        if ((lState != cState) || obstruction == true) {
          sendCurrentState();
      
          obstruction_count ++;
          if (obstruction_count >= OBSTR_MAX) {
            //Once the obstruction is checked and sent, we can clear it
            obstruction = false;
          }
      
          //If the current state is full open or full closed we need to set the last limit
          if ( (cState == OPEN) || (cState == CLOSED) ) {
            setLastLimit( cState );
          }
        }
      
        //If the relay is on, shut it off
        if ( digitalRead( DOOR_ACTUATOR_RELAY ) == 1) {
          relayOff();                       
        }
        
        heartbeat.run();
        
      } //End loop
      
      /**
       * receive - Process the incoming messages and watch for an incoming boolean 1
       *           to toggle the garage door opener.
       */
      void receive( const MyMessage &message ) {
        
        //We only expect one type of message from controller. But we better check anyway.
        if ( (message.type == V_STATUS) && (message.getBool() == RELAY_ON) ) {
          //Toggle the door opener
          toggleDoor();
        }
        
      } //End receive
      
      /**
       * sendCurrentState - Sends the current state back to the gateway
       */
      void sendCurrentState() {
        
          send( msgStatus.set( obstruction == true ? "OBSTRUCTION" : currentState[cState] ) ); 
          
      } //End sendCurrentState
      
      /**
       * toggleDoor - Used to activate the garage door opener
       */
      void toggleDoor() {
      
        digitalWrite( DOOR_ACTUATOR_RELAY, RELAY_ON );
        //Keep the relay on for the amount of time defined by TOGGLE_INTERVAL
        delay( TOGGLE_INTERVAL );
        
      } //End toggleDoor
      
      /**
       * relayOff - Used to turn off the door opener relay after the TOGGLE_INTERVAL
       */
      void relayOff() {
      
        digitalWrite( DOOR_ACTUATOR_RELAY, RELAY_OFF );
        //Added this to tell the controller that we shut off the relay
        send( msgOpener.set(0) );
        
      } //End relayOff
      
      /**
       * getState - Used to get the current state of the garage door.  This will set the cState variable
       *            to either OPEN, CLOSED, OPENING and CLOSING
       */
      void getState() {
      
        //read the upper sensor
        int upper = digitalRead( UPPER_LIMIT_SENSOR ); 
        //read the lower sensor
        int lower = digitalRead( LOWER_LIMIT_SENSOR ); 
      
        //Save the last state of the door for later tests
        lState = cState;
      
        //Check if the door is open
        if ((upper == HIGH) && (lower == LOW)) {
          //Set the current state to open
          cState = OPEN;
          //Check if the door is closed
        } else if ((upper == LOW) && (lower == HIGH)) {
          //Set the current state to closed
          cState = CLOSED;
          //Check if the door is in motion
        } else if ((upper == HIGH) && (lower == HIGH)) {
          //If in motion and the last full position of the door was open
          if (lLimit == OPEN) {
            //Set the current state to closing
            cState = CLOSING;
            //If in motion and the last full position of the door was closed
          } else {
            //Set the current state to opening
            cState = OPENING;
          }
        }
        
      } //End getState
      
      /**
       * setLastLimit - Checks the limit passed with the last limit (lLimit) and sets the last limit
       *                if there was a change.  It also checks the states against the limits and issues 
       *                an obstruction error if the limit and last limit
       *                
       * @param limit  integer limit - The limit to be checked
       */
      void setLastLimit( int limit ) {
        
        //Here is where we check for our error condition
        if ( (lLimit == OPEN) && (limit == OPEN) && (lState == CLOSING) ) {
          //An obstruction has reversed the door.  No need to set the last limit because it already equals
          //the limit we are trying to set it to
          obstruction = true;
          //If we made it here and the last limit does not equal the limit we are setting then change it.  If
          //the last limit is equal to the limit we are setting then the last state was something other than
          //closing, so we don't need to do anything.
        } else if ( lLimit != limit ) {
          //Everything okay, set the last limit
          lLimit = limit;
          obstruction = false;
        }
        
      } //End setLastLimit
      
      posted in My Project
      dbemowsk
      dbemowsk
    • A smart home vs an automated home

      I did a blog post on my website about this topic and wanted to bring it up here to see what people thought of as far as a different realm of sensors. I'll start by talking a little about the topic title.

      Some people just have automated homes, and others with more complex setups start touching on the topic of smart homes. What is the difference? Here is a scenario:

      You normally wake up at 6:00 AM for work during the week, so you set up timers that do different things. At 5:55 AM you have the coffee pot turn on to automatically make you your morning coffee. At 6:00 AM, the alarm sounds and you turn some lights on in the house to be ready for when you get up. At 6:50 AM, the garage door automatically opens for you to leave for work. And at 6:55, the garage door closes and your house gets locked and the alarm sets itself.

      A simple scenario that could be handled by home automation. What then makes an automated home a smart home? Data data and more data. The more data that you have your system collecting, the more informed decisions you can have it make. One of the things that I wanted to delve into with this post is occupancy sensing. To take that a step further, people sensing. I am not just talking about having motion sensors to tell you when someone walks by. I am talking full on people sensing. Your house knowing how many occupants are inside, but where each of these occupants are. This is one of the hardest parts of a true smart home. Lets look at the scenario that I mentioned above. Normally you wake up a 6:00 AM to go to work, but you decided some time ago that you would take a vacation day. Your system looks at your calendar and sees this and knows that you don't need to get up early, so it doesn't sound the alarm or turn on the coffee pot. What if the system not only knew that someone was in bed, but knew that it was you. So you slept in a little bit and wake up at 6:30 to start your day. Your automation system sees that you have gotten up, so it then starts the coffee pot. It knows that you have the day off, so it doesn't open and close the garage door, and it doesn't set the alarm.

      What if your system not only knew you or other members of your family were home, but where in the house people were at any given time? What if your setup knew that you liked the temperature in a room at 70° F, but your wife liked it a bit cooler at 67° F. and could adjust the room temperature base on who was in the room. These are just some tip of the iceberg examples of things that make up a smart home. I used to be a user of a controller software called Open Source Automation (OSA). Here is a video from one of OSA's creators, Vaughn Rupp. https://youtu.be/KTLPAW9YCwM

      So now on to my question, what are peoples thoughts on ways to do people sensing? It could be MySensors type ideas or others.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: Easy/Newbie PCB for MySensors

      @sundberg84 Couldn't think of the name of the MysX connector when I did that post, but that's what I was talking about putting the header on to connect to the proto-board. Mainly to act as a proto-shield. I would agree to run the sensors from a separate regulator. If he plugs it into the MysX connector he should have access to RAW power if he jumpers the pads next to the MysX connector, and then he may be able to make use of at least one of his LM1117 regulators on his shield, provided that he runs the sensors from 3.3V. I am assuming that his LM1117's are 3.3V regulators and not the 5V versions.

      posted in Hardware
      dbemowsk
      dbemowsk
    • RE: LG TV controller

      I am going to have to try this. I have a 60 inch Sharp Aquos TV that has a 9 pin serial port. I have ordered one of these: RS232 TTL converter It is a china version, but I couldn't beat it at $0.73 with free shipping. The other nice thing is that in the manual for my TV on page 51 it shows the complete serial protocol and command set. If I can in some way combine this with the IR sender and receiver project to control my cable box too, this would be a well rounded solution.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      Since this is still in mockup stage, this is the other button configuration I was thinking about with an up, down, left, right, and center select.
      0_1513532406105_ead7dad0-012f-4987-9a6a-dedf2d7417bc-image.png

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: "in-wall" switch and "in-ceiling" relay... advice please :)

      @ben999 I have a number of switches around my house that I designed myself. They don't have relay control. They just talk to the automation controller and act as basically a scene switch. If you are in the US, this may be an option for you. Here is the thread that talks about it.
      https://forum.mysensors.org/topic/4317/us-decora-style-wall-switch/34

      The way I have mine set up, the switch talks to my Vera controller, and my Vera uses scenes to talk to another relay controller on the light/fan/device that I want to control. Many of the relay controllers that I have are Sonoffs. The response from switch to Vera to Sonoff is near instantaneous.

      The switches that I designed consist of 3 boards. The power supply board, the controller boardf (arduino pro mini + nRF24 radio) and the switch board. The switch boards that I designed is universal and can be made as a 4 button, 2 button or single button switch. I also have 3D designs for the switch plates that I made. These can be found on my thingiverse page. https://www.thingiverse.com/dbemowsk/designs.

      posted in Hardware
      dbemowsk
      dbemowsk
    • RE: US decora style wall switch

      So I decided to work more on this old project I started a while back, and I finally have a prototype of the switch/LED board finished. It is far from pretty, but it is functional as far as I can tell with the tests I have done with my volt meter.

      This is a picture of the switch board assembly opened up:
      0_1484289186008_upload-c0cfa2b3-008a-4db7-b8a6-2150c3bebc2a

      And here is 3 views of the switch board fully assembled:
      0_1484289345130_upload-ea4958cf-8200-4ac2-a6db-2c20c807dc06

      The idea I am working on is to layer the boards using the header connectors, making it modular. The next board would be the computer/MySensors board. It would be the same size as the switch board and stack with a set of female headers. This switch board would pretty much max out the pins on a pro mini. The switches would take 6 pins ( D3 - D8), and the LEDs would take 4 (A0 - A3). There would then be a third board stacked yet on top if these two which would be the power supply board. The power supply board would contain the HLK 5 volt power converter and a 3.3 volt regulator.

      My issue now is to see if I can get everything to fit in the small amount of space with header connectors to stack the boards. I may have to get creative with the arduino/radio board and mount one on each side of the board. Wiring it will also be a challenge. Then I will have to see if it will fit in a standard wall box or if I will need a deep box

      In the end, if I can get everything figured out, I could make a number of these and attach different switch boards for different configurations. I may even design a PCB for this, but if I do, that would be in the distant future.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      So last night I got the display connected and I now have the Adafruit sample code running on it:
      Wall switch OLED display test – 01:58
      — Dan Bemowski

      Tonight I will be installing the buttons and hopefully working on some test code for the buttons and the screen. Here is my proposal for the switch wiring. The red traces are for the columns, and the blue are for the rows.
      0_1513644873374_4c3296be-4a3e-4344-9605-c350ba0bf8b2-image.png

      One thing that I would like to do with this is to possibly display some animated graphics for the current weather condition. Seeing the falling stars at the end of the Adafruit test code made me think of rain or snow falling. Something like that might go outside the limits of the pro minis memory, but hey, never hurts to try.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: Easy/Newbie PCB for MySensors

      @sincze Can you possibly send pictures with how you have it connected both on the nano and on the mini? I am thinking that it is something obvious that is being missed.

      posted in Hardware
      dbemowsk
      dbemowsk
    • Converting a wifi outlet to an nRF24 MySensors device

      So recently I purchased some wifi controlled outlet adapters from Walmart. These are based off of ESP 8266 modules which I was able to reprogram. I had them working for a bit, but was having trouble getting some parts to work right with my Vera controller. Here is what the devices looked like:
      0_1486799422087_upload-f28c5153-ba94-45dd-93c6-56d83bdec6e0
      And here is what the guts of the device looked like. This is with dupont cables connected to the module from when I reprogrammed it.
      0_1486799620127_upload-4a41056b-d8db-4b45-8ef5-96767c7f7a10
      Most of my setup for MySensors uses an nRF24 network, and based on the fact that I was having some trouble getting some of the devices to work, I thought I'd give a shot at converting these to nRF24L01+ nodes. I cut some proto board the same size as the inner module and drilled identical holes to make it fit the same as the old 8266 controller. Space was a real concern as I needed to get a pro mini and an nRf24 radio inside the case. I used a 3.3v pro mini with the radio connected to a harness so I could tuck that around the plug socket for space. Here is a picture of the first new test assembly next to the old original controller. I was able to incorporate a micro-switch and an LED to show the on/off status of the relay. The switch works with the front power button on the cover. The radio is hanging underneath the white board with the colored wire harness.
      0_1486800436701_upload-5bc3fdbb-8674-4df2-84a2-f894965fb9ae
      Since the board connected to the main power board with 3 wires, it made it easy enough to connect. The 3 wires were GND, +5V and relay signal.

      I have since made 2 more of these, but haven't taken pictures of one of those yet. I will post a few more pictures this weekend.

      The old ESP8266 boards that I removed I can re-purpose down the line when I have more time to figure out the plugin for my Vera.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      Some more sample display layouts.
      0_1513921290063_82c090de-70c7-40e5-a51c-184564d66bef-image.png

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: Easy/Newbie PCB for MySensors

      @tommas you could easily take a piece of prototyping PCB like this and create your own daughter/prototyping board if you need more space than the prototyping area has.
      0_1512845129504_6f4f47c7-736c-4804-84f2-72b392d1e4fe-image.png
      Use a set of connectors like this to connect to the MysX connector on the easy newbie board.
      0_1512845514755_20e6995e-fad7-4318-93c3-98f5f0308046-image.png

      posted in Hardware
      dbemowsk
      dbemowsk
    • RE: US decora style wall switch

      So I have had my prototype version of this switch installed for a few weeks now and it seems to be performing well with my Vera setup. This week I added a new tool to my arsenal. I purchased an Anet A8 3D printer kit. I just got it put together yesterday. I ordered a roll of ABS which came yesterday. It was supposed to be white, but they sent transparent (Grrrr....). Trying to work with the ebay seller on this.

      Anyway, I wanted a project to try that would be useful, but not super difficult. I decided to build a better switch plate to improve my prototype of this switch. I knew that one of the big places to go for 3D stuff to print was thingiverse.com. I did a search on the site and someone had a 3d file for a decora blank wall plate. I decided to download the files and see what I could do. I had never done anything in any kind of CAD program, but thought, how bad can it be. I ended up finding OpenSCAD. Drawing objects in the software is done much like a structured programming language. Within a day of teaching myself some things in it, I came up with this:
      0_1487452255103_upload-26f0a10c-2ae9-417e-899e-a1b718de58a2
      0_1487452474777_upload-cdb19c24-d12c-4607-8507-e92e0c34ed44

      I have not printed this yet since I am still trying to resolve my filament issue with the ebay seller,. but as soon as I get that figured out, I will give this a test. Before printing I may still look at adding some reliefs in the 4 corner tabs to save at least a little bit of plastic, but overall I think it looks good. I'll post more here as I get it done.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: What did you build today (Pictures) ?

      @fredswed being a battery operated node, you may want to remove the LED from your pro-mini to save power. You may also want to look at the options for ruining without the pro-mini regulator also to save even more power.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: 💬 Easy/Newbie PCB for MySensors

      I just wanted to make some suggestions for this board for the possible next revision. I recently ordered a 10 pack (which when I got it ended up being an 11 pack... BONUS BOARD).

      When I put together my first board there were some things that I noticed. First, the boards that I got are labeled as rev 8 boards, but there is one small difference from the one shown on the openhardware.io website.
      board differences
      The placement of the 4.7uf capacitor and the raw power connection holes next to the nRF24L01+ socket are reversed. The spot that you have for the 4.7uf capacitor for the nRF24L01+ radio module is just a bit too close to the nRF24 connector. It appears that the capacitor that you chose in your design software was for a ceramic type cap that has a wider hole spacing and is narrower. Choose one for an electrolytic cap and move it away from the nRF24 connector a bit more. This should give the closer hole spacing designed for a small electrolytic cap and leave enough room for it.

      Similarly the spot you have for the 10uf cap above the regulator appears to also be a design for a ceramic cap with the wider hole spacing. Selecting electrolytics for these should not only give you the correct hole spacing for the electrolytic, but it should also better mark where the negative lead of the cap needs to go on your silkscreen layer.

      The other thing that I wish this had was pads for a SMT AMS1117 regulator. This could be placed in the space under the nRF24 radio or just under the pro mini. You could do this in conjunction with the TO92 style that you have currently placed. It would give the board a bit more flexibility for users. In my parts box, I only had the AMS1117 regulators and not the TO92 style. I have since ordered some of the TO92 style, but having the flexibility for either would have been nice.

      Last but not least, it would be nice to have slightly larger corner mounting holes. I don't have many small screws that fit those holes, and I have none that would work with the standoffs that I use.

      Other than those few things, it seems like a rock solid board. Thanks for the hard work.

      posted in OpenHardware.io
      dbemowsk
      dbemowsk
    • RE: Thermostat bridge/HVAC node issues

      So seeing that I have not gotten much response on this topic other than that mentioned by @rmtucker, and the fact that I was itching for a solution to this, I decided to look more at the solution posted by @mbk .

      Right off the bat, I decided to try just uploading the D_HVAC_ZoneThermostatHC1.json and D_HVAC_ZoneThermostatHC1.xml files and changing my Vera thermostat object to point to these instead of the standard thermostat files in the advanced tab. Doing this alone gave me control of both my heating and cooling setpoints as well as my mode and fan options. The "HVAC State" and "Fan Status" sections were obviously blank as I was not in any way sending this information. One option I liked with the original object, though not a huge deal, was the fact that it showed the temp in the icon like this:
      0_1483385686606_upload-9eed8088-5fb8-4e63-9fe6-a699ee325ab9

      With the new object, it just shows empty like this:
      0_1483385746406_upload-5429a0d6-31c6-4827-8bb8-2681716b55fe

      Like I say, not a huge deal, but I think with the temp on the icon it looks more professional.

      My next step was to upload the new L_Arduino.lua, and I_Arduino1.xml luup files to Vera. Testing after the upload, I did not see any affect on any of my other MySensors node objects, so then all that was needed was tomake the changes to my Thermostat Bridge Node sketch.

      First, @mbk suggested a modified MyMessage.h file. I opted not to do that. I simply added these lines at the beginning of my Sketch:

      //New sensor type S_HVACHC
      const int S_HVACHC = 39;
      //New variable types
      const int V_HVAC_FAN_STATUS = 51;
      const int V_HVAC_MODE_STATE = 52;
      const int V_HVAC_ENERGY_MODE = 53;
      

      These gave me all the functionality I needed to use the new luup files. In the sample sketch from @mbk, he has the following:

      gw.send(msgSetpointFanStatus.set("On")); // On, Off
      gw.send(msgSetpointModeState.set("Idle")); // Off, Heating, Cooling, FanOnly, Idle, Error! 
      gw.send(msgSetpointEnergyMode.set("Normal")); //EnergySavingsMode, Normal
      

      He mentions the options for msgSetpointFanStatusto be On or Off, though I found through experimentation that you can use any text for these. My HVAC system is a multi stage system. This allowed me to display the corresponding fan stage for msgSetpointFanStatus such as Off, Stage 1, Stage 2, or Stage 3. I could have also used Low, Medium and High. I would imagine I would also be able to use any text for msgSetpointModeState and msgSetpointEnergyMode, though I have not tested this.

      Anyways, on to my full sketch. This node is just as it's name implies. It is to bridge the gap between my RCS RS485 serial thermostat network and my MySensors setup. Things have not been 100% tested as of yet, but the majority of the things as far as I can see are working good. I have near full control of my thermostat from Vera now. Here is the full sketch:

      /*
        RCS Thermostat for MySensors
      
        Arduino RCS RS485 thermostat control
      
        July 7,2016
      
        This is a gateway bridge to allow an RCS serial thermostat to be accessible to a MySensors
        gateway.  The thermostat being used to test this is an RCS TR40 RS485 thermostat.  The published
        protocol for RCS thermostats can be found at the following address;
        http://www.rcstechnology.com/oldsite/docs/thermostats/serial/SERIAL%20PROTOCOL%20REV%204.3%20%20150-00225-43.pdf
        
        This sketch features the following:
      
        Add features here
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      //Set up the nRF24L01+
      #define MY_RADIO_NRF24
      
      // Import needed libraries
      #include <SPI.h>
      #include <MySensors.h>
      #include <SoftwareSerial.h>
      #include <EEPROM.h>
      
      #define SKETCH_NAME "RCS Thermostat"
      #define SKETCH_VERSION "1.0"
      
      /*
      #define CHILD_ID_TEMP          0 // V_TEMP
      #define CHILD_ID_STATUS        1 // V_STATUS
      #define CHILD_ID_SETPOINT_COOL 2 // V_HVAC_SETPOINT_COOL
      #define CHILD_ID_SETPOINT_HEAT 3 // V_HVAC_SETPOINT_HEAT
      #define CHILD_ID_FLOW_STATE    4 // V_HVAC_FLOW_STATE
      #define CHILD_ID_FLOW_MODE     5 // V_HVAC_FLOW_MODE
      #define CHILD_ID_HVAC_SPEED    6 // V_HVAC_SPEED
      */
      
      #define CHILD_ID_HVAC        0 // S_HVAC
      #define CHILD_ID_OUTSIDE_AIR 2 // S_INFO
      
      // Declare Constants and Pin Numbers
      #define SSerialRX            5  //Serial Receive pin 8
      #define SSerialTX            3  //Serial Transmit pin 7
      
      #define SSerialTxControl     4  //RS485 Direction control
      
      #define RS485Transmit        HIGH
      #define RS485Receive         LOW
      
      #define MY_REPEATER_FEATURE
      
      //New sensor type S_HVACHC
      const int S_HVACHC = 39;
      //New variable types
      const int V_HVAC_FAN_STATUS = 51;
      const int V_HVAC_MODE_STATE = 52;
      const int V_HVAC_ENERGY_MODE = 53;
      
      // Declare objects
      SoftwareSerial RS485Serial(SSerialRX, SSerialTX); // RX, TX
      
      // Sensor values
      // V_TEMP, V_STATUS, V_HVAC_FLOW_STATE, V_HVAC_SPEED
      // V_HVAC_SETPOINT_COOL, V_HVAC_SETPOINT_HEAT, V_HVAC_FLOW_MODE
      MyMessage msgStatus( CHILD_ID_HVAC,               V_STATUS );
      MyMessage msgTemp( CHILD_ID_HVAC,                 V_TEMP );
      MyMessage msgSetCool( CHILD_ID_HVAC,              V_HVAC_SETPOINT_COOL );
      MyMessage msgSetHeat( CHILD_ID_HVAC,              V_HVAC_SETPOINT_HEAT );
      MyMessage msgFlowState( CHILD_ID_HVAC,            V_HVAC_FLOW_STATE );
      MyMessage msgFlowMode( CHILD_ID_HVAC,             V_HVAC_FLOW_MODE );
      MyMessage msgHvacSpeed( CHILD_ID_HVAC,            V_HVAC_SPEED );
      MyMessage msgFanStatus( CHILD_ID_HVAC,            V_HVAC_FAN_STATUS );
      MyMessage msgModeState( CHILD_ID_HVAC,            V_HVAC_MODE_STATE );
      MyMessage msgEnergyMode( CHILD_ID_HVAC,            V_HVAC_ENERGY_MODE );
      
      // This is used to get the outzide air temp to display on the thermostat
      MyMessage msgSetOutsideAir( CHILD_ID_OUTSIDE_AIR, V_TEXT );
      
      // DECLARE VARIABLES 
      //the last sent set point
      String setPoint;
      //The current mode (O, H, C, A). the initial mode of "-" is to tell the sketch to call for initial status
      String mode = "-";
      //The last mode received from the thermostat
      String LastMode = "";
      //The current fan mode received from the thermostat
      String FanMode = "";
      //The last fan mode received from the thermostat
      String LastFanMode = "";
      //The last mode received from Vera
      String LastVeraMode = "";
      //This is the RS485 address of this node that gets sent to the thermostat
      String serialAddr = "1";
      //The originator code identifier of the originator of the message
      String originator = "00";
      //Placeholder for the last command sent
      String LastSent = "";
      //Counter used in place of sleep to request information at certain intervals
      int updateCounter = 0;
      //The last outside air value received fromVera for display on the WDU
      float lastOutsideAir = 0;
      
      /**
       * presentation - Present the parts of the thermostat
       */
      void presentation() {
        
        sendSketchInfo( SKETCH_NAME, SKETCH_VERSION );
        
        // Register the thermostat with the gateway
        //present( CHILD_ID_HVAC,        S_HVAC );
        present( CHILD_ID_HVAC,        S_HVACHC );
        present( CHILD_ID_OUTSIDE_AIR, S_INFO );
        
        send(msgSetOutsideAir.setSensor(CHILD_ID_OUTSIDE_AIR).set("-"));
      
      } //End presentation
      
      /**
       * setup - Set up and initialize objects and variables
       */
      void setup() {
        
        Serial.begin(9600);
        
        // put your setup code here, to run once:
        pinMode( SSerialTxControl, OUTPUT );
      
        // Initialize RS485 Transceiver
        digitalWrite( SSerialTxControl, RS485Receive );
        
        // Start the software serial port, to another device
        RS485Serial.begin(9600);   // set the data rate
      
        //Call for the initial status of the thermostat
        SendCmd("R=1");
        
      } //End setup
      
      /**
       * loop - The main program loop
       */
      void loop() {
      
        String dataIn;
        
        if (RS485Serial.available()) {
          dataIn = RS485Serial.readStringUntil('\n');
          ParseReceived(dataIn);
        }
      
        // The updateCounter is used to request information at different intervals. Requesting 
        // information at different intervals helps prevent data errors on the serial transmission. 
        updateCounter ++;
      
        // Initiate a status request at 15000 which is one half of the cycle
        if (updateCounter == 10000) {
          SendCmd("R=1");
          request( CHILD_ID_HVAC, V_TEXT );
        }
      
        // Request the outside air temp from the controller at the second half of the cycle
        if (updateCounter == 20000) {
          SendCmd("R=2");
          request( CHILD_ID_OUTSIDE_AIR, V_TEXT );
          // Reset the counter
          updateCounter = 0;
        }
        
      } //End loop
      
      /**
       * ParseReceived - Used to parse data received from the RS485 network.  Usually the thermostat
       * 
       * Attributes:
       * Message  - The message string to parse
       */
      void ParseReceived(String Message) {
        
        String StatusData;
        //int Count;
        String StatusString;
        String Status;
        String Type;
        String Value;
      
        int Index;
        int Start;
        int End;
        int StatIndex;
      
        Index = Message.indexOf(' ');
        Start = 0;
        
        Serial.println("Message: " + Message);
        
        if (Message.startsWith("A=")) {
          while (End != Message.length()) {
            End = (Index == -1) ? Message.length() : Index;
            //Get the status string to process
            StatusString = Message.substring(Start, End);
            //Change our start position to 1 over the last space found
            Start = Index + 1;
            //Find the end of the next status string
            Index = Message.indexOf(' ', Start);
        
            //Now we need to process the status string into it's Type and Value
            StatIndex = StatusString.indexOf('=');
            Type = StatusString.substring(0, StatIndex);
            Value = StatusString.substring(StatIndex + 1);
            ParseStatus(Type, Value);
          } 
        } else {
          SendCmd(LastSent);
        }
        
      } //End ParseReceived
      
      /**
       * ParseStatus - Used to parse a status parameter sent from the thermostat
       * 
       * Attributes:
       * type  - The status type
       * Value - The status value
       */
      void ParseStatus(String Type, String Value) {
        
        if (Type == "OA") {
          //Outside Air not used
        } else if (Type == "Z") {
          //Zone not used
        } else if (Type == "T") {
          //Current temperature
          send(msgTemp.set( Value.toFloat(), 1 ));
        } else if (Type == "SP") {
          //Set Point (for single setpoint systems)
          if (mode == "H" || mode == "EH") {
            send(msgSetHeat.set( Value.toFloat(), 1 ));
          } else if (mode == "C") {
            send(msgSetCool.set( Value.toFloat(), 1 ));
          }
        } else if (Type == "SPH") {
          //Heating set point
          send(msgSetHeat.set( Value.toFloat(), 1 ));
        } else if (Type == "SPC") {
          //Cooling set point
          send(msgSetCool.set( Value.toFloat(), 1 ));
        } else if (Type == "M") {
          //RCS thermostat mode (MySensors V_HVAC_FLOW_STATE)
          mode = Value.c_str();
          Serial.println("mode=" + mode);
          send(msgEnergyMode.set("Normal"));
          if (LastMode != mode) {
            if (mode == "O") {
                send(msgFlowState.set("Off"));
                send(msgModeState.set("Off"));
            } else if (mode == "H") {
               send(msgFlowState.set("HeatOn"));
                send(msgModeState.set("Heating"));
            } else if (mode == "C") {
                send(msgFlowState.set("CoolOn"));
                send(msgModeState.set("Cooling"));
            } else if (mode == "A") {
                send(msgFlowState.set("AutoChangeOver"));
            } else if (mode == "EH") {
                send(msgFlowState.set("HeatOn"));
                send(msgModeState.set("Heating"));
            }
            LastMode = mode;
          }
        } else if (Type == "FM") {
          //RCS fan mode (MySensors V_STATUS 0=off 1=on)
          FanMode = Value.c_str();
          if (LastFanMode != FanMode) {
            if (FanMode == "1") {
              send(msgFlowMode.set("ContinuousOn"));
            } else {
              send(msgFlowMode.set("Auto"));
            }
            LastFanMode = FanMode;
          }
        //Type 2 status message types
        } else if (Type == "H1A" && Value == "1") {
          //RCS heating stage 1
          send(msgHvacSpeed.set("Min"));
          send(msgFanStatus.set("Stage 1"));
        } else if (Type == "H2A" && Value == "1") {
          //RCS heating stage 2
          send(msgHvacSpeed.set("Normal"));
          send(msgFanStatus.set("Stage 2"));
        } else if (Type == "H3A" && Value == "1") {
          //RCS heating stage 3
          send(msgHvacSpeed.set("Max"));
          send(msgFanStatus.set("Stage 3"));
        } else if (Type == "C1A" && Value == "1") {
          //RCS cooling stage 1
          send(msgHvacSpeed.set("Normal"));
          send(msgFanStatus.set("Stage 1"));
        } else if (Type == "C2A" && Value == "1") {
          //RCS cooling stage 2
           send(msgHvacSpeed.set("Max"));
          send(msgFanStatus.set("Stage 2"));
        // We may receive values of 0 for both C1A and H1A we may get an on/Auto cycling if one or the 
        // other is on. To prevent this we must verify the mode we are in and only set it to auto if 
        // the heating or cooling stage with a 0 value matches the mode we are in
        } else if (((Type == "C1A" && mode == "C") || (Type == "H1A" && (mode == "H" || mode == "EH"))) && Value == "0") {
          send(msgFanStatus.set("Off"));
        } else if (Type == "FA") {
          //RCS fan status (MySensors V_HVAC_FLOW_MODE)
          if (Value == "1") {
            send(msgFlowMode.set("ContinuousOn"));
          } else {
            send(msgHvacSpeed.set("Auto"));
          }
        } else if (Type == "VA") {
          //Vent damper not used
        } else if (Type == "D1") {
          //Damper #1 not used
        } else if (Type == "SCP") {
          //This is for MOT (Minimum Off Time) and MRT (Minimum Run Time) statuses for 
          //stages 1 and 2.  I may find a way to implement this into Vera, but for now
          //it is not used
          
          //String stg1 = Value.substring(0, 1);
          //String stg2 = Value.substring(0, Value.length() - 1);
        }
        
      } //End ParseStatus
      
      /**
       * SendCmd - Sends a command out to the RS485 network
       * 
       * Attributes:
       * cmd - The command to send
       */
      void SendCmd(String cmd) {
        
        //Assemble the command string using the defined serial address and originator codes
        String commandStr = "A=" + serialAddr + " O=" + originator + " " + cmd;
        // Enable RS485 Transmit only for the duration of the send
        digitalWrite(SSerialTxControl, RS485Transmit);
        RS485Serial.print(commandStr + "\r");
        LastSent = cmd;
        //Return to RS485 receive mode  
        digitalWrite(SSerialTxControl, RS485Receive);
        delay(50);
        
      } //End SendCmd
      
      /**
       * receive - Process the incoming messages and watch for an incoming boolean 1
       *           to toggle the garage door opener.
       * 
       * Attributes:
       * MyMessage - The referenced message object received
       */
      void receive(const MyMessage &message) {
      
        //Check messages from controller
        if ( message.type == V_TEXT ) {
          float OT;
          String temp;
          
          OT = atof(message.data);
          temp = String( OT, 0 );
          if (lastOutsideAir != OT) {
            SendCmd("OT=" + temp);
          }
          lastOutsideAir = OT;
        } //End V_TEXT
      
        if (message.type == V_TEMP) {
          //Get the temp setting passed
          setPoint = String(atof(message.data), 0);
          if (mode == "H" || mode == "EH") {
            SendCmd("SPH=" + setPoint + " R=1");
          } else if (mode == "C") {
            SendCmd("SPC=" + setPoint + " R=1");
          }
        } //End V_TEMP
        
        if ( message.type == V_STATUS ) {
          String M = message.data;
          SendCmd("F=" + M + " R=1");
        } //End V_STATUS
        
        if ( message.type == V_HVAC_FLOW_STATE ) {
          String M = message.data;
          send(msgEnergyMode.set("Normal"));
          if (M == "Off") {
            mode = "O";
            SendCmd("M=O R=1");
            send(msgModeState.set("Off"));
          } else if (M == "HeatOn") {
            mode = "H";
            SendCmd("M=H R=1");
            send(msgModeState.set("Heating"));
          } else if (M == "CoolOn") {
            mode = "C";
            SendCmd("M=C R=1");
            send(msgModeState.set("Cooling"));
          } else if (M == "AutoChangeOver") {
            mode = "A";
            SendCmd("M=A R=1");
          }
        } //End V_HVAC_FLOW_STATE
        
        if ( message.type == V_HVAC_SPEED ) {
          //Serial.println("Speed: " + String(message.data)); 
        } //End V_HVAC_SPEED
      
        if (message.type == V_HVAC_SETPOINT_COOL) {
           setPoint = String(atof(message.data), 0);
           SendCmd("SPC=" + setPoint + " R=1");
        } //End V_HVAC_SETPOINT_COOL
      
        if (message.type == V_HVAC_SETPOINT_HEAT) {
           setPoint = String(atof(message.data), 0);
           SendCmd("SPH=" + setPoint + " R=1");
        } //End V_HVAC_SETPOINT_HEAT
        
        if ( (message.type == V_HVAC_FLOW_MODE) ) {
          String SM = message.data;
          if (SM == "Auto") {
            SendCmd("F=0 R=1");
          } else if (SM == "ContinuousOn" || SM == "PeriodicOn") {
            SendCmd("F=1 R=1");
          }
        } //End V_HVAC_FLOW_MODE
      } //End receive
      

      I think that this information should be put into the next release of MySensors. Though I don't think we necessarily need a fully new sensor type such as S_HVACHC, the HVAC_FAN_STATUS, V_HVAC_MODE_STATE, and V_HVAC_ENERGY_MODE variable types could be added to work with the S_HVAC sensor type.

      If anyone has any questions, comments or criticisms, feel free to post here.

      Happy New Year to all

      posted in Vera
      dbemowsk
      dbemowsk
    • RE: DIY CNC mill from mainly salvaged and 3D printed parts

      So last night I tested the limits of my 3D printer bed. I printed a thin platter that I will mainly use as a drill guide for the MDF that I will cut today. I haven't posted anything in a while on this because I was working with a guy from work that has a metal lathe to make me a new Y axis threaded rod/lead screw. Here is a set of side by side pictures showing my OpenSCAD 3D rendering with a picture of the actual setup so far at the same angle.
      0_1518284895442_3df63842-2dd6-4365-87c0-f43bbb777a93-image.png
      0_1518284913489_c45e360b-4720-4464-b92e-674df833f3ea-image.png

      I will also be working on figuring out a set of X/Z axis uprights today. I have done a little work on an X axis motor assembly the past couple days, but it was mainly playing with some ideas. More on that later.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: CNC PCB milling

      @NeverDie Just have to say, I have been following this thread for a while now and you have come a long way with this. Great job.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: 💬 Easy/Newbie PCB for MySensors

      I had mentioned this before, but the electrolytic capacitors wer put in the design using a ceramic capacitor designation which doesn't allow room for correct placement of capacitors. The main one is the one near the radio. The pads for the cap are spaced too far apart for a small electrolytic, and they are too close to the connector requiring that the capacitor leads be bent toward the radio connector to be able to get it to fit.

      posted in OpenHardware.io
      dbemowsk
      dbemowsk
    • RE: DIY CNC mill from mainly salvaged and 3D printed parts

      So the CNC is near ready for testing. I need to solder a connector on to the X axis stepper and I should be able to run some tests. I think the next step is going to be figuring out how to calibrate the GRBL controller.

      Here are some pics of the build so far.
      0_1520435634637_d55a543c-c83e-45c2-baf1-88b9dffe4bf7-image.png 0_1520435645089_b6649401-63a5-4317-83fb-e3ffde4c1535-image.png 0_1520435653054_883b5d94-af50-4211-8b3c-13f5d682457e-image.png

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: Case for mini weather station

      It is actually called a radiation shield. Too bad you don't have a 3D printer. I did a design for one that I have posted on thingiverse.
      0_1524239907274_338f9399-d073-4b92-82ca-f382f96022c7-image.png

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: 💬 Easy/Newbie PCB for MySensors

      @sundberg84 said in 💬 Easy/Newbie PCB for MySensors:

      choose the axial types which is the one with two legs

      Just for clarification, there is axial lead and radial lead components. The axial leads have both wires coming out of one side (as @sundberg84 mentions it looks like two legs). Radial leads have one wire coming out each side. I almost never use radial lead capacitors.

      posted in OpenHardware.io
      dbemowsk
      dbemowsk
    • RE: DIY CNC mill from mainly salvaged and 3D printed parts

      So here is it's maiden voyage... It's first simultaneous run of all axes, AKA the initial X, Y and Z axis test.
      Initial axis test – 00:23
      — Dan Bemowski

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: Anyone tried the Creality CR-10 3D printer?

      @gohan Sound like it was a gcode file on the SD card, so my guess is that he didn't slice it and may not know.

      posted in General Discussion
      dbemowsk
      dbemowsk
    • RE: 💬 Smart Alarm Clock

      I am just curious why you did your switch board the way you did? You can do a similar style switch setup using all the same value resistors. Then you don't have to buy so many different resistor values. Something like this:
      0_1508986754912_upload-8f7eb5ee-6fac-4bb8-8ef7-c5a3c6f82e0c

      In this approach, whichever button you press, the resistor values, being in series, add up giving you a different voltage on your analog pin. With your approach, you use different resistor values on each switch which gives you your different voltage. My approach is only slightly different than yours. I am just wondering if there is an advantage one way or another.

      posted in OpenHardware.io
      dbemowsk
      dbemowsk
    • Ceiling fan/light node

      Background
      Some time back I had posted a project that I was interested in pursuing. On my old X10 equipment that I ran years back, I had used some dimmer modules to control lights and ceiling fans in my house. One part that I liked about the modules was for the lights, it had a soft start in which the light would ramp up to brightness when turned on, and fade to black when turned off. I also had speed control of my ceiling fans with these modules. The only problem was that I had to use 2 modules for each light and fan combo and fit them into the fan shroud.

      The Idea
      I am working on designing some modules for controlling my light fan combos in a similar manner. Right now I am controlling them with Sonoff modules controlled by my Vera controller. I would like to try some node to node communication with these to possibly have them work if my controller is down. The WAF goes down heavily when the controller has issues which has happened on occasion.

      The Circuit
      I would like to include the pro mini and all electronics in the final design. I am also thinking of including both nRF24L01 as well as an option for RFM69 for others that may be interested in this. As a start, here is my proposed schematic for the dimmer control portion of the modules. I have included snubbers on both triac opto circuits, but on whichever one would be used for the light dimming, the snubber could potentially be omitted. I am looking for input on whether people think this design will work.
      0_1525134006346_9e897ada-0980-4e0a-9806-fbbe10208d98-image.png

      I have already made a proto board with the zero crossing detector and tested it with this code which successfully blinks the LED on my UNO when power is plugged in. This tells me too that the zero crossing ISR is working as it should which is a start to the code that will run this.

      const uint8_t ledPin = 13;                          // Digital output pin that has the on board LED
      const uint8_t zeroPin = 2;                          // Digital input pin to which the zero crossing detector is connected
      
      uint8_t zeroCounter = 0;
      bool zeroState = 0;
      bool ledState = LOW;
      
      void setup() {
        Serial.begin(9600);
        pinMode( ledPin , OUTPUT );                       // Enable output driver for LED pin
        attachInterrupt(0, zero_crosss_int, RISING);      // Choose the zero cross interrupt and attach it to the ISR
      }
      
      void loop() {
        
      }
      
      void zero_crosss_int()  // function to be fired at the zero crossing to dim the light
      {
        zeroState != zeroState; 
        zeroCounter++;
          
        if ( zeroCounter == 60 ) {                        // Every 60 zero crossings change the LED state
          ledState = (ledState == LOW) ? HIGH : LOW;
          digitalWrite( ledPin , ledState );
          zeroCounter = 0;
        }
      }
      

      I welcome any input on the design or code as I work through this, so feel free to chime in any time.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: Momentary button to control lights

      My gateway is a serial gateway built with an easy newbie PCB and a pro mini.
      What I did when I upgraded my 1.4 setup to 2.0, I pulled my pro mini that I had flashed with the 1.4 setup and put a new pro mini in that had 2.0. That way if there were any problems, I could easily swap the 1.4 pro mini back in to easily be back where I started.

      Likewise when replacing your library, pull the MySensors folder out of your arduino libraries folder to keep as a backup until you know things will work. That way if you have to revert back, you can easily swap back the old MySensors folder. You have to completely remove it from the libraries folder though, you can't just rename it to something else.

      posted in Troubleshooting
      dbemowsk
      dbemowsk
    • RE: 💬 Easy/Newbie PCB for MySensors

      Would something like this be possible? It would give users that little bit of extra room in the proto area.
      0_1521918858785_911e7f1a-5943-4a40-a49c-e99853681070-image.png

      posted in OpenHardware.io
      dbemowsk
      dbemowsk
    • RE: RooDe - A "reliable" PeopleCounter

      @zboblamont Wouldn't it throw the count off if the people are in multiple pieces?

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: Wall Box with LCD/TFT suggestions

      For my setup I am looking to replace my thermostat on the wall. To replace it I will need to install a temp sensor for the room. What I am replacing it with is an old Android tablet running ImperiHome. With that I have access to all of the devices on my Vera controller, and I can customize screens for each. The one that I am in the process of piloting is an old Nexus 7 tablet. For wall mounting I used a 3D printer and made this in white to match my wall:
      0_1485272511517_upload-4db58ec8-b12b-4466-9392-aa188ff8401d

      Here is a link to the mount on ThingVerse:
      http://www.thingiverse.com/thing:424300

      Going a route like this would give you more flexibility, the only thing would be if there is enough room in the wall mount to handle the sensors you want.

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: MultiSensor - relays, temp, hum, PIR, gesture with various controller overrides

      @BulldogLowell I was unaware of this, good call though. I looked it up because I wasn't sure what the F() method was. Here's a link for others that may be curious.
      https://playground.arduino.cc/Learning/Memory

      posted in Development
      dbemowsk
      dbemowsk
    • RE: Where do i start?

      @reindier Start here:
      https://www.mysensors.org/about

      @reindier said in Where do i start?:

      do i need to setup a server with software where everything is running from (like Blynk?) od does it al run on a arduino

      Your nodes will most likely be arduino based, but they will transmit their data to a gateway node that is then connected to some kind of server/controller. You can find the list of supported controllers here:
      https://www.mysensors.org/controller
      The hardware for these controlers can be something as simple as a Rapberry pi or an old PC, or it can work with some dedicated home automation controllers such as the Vera line of controllers. One that is fairly easy to get started with is Domoticz:
      https://www.mysensors.org/controller/domoticz
      https://www.domoticz.com/

      The MySensors community is very large and has great support in this forum. If you are stumped on anything, post your question in the forum and you will usually get a pretty quick response.

      Welcome to MySensors.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: HDC1080 battery operated temp/humidity sensor with wall box

      The box is finished. overall I am happy with the way it turned out, even though there are some layers on the outer shell which are pretty rough.
      0_1489847760038_5652.jpg 0_1489847512781_5651.jpg 0_1489847767958_5653.jpg

      The board mounts pretty nice on the mounting tabs with some 2mm x 5mm screws (bought a bag of 100 off of ebay).
      0_1489847900732_5655.jpg

      The battery box fit perfectly in it's slot. I had to put the power switch to the inside for the bottom to fit on, which was no big deal because I didn't really need the switch anyway. The switch came mounted in the battery boxes when I bought them.
      0_1489848182304_5656.jpg

      The bottom snapped on perfectly too. I have the holes to screw it to the wall, then the box should just snap right on. I could incorporate a small slot on the edge of the case on each side to pry it off with a screwdriver if I need to, but that is minor and I think this is going to be perfect just the way it is.

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: Best sensor for falling alert

      @nca78 said in Best sensor for falling alert:

      a LIS3DH will use 50-100 times less current for free fall detection (between 6 and 11µA), ADXL345 over 10 times less (40µA)

      That is an excellent point. If using it for personal monitoring, quiescent current draw would definitely be a factor. The longer you can have the device last on a battery charge the better.

      I had just used the MPU-6050 for building a recovery parachute system for my drone in which I needed free fall detection, and it worked well which is why I commented on that one.

      posted in My Project
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      @gohan I agree, but I wanted to play it safe for when it got to the main funnel part. I opted to set the structure type to lines instead of a grid to at least keep the waste down some.

      Just over 24 hours into the print. As you can see in this updated pic, it is just starting to get to what will be the top part of the funnel where it is tapering in.
      0_1497937820531_upload-83c04d37-8a81-45b2-9365-97b38eb56b4a

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      Just an update on the progress. It just started on the box this morning. Should be finished tonight at some point.
      0_1497958856921_upload-537b0254-6498-4d49-86a9-5c88d9f525b6

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      Here are some of the final pics of the wind sensor assembly. The first one shows the circuit board mounting assembly. I have a small channel on the top and bottom sides of the mounting plate to hold rubber O-ring seals to keep water out. The seals can be seen to the left of the image.
      0_1500170436823_upload-15dd3888-b1c6-4e4b-8b03-32a0533eec63

      Next is just a wide angle shot of all the parts. The connector for the anemometer reed switch feeds through the hole next to the wire harness board and plugs into a header on that board.
      0_1500170696031_upload-bca62065-4537-4f33-a19e-cb472587f0ef

      The last pic is the fully assembled unit with the wire harness attached. I added a shot of the O-rings sandwiched between the layers to keep water out.
      0_1500171521761_upload-fd7d3c7c-9ac7-4a13-8a91-d6423d083117

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: Newbie PCB (not only) housing in different sizes

      @michał-kozak Just a couple suggestions for your design. You mention in your thingiverse description that you need to glue the front on. Why not design it so that the four screw posts actually attach to the front so that when you screw the back on it pulls the front and side wall parts together eliminating the need for glue. I realize then that you would need two covers for the different depth boxes, but that wouldn't be the end of the world. Another suggestion, design some mounting posts to screw the PCB on to as well as some tabs to hold the battery socket.

      Take a look at a design that I did for this board. This is for his older Rev 8 and Rev 9 boards, and may fit the newest Rev if the board and screw holes haven't changed Here is a look at the inside:
      0_1543157377068_a2325d89-d10a-47a4-a512-dcd92f709dee-image.png
      As you can see, there are the 4 L shaped tabs for mounting the board on as well as a slot for the 2-AA battery pack. Here it is with the board and battery pack installed:
      0_1543157502356_1b5ef22a-9090-4f1c-a755-9ae716dd41a7-image.png

      Here is the thingiverse links to 2 box designs that I did that are similar. The second is just a remix of my first design seen in the pics above made for a different sensor.
      https://www.thingiverse.com/thing:2186286
      https://www.thingiverse.com/thing:2612414

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: 💬 Advanced Gateway Options

      @mntlvr You are mistaking the plugin version with the library version. I am going to assume you are using UI7 and not UI5. Go to your devices list. On the MySensors plugin, click the right arrow icon:
      0_1523020957054_c89ffbac-c879-4984-85f6-9048eab72898-image.png
      Once there, click on Settings and you should see something like this:
      0_1523020972762_b7130180-69a1-4415-8353-661233f4f129-image.png
      Right under the plugin version you will see what library version you got from Github. Remember though that that is ONLY for your gateway and NOT NECESSARILY what library your nodes are running on.

      posted in Announcements
      dbemowsk
      dbemowsk
    • EDS OW-SERVER Emulator for 1-wire devices

      This is not really a topic related to MySensors devices, but rather an alternative for some to converting to MySensors 1-wire devices.

      Do you have a setup where you are using Dallas 1-wire devices on an existing 1-wire network on a Raspberry Pi or similar device? I had this setup that I was using with Domoticz before I got my Vera. The setup used a 1-wire USB interface and I had multiple sensors already wired in an inline setup. This, and I already had OWFS installed and working on my Pi device.

      I noticed that Vera had a 1-wire plugin, but it was for a 1-wire to ethernet device called OW-SERVER-ENET. In some searching on this device, I cam across a post on the Vera forum called "MiPi 1wire plugin". This guy had written a perl script that created an XML file that emulated the one that the OW-SERVER device used. In researching his plugin, it did not work for me. It did however give me enough information to build my own using PHP. The emulator that I wrote can be modified to support a number of different 1-wire devices. I currently have temp sensors (DS18S20 and DS18B20) support, 1-wire RTC support (Might need a tweak or two) and a DS2890 1-wire digital pot. It is only 55 lines of PHP code. It uses two commands from the OW File System, "owdir" and "owread" to get the devices and create the XML file.

      Once you have that set up on your Pi device, you will need to set up Apache2 and PHP. I will not go into the setup of these. Place the owserver.php file in the root web folder and add a root cron job to run every minute.

      The last thing is to install the EDS OWServer plugin and set it up using the instructions here . On your Vera, navigate to Devices > OWServer > Add Devices, and you should see something like this:
      0_1482611453768_upload-a3018d6a-a960-4963-b139-fc0ba1f0fb33

      Anyways, here is the github link to the file:
      https://github.com/dbemowsk/OW-SERVER_Emulator

      Happy trails and Merry Christmas
      Dan

      posted in Vera
      dbemowsk
      dbemowsk
    • RE: Requesting a garage door sensor type.

      @172pilot Sorry I never posted back to this. I didn't end up using the roller shutter code. After looking into it more that wasn't quite what I wanted. I wanted to have the node post back the state of the door with [ Open, Opening, Closed, Closing, or Obstruction ]. When I started this, version 2.0 of MySensors was still in development. @awi had pointed me to the new V_TEXT variable and S_INFO sensor type which was new to 2.0. These constants were easy enough to implement in 1.5 by adding these lines:

      // new V_TEXT variable type (development 20150905)
      const int V_TEXT = 47 ;
      // new S_INFO sensor type (development 20150905)
      const int S_INFO = 36 ;
      

      You can see the progress I have made on this project in this post: https://forum.mysensors.org/topic/4059/automated-garage-door/20
      I am still running version 1.5 in my setup. I am hoping to convert to the new 2.0 fairly soon which means I will have to convert the node code for this to 2.0. Just haven't had the time lately to get that done. I am open for comments and suggestions from other users.

      posted in Feature Requests
      dbemowsk
      dbemowsk
    • RE: Wall Box with LCD/TFT suggestions

      @gohan Well, in my case, it is going to replace my thermostat, so I already have the 5 wire cable coming up from the basement for that which takes care of the hole in the wall. Since the main controller for the thermostat is in the basement, all I should need at the tablet side is a temp sensor. I will use the 5 wire cable to connect my 5 volt charger and probably a DS18B20 temp sensor to read the temp. In the basement, I will create an arduino node to read the temp and send it to the thermostat controller over my RS485 network. All the other thermostat controls will be handled by the tablet.

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: Browser-based firmware generator

      @rakeshpai You mention about Dropbox, either that or Google Drive would be interesting options.

      I know the floor plan thing is a stretch as it is a bit of coding to make that kind of thing work. I just figured I'd throw the hook out there and see who might bite on the worm.

      I like the schematic thing too, but that, much like the floor plan thing might be hard to do.

      posted in Development
      dbemowsk
      dbemowsk
    • RE: Brand new Vera controller

      So I got a response from Vera on my issue. Here was their response:


      I’ve checked your unit and the Arduino is flooding the Vera in a such way that it is crashing the engine. There is a configuration on the Arduino that is flooding the Vera unit or maybe there is an issue with the Arduino directly. Can’t tell for sure.

      CUT some log info CUT

      If you remove the Arduino from the Vera, the engine will stop flooding and you will be able to access it the Vera unit and check it.

      Once you do that and check the configuration of the Arduino and also check to see if everything is alright with it, you will be able to plug it back in and the engine should not crash anymore and you shall be able to use the MySensor.

      With the configuration of the sensor you will need to check with MySensor directly as they have this information.


      Anyways, so I found that I had my thermostat bridge updating too often which was what was causing the supposed flooding. The bridge worked fine with Domoticz, so I really don't think that was the issue, though I could tone down the updates from it. I am not sure how he determined that it was crashing the engine, but for now I have the bridge disconnected and not flooding the gateway, and I still cannot add sensors.

      Any help that anyone can provide would be GREATLY appreciated. I have had the unit for over a week now and cannot add my MySensors devices.

      One good thing though, I did finally resolve the issue with my 1-wire server and I at least have my temp sensors online.

      Thanks guys

      posted in Vera
      dbemowsk
      dbemowsk
    • RE: HC-SR501 Pir Motion IR Sensor Body Module

      @Outlaw You could potentially connect it to the input of a relay module like this:
      https://www.ebay.com/itm/2PCS-1-Channel-DC-5V-Relay-Switch-Module-for-Arduino-Raspberry-Pi-ARM-AVR/322465448278?hash=item4b14704156:g:dzgAAOSwSlBY2bTH
      Why would you want only that though with no HA integration? If that's all you want, go to a store and buy a motion switch. Or am I missing something?

      posted in Feature Requests
      dbemowsk
      dbemowsk
    • RE: HDC1080 battery operated temp/humidity sensor with wall box

      @sundberg84 Most definately. I will be posting it to my things on thingiverse in a bit. I plan to link this forum post in the comments. I'll also post a link to the battery boxes that I bought on ebay as they fit perfectly. I'll post the link when I have it up.

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: MultiSensor - relays, temp, hum, PIR, gesture with various controller overrides

      @Ben-Andrewes If you have loads of serial prints, that is probably why you have 99% memory usage. I bet if you pull those out, or at least use a define to be able to turn them on and off like, or even with MY_DEBUG or the like, you can see the difference when shutting them off at compile time.

      posted in Development
      dbemowsk
      dbemowsk
    • RE: Redesigned Vera UI7 Thermostat with Heat/Cool Setpoint, HVAC State, Fan Status, Energy Mode

      @mbk I do realize that this topic is quite old, but I thought I would comment on it anyway in the event that someone else stumbles on this as I did.

      I wanted to thank @mbk for his work and efforts in creating this. I thought it may be difficult to make the changes to my Thermostat Bridge Node sketch to implement this, but I was quite wrong. After not finding a solution to my setpoint issue for my thermostat, I decided to have a go at this.

      My findings on this can be found in my other thread, https://forum.mysensors.org/topic/5660/thermostat-bridge-hvac-node-issues/3

      posted in Vera
      dbemowsk
      dbemowsk
    • RE: 💬 Easy/Newbie PCB for MySensors

      So I have one more flaw to point out in the board that I didn't notice before. I also have a question regarding powering the nano. I'll start with the problem and this is for @sundberg84 . Some weeks back I posted some suggestions and differences that I noticed in the revisions of the boards. This was the pic:
      alt text
      When I posted that, you noted that for the capacitors, the G denotes ground. If you look at the blue board on the right which is the one that I have, you have the G marked on the left leg of the capacitor. If you measure continuity from that pin to the large ground tab for incoming power, you will notice that that is not ground. The one on the right is. Since I got the boards, I have always teeted for continuity for my ground legs, so I haven't had any issues, but for a newbie, which is what the board is geared toward, there could be issues.

      Now on to my question regarding power. So I am building another node and I am using the 5 volt version of a Recom power module alt text.
      Seeing that this is a 5 volt output, I would think I should be able to go directly to the 5 volt in on the nano, but what is the best way to wire this if I am using a screw terminal connector to bring my power in? The RAW power pad goes to the regulator input on the nano, and the PWR pad goes to the battery booster which I am not using. I would also guess that I would need to jumper the BAT pads. Would I then too want to remove the regulator from the nano, or won't that matter?

      Any help is appreciated.

      posted in OpenHardware.io
      dbemowsk
      dbemowsk
    • RE: MySensors weather station

      @sundberg84 I have some of your new Rev 9 boards that I got recently that I will most likely be using for this project. Kudos on the boards.

      posted in Enclosures / 3D Printing
      dbemowsk
      dbemowsk
    • RE: MultiSensor - relays, temp, hum, PIR, gesture with various controller overrides

      @Ben-Andrewes This is really easy. The code for the debug is like this:

      //define this at the top of your sketch
      #define MY_DEBUG
      
      ....other code....
      #ifdef MY_DEBUG
      ...your debug code here....
      #endif
      

      Then if you comment out the define at the top of the sketch, all of the debug code is ignored when compiling. Change MY_DEBUG to whatever name you want if you want to only block out certain bits of code at compile time.

      posted in Development
      dbemowsk
      dbemowsk
    • RE: Thermostat bridge/HVAC node issues

      So through some trial and error, I have made some progress on this. I don't have things 100% the way I would want them, but I have the basics working for now. I was able to get the setpoint working on the default display. It took some tweaking of the L_Arduino.lua file to do it.

      What I figured out is that the D_HVAC_ZoneThermostat1.xml and D_HVAC_ZoneThermostat1.json files were most likely designed for thermostats that work off of a single setpoint value, and internally determine whether that value needs to be a heating or cooling setpoint. I would assume that it would be determined based off of the current mode (Heat or Cool). In the L_Arduino.lua file for MySensors stuff, there is only 2 setpoint serviceIds, urn:upnp-org:serviceId:TemperatureSetpoint1_Heat or urn:upnp-org:serviceId:TemperatureSetpoint1_Cool. What was needed was a single non-biased setpoint serviceId urn:upnp-org:serviceId:TemperatureSetpoint1. I knew that I was going to have to deal with that value being passed both from and to the node. As for the values coming from the node, I modified the "setVariableIfChanged" function and added the following lines:

      	if ((serviceId == "urn:upnp-org:serviceId:TemperatureSetpoint1_Heat") or (serviceId == "urn:upnp-org:serviceId:TemperatureSetpoint1_Cool")) then
      		luup.variable_set("urn:upnp-org:serviceId:TemperatureSetpoint1", name, value, deviceId)
      	end
      

      The new function looks like this:

      --
      -- Update variable if changed
      -- Return true if changed or false if no change
      --
      function setVariableIfChanged(serviceId, name, value, deviceId)
          log(serviceId ..","..name..", "..value..", ".. deviceId)
          local curValue = luup.variable_get(serviceId, name, deviceId)
          
          if ((value ~= curValue) or (curValue == nil) or (serviceId == "urn:micasaverde-com:serviceId:SceneController1")) then
              luup.variable_set(serviceId, name, value, deviceId)
      	if ((serviceId == "urn:upnp-org:serviceId:TemperatureSetpoint1_Heat") or (serviceId == "urn:upnp-org:serviceId:TemperatureSetpoint1_Cool")) then
      		luup.variable_set("urn:upnp-org:serviceId:TemperatureSetpoint1", name, value, deviceId)
      	end
      	return true
              
          else
              return false
              
          end
      end
      

      Then, for the outgoing side of things to send the new setpoint value to the node when changed from Vera I have added the following line to both the SetpointHeat and SetpointCool functions:

      sendCommand(luup.devices[device].id,"HVAC_SETPOINT",NewCurrentSetpoint)
      

      The new functions look like this:

      -- Heater commands
      function SetpointHeat(device, NewCurrentSetpoint)
      	sendCommand(luup.devices[device].id,"HVAC_SETPOINT_HEAT",NewCurrentSetpoint)
      	sendCommand(luup.devices[device].id,"HVAC_SETPOINT",NewCurrentSetpoint)
      	luup.log("New Current SetPoint Heat " .. NewCurrentSetpoint)
      end
      
      function SetpointCool(device, NewCurrentSetpoint)
      	sendCommand(luup.devices[device].id,"HVAC_SETPOINT_COOL",NewCurrentSetpoint)
      	sendCommand(luup.devices[device].id,"HVAC_SETPOINT",NewCurrentSetpoint)
      	luup.log("New Current SetPoint Cool " .. NewCurrentSetpoint)
      end
      

      The last thing was to add the new variable type to both the L_Arduino.lua file and to my sketch for my node. On the lua side I added this to the tVarTypes array:

      HVAC_SETPOINT = {54, "urn:upnp-org:serviceId:TemperatureSetpoint1", "CurrentSetpoint", "" }
      

      This required a corresponding V_HVAC_SETPOINT variable type in the sketch:

      const int V_HVAC_SETPOINT = 54;
      

      I had then added this to my receive function in the sketch:

       if (message.type == V_HVAC_SETPOINT) {
           setPoint = String(atof(message.data), 0);
           SendCmd("SP=" + setPoint + " R=1");
        } //End V_HVAC_SETPOINT
      

      Since my thermostat has a single setpoint option that makes the determination whether it should be a heating or cooling setpoint, I didn't have to worry about making that determination in my sketch.

      I can now see and control my thermostat setpoint within Vera, and also set the thermostat using my Amazon Echo. My suggestion would be to add the new variable types found in my sketch as standards within MySensors for use with S_HVAC. The changes to the L_Arduino.lua file, or a suitable variation of that, should also be made standard.

      posted in Vera
      dbemowsk
      dbemowsk