Navigation

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

    Topics created by vladimir

    • vladimir

      Improvement Xiaomi smart kettle (I need help!)
      Development • • vladimir  

      10
      0
      Votes
      10
      Posts
      3645
      Views

      mattess

      @vladimir Hello, are there any kettles to buy, that have on/off function enabled via bluetooth? Xiaomis newer models maybe?
    • vladimir

      Rule for dimmer and LED strip
      OpenHAB • • vladimir  

      2
      0
      Votes
      2
      Posts
      1103
      Views

      hard-shovel

      @vladimir Are you looking for something similar to the following: rule "Rule Dimmer to Color Item Brightness" // TestDimmer121 is the item name of the dimmer value // Mock_RGB_Color_x is the Item name of the color strip // Openhab sends color data as Hue, Saturation, Brightness Data when Item TestDimmer121 changed then logInfo("rules","Dimmer to Color conversion Received " +TestDimmer121.state ) var PercentType BrightnessfromDimmer= TestDimmer121.state var HSBType currentState = Mock_RGB_Color_x.state as HSBType var DecimalType CurrentHue = currentState.hue var PercentType CurrentSaturation = currentState.saturation var PercentType CurrentBrightness = currentState.brightness logInfo("rules","HSBtype " + currentState) Mock_RGB_Color_x.sendCommand(new HSBType(CurrentHue,CurrentSaturation,BrightnessfromDimmer)) logInfo("rules","HSBtype NEW " +Mock_RGB_Color_x.state.toString) end You did not post your item names, so you need to change to suit. I do not have a HSB lamp node to physicaly test on, so i have only been checking the openhab logs.
    • vladimir

      Problem with dimmable LED actuator with encoder
      Development • • vladimir  

      17
      0
      Votes
      17
      Posts
      2742
      Views

      iguaan

      Hi, i have similar problem with domoticz and mysensors. Firstly, i can't get current dim level from domoticz on startup. Secondly if i start arduino and controll it over domoticz only, dimming and on/off works. If i turn the rotary knob, domoticz commands won't work. In serial monitor i see that new dim value has been received: Serial.print("Fading level: "); Serial.println(dimValue); but output doesn't change. If i turn knob on rotary, value in domoticz changes. I removed eeprom writes and rotary button. Only dims to off/on or domoticz commands off/on. Domoticz 4.10171, Mysensors 2.3.1, ide 1.8.10 // Enable debug prints to serial monitor #define MY_DEBUG #define MY_RADIO_RF24 #define MY_NODE_ID 10 #define MY_REPEATER_FEATURE #define MY_TRANSPORT_WAIT_READY_MS 10 //ajaviide ms, kuni läheb tööle ilma serverita #include <MySensors.h> #include <Encoder.h> #define KNOB_ENC_PIN_1 5 // Rotary encoder input pin 1 #define KNOB_ENC_PIN_2 4 // Rotary encoder input pin 2 #define SEND_THROTTLE_DELAY 500 // Number of milliseconds before sending after user stops turning knob #define CHILD_ID_Light 1 #define SN "DimmableLED" #define SV "1.1" #define LED_PIN 3 // Arduino pin attached to MOSFET Gate pin #define FADE_DELAY 10 // Delay in ms for each percentage fade up/down (10ms = 1s full-range dim) int dimValue; int fadeTo; int fadeDelta; bool changedByKnob = false; bool sendDimValue = false; unsigned long lastFadeStep; unsigned long sendDimTimeout; //char convBuffer[10]; static int16_t currentLevel ; // Current dim level... MyMessage dimmerMsg(CHILD_ID_Light, V_DIMMER); MyMessage lightMsg(CHILD_ID_Light, V_LIGHT); Encoder knob(KNOB_ENC_PIN_1, KNOB_ENC_PIN_2); /*** Dimmable LED initialization method */ void setup() { // Pull the gateway's current dim level - restore light level upon node power-up request( CHILD_ID_Light, V_DIMMER); // wait(3000); } void presentation() { // Register the LED Dimmable Light with the gateway present(CHILD_ID_Light, S_DIMMER ); sendSketchInfo(SN, SV); } /*** Dimmable LED main processing loop */ void loop() { // Check if someone turned the rotary encode checkRotaryEncoder(); // Fade light to new dim value fadeStep(); } void receive(const MyMessage &message) { if (message.type == V_STATUS || message.type == V_PERCENTAGE) { // Retrieve the power or dim level from the incoming request message fadeTo = atoi( message.data ); // Adjust incoming level if this is a V_LIGHT variable update [0 == off, 1 == on] fadeTo *= ( message.type == V_LIGHT ? 100 : 1 ); // Clip incoming level to valid range of 0 to 100 fadeTo = fadeTo > 100 ? 100 : fadeTo; fadeTo = fadeTo < 0 ? 0 : fadeTo; //startFade(); Serial.print("New light level received: "); Serial.println(fadeTo); if (!changedByKnob) knob.write(fadeTo << 1); //### need to multiply by two (using Shift left) // Cancel send if user turns knob while message comes in changedByKnob = false; sendDimValue = false; // Stard fading to new light level startFade(); // // Inform the gateway of the current DimmableLED's SwitchPower1 and LoadLevelStatus value... // send(lightMsg.set(dimValue > 0)); // // // hek comment: Is this really nessesary? // send( dimmerMsg.set(dimValue) ); } } void checkRotaryEncoder() { long encoderValue = knob.read() >> 1 ; //### Divide by 2 (using shift right) if (encoderValue > 100) { encoderValue = 100; knob.write(200); //### max value now 200 due to divide by 2 } else if (encoderValue < 0) { encoderValue = 0; knob.write(0); } if (encoderValue != fadeTo) { fadeTo = encoderValue; changedByKnob = true; startFade(); } } void startFade() { fadeDelta = ( fadeTo - dimValue ) < 0 ? -1 : 1; lastFadeStep = millis(); } // This method provides a graceful none-blocking fade up/down effect void fadeStep() { unsigned long currentTime = millis(); if ( dimValue != fadeTo && currentTime > lastFadeStep + FADE_DELAY) { dimValue += fadeDelta; analogWrite( LED_PIN, (int)(dimValue / 100. * 255 ) ); lastFadeStep = currentTime; Serial.print("Fading level: "); Serial.println(dimValue); if (fadeTo == dimValue && changedByKnob) { sendDimValue = true; sendDimTimeout = currentTime; } } // Wait a few millisecs before sending in new value (if user still turns the knob) if (sendDimValue && currentTime > sendDimTimeout + SEND_THROTTLE_DELAY) { // We're done fading.. send in new dim-value to controller. // Send in new dim value with ack (will be picked up in incomingMessage) send(dimmerMsg.set(dimValue)); // Send new dimmer value and request ack back sendDimValue = false; } }```
    • vladimir

      1 LED strip node and 2 dimmer nodes
      Development • • vladimir  

      3
      0
      Votes
      3
      Posts
      748
      Views

      vladimir

      @tsjoender Thanks for the advice! I'll try to implement the second option.
    • vladimir

      RGB LED strip (share your code)
      Development • • vladimir  

      1
      0
      Votes
      1
      Posts
      957
      Views

      No one has replied

    • vladimir

      Managing the color of multiple RGB LED nodes
      OpenHAB • • vladimir  

      7
      0
      Votes
      7
      Posts
      1722
      Views

      vladimir

      @silex Wow! Super! Thank you!
    • vladimir

      Uninterruptible power supply for the node
      Hardware • • vladimir  

      3
      0
      Votes
      3
      Posts
      1043
      Views

      NeverDie

      This: https://www.amazon.com/gp/product/B00NTQYUA8/ref=oh_aui_search_detailpage?ie=UTF8&psc=1 I use it as the UPS for a Raspberry Pi running Octoprint. The built-in 5v USB connector is enough to run the Raspberry. And you get surge protection too. Ooops. I just noticed that you meant for the nodes, not for the gateway. Sorry. A lot of sensor nodes can run for many years, maybe even decades, on just two or three AAA's. It's rarely an issue if they're well designed.
    • vladimir

      Problems with the Raspberry Pi gateway
      Troubleshooting • • vladimir  

      16
      0
      Votes
      16
      Posts
      1759
      Views

      mfalkvidd

      @gfink great work, thanks for reporting back
    • vladimir

      Which dust sensor do you use and why?
      Hardware • • vladimir  

      22
      0
      Votes
      22
      Posts
      4877
      Views

      NeverDie

      @korttoma Adafruit library. It communicates over UART.
    • vladimir

      The temperature and humidity sensor sends only humidity. Please help me understand.
      OpenHAB • • vladimir  

      10
      0
      Votes
      10
      Posts
      1489
      Views

      bgunnarb

      I agree with @mfalkvidd. This is not due to the sensor code but this is the way OH handles the data. I'm using OH but the MQTT 1.x binding that does not support discovery. I manually define three logical devices, temp, hum and batt in the .items file. I think this is the expected behaviour of OH. If you want them presented as one device you could combine the measurements into one string by using a rule and do some string manipulation. I do this to combine wind speed and direction into one string.
    • vladimir

      Please help! Arduino UNO + RFM69HW (TSM:INIT:TSP FAIL)
      Hardware • • vladimir  

      23
      0
      Votes
      23
      Posts
      3201
      Views

      vladimir

      @gohan Thanks for clarifying!
    • vladimir

      Installing Mysensors library via SSH on Openhabian
      OpenHAB • • vladimir  

      1
      0
      Votes
      1
      Posts
      753
      Views

      No one has replied

    • vladimir

      Installation instruction OpenHAB2 + MQTT gateway
      OpenHAB • • vladimir  

      11
      0
      Votes
      11
      Posts
      5797
      Views

      haggis

      @haggis https://forum.mysensors.org/topic/3605/can-t-get-openhab2-to-see-my-mqtt-messages/3
    • vladimir

      MQTT Gateway + wi-fi instead of ethernet
      Controllers • gateway mqtt wi-fi • • vladimir  

      4
      0
      Votes
      4
      Posts
      2949
      Views

      daulagari

      Although it should not be too difficult to make the MQTT Gateway with WiFi work on hardware and software level it is a bad idea on system level: WiFi and MySensensor NRF24L01+ use the same 2.4 GHz band and with the antennas close a transmit from one will block the other and vice-versa.
    • vladimir

      Connect humidity sensor to OpenHAB
      OpenHAB • sensor humidity openhab openhab mqtt connecting • • vladimir  

      4
      0
      Votes
      4
      Posts
      3153
      Views

      Xander

      @vladimir No, I use a WIZ5100 module. Search the forum. Many users (try) :-)) to use ENC28J60.