Skip to content

My Project

Show off and share your great projects here! We love pictures!
961 Topics 13.4k Posts
  • Recommended hardware for medical alert

    1
    1 Votes
    1 Posts
    33 Views
    No one has replied
  • This topic is deleted!

    1
    3
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • Smartmeter sensors

    17
    2 Votes
    17 Posts
    8k Views
    electrikE
    There are many examples... https://forum.mysensors.org/topic/3764/p1-smart-meter-nta8130-readout-using-mysensors/7 Or on GitHub, needs some tinkering to integrate in mysensors https://github.com/search?l=C%2B%2B&q=P1+meter&type=Repositories Edit There is also a library available https://github.com/matthijskooijman/arduino-dsmr
  • Yet Another MySensors Thermostat (US 24VAC multi wire)

    3
    0 Votes
    3 Posts
    65 Views
    nagelcN
    @TRS-80 I have similar thoughts for a controller for my heater (hot water radiators with an oil boiler and 4 zones). For 1 and 2, I realized I could wire my node into the zone controller. It has a common, so I can derive the node power from the controller. Since it works over radio, it doesn't have to be where the old thermostat was. I have temperature sensors in all the rooms. The node controls 4 solid state relays that are wired in parallel with the existing zone thermostats. That helps with 5. The idea was to set the conventional thermostats at a low value. Then if my node failed, at least the old thermostats would kick the heater on before the pipes started to freeze. Also as a fail safe, if the node has the heat on and doesn't hear from the controller periodically, it will shut off. Still working on that part. As for controlling it, there is a domoticz plug in here: https://www.domoticz.com/wiki/Plugins/Smart_Virtual_Thermostat.html It only works for heat, but the underlying code is pretty straight forward, and it lets you average sensors. There might be something there you can adopt. I ran it with a MySensors modified space heater all last winter and it worked well. Unfortunately, something kept killing the radio on my node, maybe a spike from zone controller relays. I haven't sorted it out yet, so the heater thermostat remains a work in progress.
  • converting a project to mysensors.

    2
    0 Votes
    2 Posts
    73 Views
    TRS-80T
    I am pretty sure there are already some posts about that, did you study those? They will probably be helpful in getting you started. Other than that, post whatever specific problems you run into as you go along, and you will be more likely to get some specific replies.
  • Curtain Control Node.

    domoticz curtain control mysensors node
    51
    8 Votes
    51 Posts
    20k Views
    xydixX
    @adds666 I am still in "testing mode". I had some problems with the node, it stoped receiving messages but did always work with the button. Yesterday i built a new node and uploaded the sketch and it seems to work better. Here is the sketch i use, I changed the pin for the button due to missing digital pins on my pcb. And I am back on using digital pins for the stepper driver for the same reason. I greyed out buttonpin 2. I don't think it is needed. I also greyed out the heartbeat-part as I had problems. Just for testing. Don't know if it is suitable when using Home Assistant. /* PROJECT: MY Sensors curtain controller PROGRAMMER: AWI DATE: march 11, 2016 FILE: AWI stepper1.ino LICENSE: Public domain Hardware: ATMega328p board w/ NRF24l01 and MySensors 2.0 (Development) Special: uses AccelStepper library Summary: Curtain control with stepper motor. Manual operation with 1 push button Calibration with manual button Remarks: Fixed node-id Change log: 20160312 - Cleanup */ // Enable debug prints to serial monitor #define MY_DEBUG #define MY_NODE_ID 8 // fixed node number // Enable and select radio type attached #define MY_RADIO_RF24 #define MY_RF24_PA_LEVEL RF24_PA_HIGH //#define MY_RADIO_RFM69 #include <SPI.h> #include <MySensors.h> // stepper library #include <AccelStepper.h> // http://www.airspayce.com/mikem/arduino/AccelStepper/ #define HALFSTEP 8 // Stepper uses "Halfstep" mode // button library // used for: // - manual open close - single click: close/ stop/ open/ stop // - calibration - after long press: open calibarion- until single press - closed calibration - until single press (stop) #include <Button.h> // https://github.com/JChristensen/Button - Använd gammal version. testat med V0.9 och det funkar #define CHILD_ID 1 // Id of the sensor child #define SN "Curtain control" #define SV "1.0" #define buttonPin1 A0 // Arduino pin connected to buttonPin1 //#define buttonPin2 A0 // Arduino pin connected to buttonPin2 (fixed to ground) // Motor pin definitions #define motorPin1 2 // IN1 on the ULN2003 driver 1 #define motorPin2 3 // IN2 on the ULN2003 driver 1 #define motorPin3 5 // IN3 on the ULN2003 driver 1 #define motorPin4 6 // IN4 on the ULN2003 driver 1 //const unsigned long heartbeatInterval = 1 * 3600UL * 1000UL ; // heartbeatinterval //unsigned long heartbeatCounter = 0 ; // // helper routines to store and retrieve long in mysensors EEPROM union { // used to convert long to bytes for EEPROM storage long longInt; uint8_t LongByte[4]; } convLongInt ; void saveStateL(int EEposition, long StateL){ convLongInt.longInt = StateL ; for (int y = 0; y < 4 ; y++){ // convert to bytes saveState(EEposition + y , convLongInt.LongByte[y]) ; } Serial.print("State saved: "); Serial.println(StateL); } long loadStateL(int EEposition){ for (int y = 0; y < 4 ; y++){ // convert from bytes convLongInt.LongByte[y] = loadState(EEposition + y) ; } Serial.print("State read: "); Serial.println(convLongInt.longInt); return convLongInt.longInt ; } // Initialize with pin sequence IN1-IN3-IN2-IN4 for using the AccelStepper with 28BYJ-48 AccelStepper stepper1(HALFSTEP, motorPin1, motorPin3, motorPin2, motorPin4); // Initialize button active low, debounce and internal pull-up Button myBtn(buttonPin1, true, true, 40); // Initiate the button (pin, pull_up, invert, debounce_ms) MyMessage percentageMsg(CHILD_ID, V_PERCENTAGE); // used to send updates to controller const long maxRun = 4000000L ; // maximum runway long setPosition = 0 ; // remembers set position, need to be saved in EEPROM const int setPositionEE = 4 ; // eeprom location long openPosition = 0 ; // Position at open, need to be saved in EEPROM? const int openPositionEE = setPositionEE + 4 ; // eeprom location long closedPosition = 120000UL ; // Position at full close, need to be saved in EEPROM const int closedPositionEE = openPositionEE + 4 ; // eeprom location unsigned long idleTimer = millis() ; // return to idle timer unsigned long idleTime = 100000UL ; // return to idle after 100 secs unsigned long printTimer = millis() ; // print timer unsigned long printTime = 1000UL ; // print after 1 secs enum position_t {Open, Close, Idle, Running} ; position_t lastDirection = Open ; // lastDirection only for buttonpress position_t runStatus = Idle ; // indicates current status for running motor. used for status reporting to controller enum State_t {sIdle, sCalibrateOpen, sCalibrateClose} ; State_t State = sIdle ; void setup() { // setup buttons pinMode(buttonPin1, OUTPUT); stepper1.setMaxSpeed(1000.0); stepper1.setAcceleration(1000.0); //saveStateL(closedPositionEE, closedPosition) ; // INIT: save closed position in EEPROM closedPosition = loadStateL(closedPositionEE) ; // need to get last values from EEPROM and assume the current position is correct setPosition = loadStateL(setPositionEE) ; stepper1.setCurrentPosition(setPosition ); }//--(end setup )--- void presentation() { present(CHILD_ID, S_COVER, "Curtain"); // Window Cover sub-type, commands: V_UP, V_DOWN, V_STOP // Register the LED Dimmable Light with the gateway sendSketchInfo(SN, SV); } void loop() { unsigned int now = millis() ; // current time for loop // simple state machine for button press myBtn.read(); switch (State) { // Idle state, waiting for some action // - button press // - idleTimer case sIdle: if (myBtn.wasReleased()){ // idle Serial.println("Button release") ; // if running stop if (stepper1.isRunning()){ setPosition = stepper1.currentPosition(); stepper1.moveTo(setPosition) ; // move to current position (was already there..) } else if (lastDirection == Open) { stepper1.moveTo(closedPosition) ; lastDirection = Close ; } else { // lastDirection == Close stepper1.moveTo(openPosition) ; lastDirection = Open ; } } else if (myBtn.pressedFor(3000)){ // move to calibratete state with long press Serial.println("Button press long") ; idleTimer = now ; // return to idle after ... State = sCalibrateOpen ; stepper1.move(-maxRun) ; // let the stepper open with maximum } break ; // if not running and last action was open close ; else open // if longpress Calibrate open case sCalibrateOpen: // calibration going on if (myBtn.wasPressed()){ stepper1.setCurrentPosition(0 ); // set new 0 position ?? openPosition = setPosition = 0 ; State = sCalibrateClose ; // next is close calibarion stepper1.move(maxRun) ; // let the stepper close with maximum } else if (now > idleTimer + idleTime) { // timer expired -> abort calibration State = sIdle ; } break ; case sCalibrateClose: // calibrate closed position, end with keypress if (myBtn.wasPressed()) { closedPosition = setPosition = stepper1.currentPosition() ; saveStateL(closedPositionEE, closedPosition) ; // save closed position in EEPROM State = sIdle ; stepper1.moveTo(openPosition) ; // return to open after calibration } else if (now > idleTimer + idleTime) { // timer expired -> abort calibration State = sIdle ; } break ; default : break ; } // power off stepper if not running (no need to reenable)) if (!stepper1.isRunning()){ if (runStatus != Idle){ // there was a change in runningstatus, so report to controller setPosition = stepper1.currentPosition() ; // store in EEPROM and report ready to controller saveStateL(setPositionEE, setPosition) ; send( percentageMsg.set((100 * setPosition)/(closedPosition - openPosition))) ; runStatus = Idle ; } stepper1.disableOutputs(); } else { runStatus = Running ; } stepper1.run(); /* if (printTimer++ > now + printTime){ printTimer = now ; Serial.println(stepper1.currentPosition()); } */ } // This is called when a message is received void receive(const MyMessage &message) { // We only expect few types of messages from controller, check which switch (message.type) { case V_PERCENTAGE: // Curtain should be opened stepper1.moveTo(message.getInt() * (closedPosition - openPosition)/100); Serial.print("Message: "); Serial.print(message.sensor); Serial.print(" , value: % "); Serial.println( message.getInt()); Serial.print("Moving to: "); Serial.println(message.getInt() * (closedPosition - openPosition)/100); break ; case V_STATUS: // Curtain should be opened or closed full stepper1.moveTo((message.getInt() == HIGH)?openPosition:closedPosition); Serial.print("Message - valid: "); Serial.print(message.sensor); Serial.print(" , value: % "); break ; default : // not recognizable message Serial.print("Message - valid: "); Serial.print(message.sensor); Serial.print(", Unrecognized "); break ; } }
  • 0 Votes
    36 Posts
    23k Views
    MasMatM
    I found this old thread and since I have a Vallox machine it's interesting. RS485 is new to me but MySensors isn't. Can I have a node like this described by Heinz parallel with the "mickey mouse"-display? Using the display's connector? Or is it one or the other? I'd feel better having both (manual display&buttons and connection to MySensors=>Domoticz, in my case).
  • Mi-Light controller for Mysensors

    69
    8 Votes
    69 Posts
    38k Views
    rejoe2R
    @OliverDog You may have a look at https://github.com/sidoh/esp8266_milight_hub. It uses basically the same hardware as a normal MySensors Wifi-GW and is able to receive and send (most) of the MiLight-Codes. I'm using the MQTT interface offered by the hub not only to translate MiLight-V5-protocol type of remote codes not only to control V4-protocol type of rgbw bulbs (which seems to be close to your request), but also to set shutter levels or even control my mpd... Obviously, this nees some additional coding on controller side (FHEM in my case).
  • Framework multi sensor/actuator

    2
    2 Votes
    2 Posts
    1k Views
    pw44P
    any update? did it evolved? Thx in advance.
  • Slim Node as a Mini 2AA Battery PIR Motion Sensor

    36
    10 Votes
    36 Posts
    25k Views
    m26872M
    @Sven-0 Fun to see this old topic again. And also the coincidence, since my visits here have been rare for a long time. :disappointed: Anyway, I'm running a few slimnodes since the beginning and have both good and bad experiences. In general, the battery lifetime is your least concern. Instead I have had issues with sensors, sensitivity, switch contact corrosion, mechanical robustness, wifi interference, repaeter, gateway, controller, waf, kids, animals, etc, etc. Regarding this particular PIR slimnode it's very stable, but it is not universal for every situation due to the limited range and missing sinsitivity adjustment. E.g I can't use it too near my basement windows due to the moving cold air. And in my living room I have sun reflections to deal with. I suggest you start by building a testnode to check if it works for your conditions.:slot_machine: A recent PIR-slimnode battery life example; My hallway one died last week after 33 months and around 6000 trips/month.:muscle:
  • 0 Votes
    2 Posts
    47 Views
    J
    I finished the gateway some time ago. here are some pictures [image: 1594132733378-img_20200430_125142-resized.jpg] [image: 1594132732988-img_20200430_124702-resized.jpg] [image: 1594132733019-img_20200430_122710-resized.jpg]
  • My 2AA battery sensor

    90
    7 Votes
    90 Posts
    107k Views
    P
    I got it from CPC in the UK which are owned by Farnell https://cpc.farnell.com/hammond/1593qgy/case-with-bat-compart-110x66x28mm/dp/EN82140 You may have to make a slight mod to the board or enclosure to make it fit. good luck
  • Question about MySensors features

    beginner sensor features
    5
    0 Votes
    5 Posts
    74 Views
    Puneit ThukralP
    @IronFelix I would not combine so many inputs and outputs in one sketch. But I think if there is enough memory for variables ; then it is possible to go for sensing (step by step) for a combination of sensors. Similarly for buttons, actuators, use a separate hardware.
  • I have some question

    1
    0 Votes
    1 Posts
    34 Views
    No one has replied
  • Geiger counter + temp.sensors

    1
    2
    1 Votes
    1 Posts
    117 Views
    No one has replied
  • Simple irrigation controller

    3
    2
    1 Votes
    3 Posts
    302 Views
    TmasterT
    @markjgabb said in Simple irrigation controller: hey @Tmaster are you still using this solution? have you made any improvements or come across any issues with using it over time? Hello.still working good exept on winter that was disabled. Last summer worked until october without any fail.
  • P1 Smart Meter (NTA8130) readout using Mysensors

    7
    2 Votes
    7 Posts
    7k Views
    Oleg VladimirovO
    thank you for sharing, it's really useful. Very nice thread!
  • Gateway ESP8266

    9
    0 Votes
    9 Posts
    91 Views
    mfalkviddM
    Nice work @ryolaxe thanks for reporting back.
  • cubecell connectin

    1
    0 Votes
    1 Posts
    29 Views
    No one has replied
  • 2gang in wall dimmer with touch sensors

    5
    6 Votes
    5 Posts
    2k Views
    C
    I would be interested in the project, it is still working

37

Online

11.7k

Users

11.2k

Topics

113.1k

Posts