Skip to content

Domoticz

322 Topics 2.3k Posts
  • Add radio NRF24 to sketch

    2
    0 Votes
    2 Posts
    1k Views
    sundberg84S
    @jordantheripper Hi! Check this out: https://www.mysensors.org/about/arduino#basic-structure-of-sketches You can also check out any example in https://www.mysensors.org/build to get an idea how it should be written. Its very easy, just give it a try.
  • How to send serial commands (v_var) from Domoticz to serial gateway

    2
    0 Votes
    2 Posts
    2k Views
    I
    @Inso - you can eventually register a few TEXT devices with one of your Arduino sensors, like: present(LCD_LINE1_CHILD_ID, S_INFO, LCD_LINE1); then periodically ask data back from Domoticz like: if (!line1received) { request(LCD_LINE1_CHILD_ID, V_TEXT); #if DEBUG == 1 Serial.println("Requested line1 from gw !"); #endif wait(5000, 2, V_TEXT); // wait for 5s or until a message of type V_TEXT is received } just define this first: bool line1received = false; For more details on the DzVents (2.4x) side have a look in the Domoticz installation folder, there are a few good DzVents examples, this is the path in Windows7: C:\Program Files (x86)\Domoticz\scripts\dzVents\examples Hope it helps ...
  • 0 Votes
    8 Posts
    2k Views
    gohanG
    you could then start adding the switches as S_Binary and use some rules in Domoticz to activate scenes where you can set the dimmers values. In the sketch i'd present the different sensors by hand so you can have a better control on the child IDs
  • Requesting value from Domoticz

    39
    0 Votes
    39 Posts
    13k Views
    alowhumA
    For anyone finding this: in the end I changed the V_TEXT value in a MySensors node in Domoticz by creating a Blockly that calls an API URL that updates the text value. 192.168.1.30:8080/json.htm?type=command&param=udevice&idx=18&nvalue=0&svalue=awesomeness Replace the IP address, idx value with the node ID number in domoticz, and 'awesomeness' with your values. // UPDATE: The Aurora theme now makes this even easier. Just clock on the value in the Domoticz interface, and change it. So: utility page -> click on the text value -> change it -> click outside of the text to save the change.
  • Z-wave question

    6
    0 Votes
    6 Posts
    2k Views
    raptorjrR
    @bjacobse Thank you for the links.
  • Error Sending switch command

    57
    0 Votes
    57 Posts
    26k Views
    F
    I read this post yesterday and today I solved it. My GW was restarting as soon as I was sending a command to a MYS node with dimmer child. I am using nRF PA-LNA, with extra power supply, PA_HIGH. Domoticz 3.8795, MYS 2.1.1. Nano as serial GW. Tried PA_LOW, new nRF but that didn't help. Today I found the solution, I disabled DEBUG in GW and now I can't reproduce any restarts.
  • Domoticz data timeout

    24
    0 Votes
    24 Posts
    7k Views
    K
    @gbuico USB to TTL serial is on board on NodeMCU and Wemos. Download ESPEasy mega dev.13 Upload to your NodeMCU using "FlashESP8266.exe" from .zip Upload to NodeMCU Use "....._normal_4096.bin" file Power off - on !!! your NodeMCU ( reconnect USB cable ) Make basic setup: With smart phone or notebook connect to your NodeMCU, which works like wifi acces point now ( name like "ESP_Easy_0" ) If password required - "configesp" Type in browser address 192.168.4.1 wifi setup Set your home wifi access info in config page. You will see actual IP your NodeMCU in your wifi network. Connect to this IP and make basic setup. ( you can set Fixed IP, IP of your Domoticz, etc ) ESPEasy setup
  • Problem with IRSensor and Domoticz

    4
    0 Votes
    4 Posts
    2k Views
    M
    Since my last message here is the result of my last tests: Test 1 upload of the scketch without any modification from the site "MYSensor". In Domoticz's log: -discover the node: 2018-01-06 11:25:42.251 MySensors: Node: 5, Sketch Name: IR Rec/Playback 2018-01-06 11:25:42.252 MySensors: Node: 5, Sketch Version: 2.0 -at the touch of the "1" key of the remote control registered in 20: 018-01-06 11:25:49.388 (Mysensor) Light/Switch (IR Command) -appearance of a new device MYSensor -and in serial monitor of the Arduino IDE: Received : 1 RC5 801 (12 bits) Found code for preset #20 TSP:MSG:SEND 5-5-0-0 s=2,c=1,t=33,pt=1,l=1,sg=0,ft=0,st=ok:20 When I activate the device -in Domoticz's log: 2018-01-06 11:26:55.759 User: Admin initiated a switch command (157/IR Command/Off) 2018-01-06 11:26:55.760 Error: MySensors: Light command received for unknown node_id: 20 and "error sending command to the switch, please verify device/hardware" -No events in serial monitor of the Arduino IDE. Test 2 I made a new installation of Domoticz with the image "domoticz-raspberrypi-sdcard-4834.img". Domoticz faith configured, I added my MySensor gateway alone without any other hardware, after discovering the node and adding the device to the switches, an action on this device and there oh miracle, it works!:+1: Then I updated Domoticz to version 3.8153 and after that the device does not work anymore!:white_frowning_face: and "error sending command to the switch, please verify device/hardware"
  • different information

    9
    0 Votes
    9 Posts
    2k Views
    M
    Yes, sleep is the equivalent to wait if you want to put the arduino to sleep. If it fixed it, wait should too.
  • V_LEVEL in Domoticz [resolved]

    15
    0 Votes
    15 Posts
    2k Views
    M
    @alexsh1 Great! Many thanks for reporting back!
  • Push variable from domoticz to node?

    4
    0 Votes
    4 Posts
    1k Views
    D
    @gohan Thanks, dimmer works well.
  • Dimmable LED help needed !

    8
    0 Votes
    8 Posts
    3k Views
    PlantexP
    @Boots33 I think I wasn't precise enough. So below the sketch which is working fine but for one LED stripe. It remembers the last dimmer value. I 've changed it a little bit. It works better for me to receive and display in Domoticz a % dimmer value info instead of information ON/OFF send(lightMsg.set(dimmerSetting > 0 ? 1 : 0), false) changed to send(dimmerMsg.set(dimmerSetting)); Now my target is to use the maximum quantity of PWM pins in Arduino MEGA (in total I need 16 so I think I am gonna need two Arduinos) Anyway could You help me please to add extra LEDs into this sketch ? // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #define MY_RF24_CE_PIN 49 #define MY_RF24_CS_PIN 53 #include <MySensors.h> #define SN "Dimmable_LED" #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) static int16_t currentLevel = 0; // Current dim level... int dimmerSetting = 10 ; MyMessage dimmerMsg(0, V_PERCENTAGE); MyMessage lightMsg(0, V_STATUS); /*** * Dimmable LED initialization method */ void setup() { // Pull the gateway's current dim level - restore light level upon sendor node power-up //request( 0, V_PERCENTAGE ); } void presentation() { // Register the LED Dimmable Light with the gateway present( 0, S_DIMMER ); sendSketchInfo(SN, SV); } /*** * Dimmable LED main processing loop */ void loop() { } void receive(const MyMessage &message) { switch (message.type) { case V_STATUS: // message is from the switch if(message.getBool()){ fadeToLevel( dimmerSetting ); // turn light on at current dimmer level } else fadeToLevel( 0 ); // fade light to 0 (off) break; case V_PERCENTAGE: // message is from the dimmer dimmerSetting = message.getInt(); // get the new dimmer setting from the message fadeToLevel( dimmerSetting ); // fade to the new dimmer setting send(dimmerMsg.set(dimmerSetting)); // send switch state to controller , no ack requested break; } } /*** * This method provides a graceful fade up/down effect */ void fadeToLevel( int toLevel ) { int delta = ( toLevel - currentLevel ) < 0 ? -1 : 1; while ( currentLevel != toLevel ) { currentLevel += delta; analogWrite( LED_PIN, (int)(currentLevel / 100. * 255) ); wait( FADE_DELAY ); } }
  • NodeManager, Domoticz, SmartSleep - how to use?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Newbie. Problems with Password on Domoticz. Help!

    4
    0 Votes
    4 Posts
    5k Views
    dbemowskD
    @Purclewan Great. Glad you found the fix. Welcome to the community. If you have any other issues, there is a great team of people in her that can help with pretty much any problem you run into, so don't be afraid to post. They say that the only dumb question is the one that is not asked.
  • help modify code

    1
    0 Votes
    1 Posts
    652 Views
    No one has replied
  • Hardware shows node values updated - Device view does not

    14
    2
    0 Votes
    14 Posts
    3k Views
    W
    So, got my ESP8266 and set it up as the ethernet gateway. Removed the on-board RPi gateway. Domoticz picked up the new gateway easily enough (this has never been an issue). Now, turned on my nodes (with static nodeIDs) and the gateway picked up one of the two nodes (why? no idea). Sent presentation to gateway then to Domoticz. Domoticz sees the humidity sensor as S_UNKNOWN but with V_HUM values???? I have no idea what is happening. The ESP gateway log shows the sensor as S_HUMIDITY just fine. So, this is a new wrinkle. But the same issue persists - temp/hum updated on the Hardware view of the gateway but Device view of that sensor is never updated from initial state. I am this close to taking the whole system out back with a baseball bat. So, status now: Only 1 of 2 nodes seen by gateway (unique IDs on both) The 1 node values are sent to gateway around every 5 minutes (with new values as tested over night) Domoticz does not update the Device with any new values from initially seen data Gateway serial log is showing updates just fine MYScontroler running on my Windows box also sees the updates just fine OpenHab2 does not see any updated from initially seen data Stress level at 100%
  • Is this scenario possible using domoticz?

    4
    0 Votes
    4 Posts
    4k Views
    P
    @Cliff-Karlsson said in Is this scenario possible using domoticz?: I have a sensor whish can output four different values depending on how the sensor is triggered, how do I send four different values to domoticz and what sensor type do I chose? I want in this example be able to light up four different lightbulbs in domoticz depending on the sensoroutput. I have done this with my heat pump controller. I'm using dimmer and "linking" that to dummy selector what contains the states(0=off, 10=heat by water, 20=heat by room, 30=freeze protection...). Linking is done with LUA: -- -- Heat pump mode selector<>dimmer mapping event -- commandArray = {} selectorName = 'Pumppu_Mode' selectorId = '332' dimmerName = 'Pumppu_ModeSW2' -- selector -> native if(devicechanged[selectorName]) then iDimLevel = tonumber(otherdevices_svalues[selectorName]) commandArray[dimmerName]='Set Level '..iDimLevel end -- native -> selector. (not triggering events this way of calling with UpdateDevice) if (devicechanged[dimmerName]) then if (devicechanged[dimmerName] == 'Off') then commandArray['UpdateDevice'] = selectorId..'|0|0' else iCurrentDimLevel = 0 if(otherdevices[dimmerName] == 'On') then -- can be "On" or something else iCurrentDimLevel = tonumber(otherdevices_svalues[dimmerName]) else iCurrentDimLevel = tonumber(string.match(otherdevices[dimmerName], "Set Level: (%d+) %%")) end commandArray['UpdateDevice'] = selectorId..'|'..iCurrentDimLevel..'|'..iCurrentDimLevel end end return commandArray I would also want to be able to use a local variable and a global variable. Can I somehow "push" a variable from domoticz to the sensor everytime it changes? Create a device to your sketch and use that to handle the "variable". The rest is just scripting in domoticz after that.
  • Data integrity

    4
    0 Votes
    4 Posts
    1k Views
    zboblamontZ
    @mfalkvidd Thank you for that synopsis. I had already looked at most of these threads, but did not focus on them too much as have no experience using node-red, even though familiar with it's history. Node-red is pre-installed on the Pi3, so guess I should try getting to grips with it. @gohan I had already considered using a dedicated Pi3/HDD to handle and locally store time based utility consumption (water, power, gas), as this would avoid interfering with the existing arrangement or performance until switching over and reprogramming the utility nodes. That way, an entirely separate control system/methodology could be deployed, again, node-red seems the recommendation. I had not thought on direct attaching the radio as have an unused Sensebender Gateway (yet to identify why the RFM69 isn't playing nice), but I guess it makes sense and I have both the W and CW chips sitting idle... Cheers, time to do some re-reading...
  • ESP-LINK "just works" with Domoticz

    1
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Getting Domoticz to autoconnect to Mysensors serial (not USB) gateway

    7
    0 Votes
    7 Posts
    3k Views
    dbemowskD
    @zudrmdpt said in Getting Domoticz to autoconnect to Mysensors serial (not USB) gateway: In your deleted post, you said you had a simlink too etc, how did you solve the same issue? with the GPIO->reset pin? No, I actually put a UPS in place. It has been quite a while since I ran that setup, so I can't say for sure if it behaved the same way or not. I do remember putting the UPS in place though.

17

Online

11.7k

Users

11.2k

Topics

113.1k

Posts