Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
SushukkaS

Sushukka

@Sushukka
About
Posts
54
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Domoticz V_TEXT sensor now bidirectional
    SushukkaS Sushukka

    YEEEEEEESSSSHHH!!! This is now implemented in Domoticz!
    https://github.com/domoticz/domoticz/issues/2380

    You can change the V_TEXT sensor value in Domoticz via JSON, Scripts and Blocky and the update will be sent directly to the node without any hacks!!! This is big update; you can pass lots of information, parameters etc directly to the nodes without extra steps and work-arounds. LCD screen updates, speech-to-text commands, parameter/code driven nodes...now we just need bigger payload size for MySensors... 😄

    Edit: Just remember when updating that you may need to change your old sketches + tricks and hacks because you now get the V_TEXT update twice if you have the old hacks active.

    Domoticz

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    YEEEEEEESSSSHHH!!! This is now implemented in Domoticz!
    https://github.com/domoticz/domoticz/issues/2380

    You can change the V_TEXT sensor value from Domoticz via JSON, Scripts and Blocky and the update will be sent directly to the node without any hacks!!! This is big update; you can pass lots of information, parameters etc directly to the nodes without extra steps. And @alowhum you don't need that poll anymore in the sketch. :) LCD screen updates, speech-to-text commands...now we just need bigger payload size for MySensors... :D

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    Here is the latest update:
    https://github.com/domoticz/domoticz/issues/2380
    At least got some response...do it yourself.
    Darn sad: a good, reliable and widely-used product, but the developers are just pricks or don't give shit. With better attitude this could be so much more and most likely there would be lots of more contributors helping with them.

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    @monte I fully agree with this. I have tried to get some explanation to this V_TEXT problem through multiple channels and no one is really answering anything. Either the developers have dumped the whole project or are just nasty dwarfs in a cave. GitHub shows some activity but the project seems to lay very heavily on "gizmocuz" shoulders who probably has a nasty attitude but has also answered to this V_TEXT question 7/2017 not easily implemented -> Best to help with development...so it seems that they are lacking hands...but in other hand, if the attitude is bad there aren't probably many willing to come to help.

    So...same here, I'll continue using Domoticz, but actively seeking a better alternative for it and trying to build as little as possible Domoticz specific stuff.

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    @monte True that. Thing is that people like to use the guis instead of configuration files. That's probably the reason why OpenHAB "fastly" evolves in that direction.

    For all the not-so-technical home automation builders I would myself suggest Domoticz as the choise for open source controller. OpenHAB maybe for the ones who buys ready-made stuff from Ikea, zWave etc and just want to control the stuff from one place. But still I'm pretty sure that many of those are not really interested or have required knowledge to start tinkering with OpenHAB. For MySensors users, as you said, it creates lots of additional work for little extra over Domoticz. Domo has this stupid V_TEXT sensor limitation and some people like that the default graphing stuff is limited. However, OpenHAB has nothing without setting up persistence services and their separate databases and definitions...and you can have the praised Influx-Grafana integration also for Domo. My personal opinion is that the normal Domo gui is still pretty useful plus you can have Imperihome, Dashticz type of connections or build your own with Rest API. With OpenHAB you don't have anything usable without manually building it first. I'm myself using Imperihome which basically gives little to complain about gui usability and visual aesthetics. With Domo you install MyDomoAtHome which has all the mappings done so that you can just start playing around with your Imperihome gui. With OpenHAB...
    https://github.com/openhab/openhab2-addons/tree/master/addons/io/org.openhab.io.imperihome
    The tagging part is not a small work to do...and this pretty much underlines the problem with OpenHAB. You can tune everything, but basically spend huge amount of time on doing that...or even getting things to work on basic level. The OpenHAB community seems to be active, but it has to, as there seems to be lots of problems too.

    But not bashing OpenHAB more: I want to like it, but it's just making liking it too hard for now. However, it has Eclipse foundation backing it up and has started evolving to the right direction out of the pure configuration file based setup/tuning. After year or two I believe it's much more user-friendly and more widely used. If not and Domo won't be developed anymore there is always the middleware/MQTT/NodeRed/cloud options to go...

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    And update here about V_TEXT and OpenHAB: Yes it works like it should. When I update the V_TEXT sensor in OpenHAB, it will send the update without any extra scripts or hacks to the MySensors node.

    However, after spending several days and nights setting up OpenHAB I have to say that it is far from being ready. MySensors seems not to be qualified yet in the list of "downloadable ready" bindings in PaperUI. Had several errors with MQTT nodes. It is customizable yes, but requires way too much time to set up and maintain. It seems to be more like an architectural masterpiece than easy-to-use home controller.

    You can define nearly everything in PaperUI or HABmin like me (a hell of mouse clicking and scrolling) or define everything in multiple configuration files. When you finally have all the nodes and sensors defined (bindings, things, items), you have to build your own gui to see them in usable format. You can either use HabPanel for dashboards or configuration files for sitemaps. Dashboards, which has the best outlook imo, seems to have a problem of working with different devices. I tried to avoid the manual sitemap building by installing Imperihome binding. Connection ok, but alas, you have to manually tag every damn item you have to show them in Imperihome. With all manual configurations you actually need to define quite much of information and they are nicely connected making bigger future changes complicated. Having now around 100 sensors, all this stuff really takes time. Moreover it seemed that the reliability at least with MySensors Ethernet Gateways (one main for NFR24L01 nodes and several ESP8266s) was not in par with Domoticz. Startup problems, rebooting, lost nodes etc...And this was the last drop --> changed back to Domoticz.

    Have to say that after a couple of years OpenHAB could maybe be the number one open source home automation controller, but it requires lots of more work for getting there. Now it's too much of engineering and configuration porn vs. the real benefits it gives. Also I'm little bit afraid that the they are getting lost to this super elegancy by trying to be everything and pleasing everybody. PaperUI, HABmin, HomeBuilder, HabPanel, Basic UI, Classic UI, some third party UIs, configuration files... The concept is nice, but as with any product, you need to focus somewhere or otherwise you are just semicore in all areas. Domoticz has its problems, but at least it is reliable and allows putting the most of the available tinkering time to the actual node building than tuning the controller.

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    @tbowmo Thanks @tbowmo and everybody! This active community has really saved my day so many times. You rule guys and gals! :+1: :blush:
    Here is a working script:

    import paho.mqtt.client as mqttClient
    import sys
    
    irCommand = sys.argv[1]
    print("Parameter is: " + irCommand)
    
    client = mqttClient.Client("Python")  
    client.username_pw_set(username="xxx",password="xxx")
    client.connect("nnn.nnn.nnn.nnn", 1883)
    client.publish('domoticz/out/HomeNum_IR/0/0/1/0/47', irCommand, retain=False)
    # (ESP8266 "gateway" MQTT client -> node=0)
    

    And call it from Domoticz virtual selector switch:

    script:///home/pi/domoticz/scripts/python/hnumber_led_mode.py 7
    

    Parameter is the desired mode for led animation. Made a similar on for IR remote commands.

    Is there same ~25bit payload limit with MQTT too? I mean those NEC IR commands tend to be 32bit so probably cannot send them directly but need to be hardcoded in the sketch? Also planned to create a universal script for these needs where you could give also node number, child ids etc but then again...I chain myself even tighter to Domoticz shackles and again Domoticz should support this without scripting.

    Couple of more questions:

    • If you have several ESP8266 MQTT gateways, should one create a different topic for everyone or put them in the same MySensors queue? If so, will the MY_MQTT_CLIENT_ID make the separation?
    • I installed nodered-contrib-mysensors and it seems very promising. Definitely going to play around with it. I probably still need some actual controller but Node-red seems to be important part whatever you're gonna do especially when using MQTT queues.
    • When using MQTT instead of Ethernet GW, I lose small but very important check: node pinging. I can see from Domoticz log warning messages when some of my ESP8266 Ethernet nodes are down, but when using MQTT there are no warnings, just no data received. I assume this is quite logical because the MQTT node's address in Domoticz is actually broker's (Mosquitto) address + right MQTT topic. However, when sniffing Domoticz MQTT traffic, it seems to send PING messages quite regularly (but don't know if this triggers anything if the ping success or fails...):
    // MQTT topic: domoticz/out/HomeNum_IR/#
    PING
    qos : 0, retain : false, cmd : publish, dup : false, topic : domoticz/out/HomeNum_IR/0/0/3/0/18, messageId : , length : 40
    

    Update: Seems that the Domo has it's own requirements for MQTT queues and for preventing overlapping ESP8266 = GW = Node ID 0 have an option to have also Node ID in the MQTT queue definition. Still would be nice to be able to define the MQTT queue names freely in Domo...

    Also my bad: MySensors payload size is 25 bytes, not bits... This seems to be because of NFR24L01 limitations. However, it would be nice to see an extended payload size for passing eg. longer text information with more advanced microcontrollers like ESP8266 in the future releases. Minor need though.

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    @monte I need to move to a next project so before conversion to Node-red and/or OpenHAB, how would you use netcat type of injection with MQTT? I mean now I have MySensors in W5100/MQTT mode and I want to send an update to my V_TEXT sensor via MQTT. Easiest way to do this with Domoticz would be by triggering some script. Sending an MQTT update via Python is probably easy (dunno, haven't done yet), but I have no idea how to form the message so that it would be in correct MySensors format...My node id is 31 and the text sensor child is 1:

    #define MY_NODE_ID     31
    #define LED_MODE_ID     1 
    MyMessage msgLedMode(LED_MODE_ID, V_TEXT);
    

    The payload is some number between -1 to 56. Really appreciate your help. :relieved:

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    @gohan said in Domoticz TEXT sensor triggering:

    Life sucks, I know 😁

    I see your point, my suggestion was merely a workaround to the node running but if you foresee domoticz limitations a problem for the future, maybe it could be worth moving to another controller now that you don't have too many nodes around

    Around a hundred sensors now and growing...not very excited of the conversion work... :confused: However, started some planning already and now MySensors GW is converted from serial to W5100/MQTT and Node-red has been installed. Have had plans to test it for a some while, but now really started playing with it. Seems that you can do all kind of nice middle-level stuff with it. :muscle:

    Plan now is to test some other controller via MQTT but only by subscribing to the MySensors queue.

    Also interesting to hear that people have switched totally to Nodered ( @tbowmo do you still have some controller or just Node-red gui/dashboard). Is there some ready-made interpreters for MySensors messages or need one define them all manually?

    And @monte, I definitely think your solution is the coolest one...but I know that if I take this alluring path, I'll end even deeper with the domo hacking I want to get rid off. :grin:

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    @gohan True...I'm just trying to find a way to avoid that darned dummy switch here and there mess. Have been playing with them too much lately. Domoticz developers seems to be also pretty slow to react to any suggestions. Ok, I don't pay to them, but HA and OpenHAB feels a bit more active nevertheless. Probably need to go the dummy hack path again, sigh. Probably have to change the controller soon as every this type of hack makes the conversion even harder in future.

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    @nca78 Thanks for the feedback. I have had similar feeling towards Domoticz for some while. What controller would you suggest? Have been watching OpenHab more closely now, but the conversion work required... :confounded:

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    @sushukka Strangely quiet here. :) This seems to be kind a common problem as there are many workarounds built because of this. However, I haven't seen no reasoning anywhere why the TEXT sensor update in Domoticz will not trigger any event to send the update to the node.
    I opened/continued a thread also on Domoticz forum:
    https://www.domoticz.com/forum/viewtopic.php?f=28&t=22801&p=177364#p177364
    Some LUA scripting maybe needed, but not sure yet. Still I see this a very crucial shortcoming as there are lots of cases where you need to pass parameters/commands etc. short information between Domo and MySensors nodes.

    Troubleshooting

  • Domoticz TEXT sensor triggering
    SushukkaS Sushukka

    Hello,
    This is already very well discussed topic, but I would like to broaden the scope a little bit without stealing anyones thread. So here it goes.
    There has been now several cases in my microcontroller journey with MySensors and Domoticz where I need to pass some command or code to some node for further processing. For example I want to have different lighting or user modes in some node. I create a dummy sensor on Domoticz and selector swith on that. After that I define a V_TEXT sensor on the node. Now I can simply update the TEXT sensor via the selector swith (Json commands) and the TEXT sensor variable will be updated. However, the information will not be passed to the node without explicitly requesting it from the node.

    MySensors/Domo support lots of ready made devices like RGB, switches, dimmers etc, but sometimes that's not just enough. The best way to pass information via controller is now by using V_TEXT/S_INFO sensor type, but it has a major downfall that Domoticz wont trigger anything when one of this type of sensors is updated. This forces MySensors users to do all kind of gimmicks with receive command triggering switches, dimmer hacking etc. All of which makes Domoticz ugly and kind a hacked.

    So what are the alternatives? I don't know, suggestions fellow MySenors users? The dummiest way is to make a poll requesting the TEXT info in regular manner. Works, but too inefficient. Other way is the dimmer type of hacking on Domo. I haven't used MQTT yet, could it be useful here? All the sensors and nodes are anyway MySensors ones so I assume that the Domo trigger problem persist. How about creating some generic lua script on Domo sending the information when it gets changed? Is it even possible to access this Domo/MySensors communication level ?

    Troubleshooting

  • WS2812FX, MySensors and "Expansion of macro F"
    SushukkaS Sushukka

    @mfalkvidd Thanks mfalkvidd...the oldest mistake one can make and I'm still falling to it regularly. Here are the links:
    Link to the library: https://github.com/kitesurfer1404/WS2812FX/issues/83
    Link to the problem workaround: https://github.com/kitesurfer1404/WS2812FX

    Troubleshooting

  • WS2812FX, MySensors and "Expansion of macro F"
    SushukkaS Sushukka

    @sushukka Here is discussion about this topic with WS2812FX author. Workaround found, maybe changes in the future. Nevertheless, this led library is really worth to try as it saves lots of time by having plenty of ready built animations for WS2812 addressable led strips + the library is very easy to use.

    Troubleshooting

  • WS2812FX, MySensors and "Expansion of macro F"
    SushukkaS Sushukka

    Hello,
    I try to compile a sketch with ESP8266 MySensors Gateway and WS2812FX library. I can use WS2812FX separately and compile all the example sketches there are, but now when trying to combine these two worlds together I get a following error:

    Build options changed, rebuilding all
    In file included from C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/MySensors.h:28:0,
    
                     from C:\Omat\Own_projects\Arduino\omat\MySensors\HomeNumber_IrRemote\HomeNumber_IrRemote.ino:39:
    
    C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:21:51: error: __c causes a section type conflict with __c
    
     #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
    
                                                       ^
    
    C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/core/MySensorsCore.h:91:40: note: in definition of macro 'CORE_DEBUG'
    
     #define CORE_DEBUG(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
    
                                            ^
    
    C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/core/MySensorsCore.cpp:594:13: note: in expansion of macro 'PSTR'
    
      CORE_DEBUG(PSTR("MCO:SLP:WUP=%d\n"), result); // sleep wake-up
    
                 ^
    
    In file included from C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/Arduino.h:243:0,
    
                     from sketch\HomeNumber_IrRemote.ino.cpp:1:
    
    C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:21:51: note: '__c' was declared here
    
     #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
    
                                                       ^
    
    C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:38:76: note: in definition of macro 'FPSTR'
    
     #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
    
                                                                                ^
    
    C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:39:34: note: in expansion of macro 'PSTR'
    
     #define F(string_literal) (FPSTR(PSTR(string_literal)))
    
                                      ^
    
    C:\Omat\Own_projects\Arduino\libraries\WS2812FX-master/WS2812FX.h:284:50: note: in expansion of macro 'F'
    
           _name[FX_MODE_CUSTOM]                    = F("Custom");
    
                                                      ^
    
    exit status 1
    Error compiling for board WeMos D1 R2 & mini.
    

    Not sure what this actually means, but I assume either MySensors or WS2812FX "overlaps" somehow.

    Troubleshooting

  • Protecting a lock switch securely with MySensors and Domoticz
    SushukkaS Sushukka

    @monte True but one need to draw a line to some level. Thing is that in this case the hacker would need to stay close proximity of the house and that would be recorded to security cameras I have around the property. In some crowded apartment building the situation would be a whole lot different. In that case I probably wouldn't have permission to mess with the lock or at least I wouldn't allow any remote functionality with it. But just speculating...remote lock functionality on highly crowded area...MySensors+arduino signing but not cryptography -> maye nah, ESP8266 with WPA2 maybe good enough, RaspBerry or some miniLinux would give lots of options, but not realtime systems, maybe not that reliable stepper etc. handling anymore. HW level should be anyway easy to make secure enough, but controller like Domoticz could be the weak link. Maybe just force authentication to Domo everytime. It seems to prevent also direct REST calls as it should.

    Troubleshooting

  • Protecting a lock switch securely with MySensors and Domoticz
    SushukkaS Sushukka

    @monte Good note. However, I draw the line on this level. My DHCP range is whole different than static IP range and in static range the Domoticz allowed adresses are quite arbitrary. Also Domo port is not any easy guessable common port. So to break in "cleanly" would take quite some time. Breaking in with "traditional" methods would be hundred times faster. :)

    Troubleshooting

  • Protecting a lock switch securely with MySensors and Domoticz
    SushukkaS Sushukka

    Update: Finally got this project finished! As soon as there are some mechanic involved + it has to be super reliable, things starts to get complicated. However, now it's done and works fine.

    To this Domoticz/Wifi-hacking dilemma there were pretty easy workaround, which I didn't in my blindsight understand in the beginning: on Domoticz settings you can specify also fully defined IP addresses on allowed networks field. Of course the tooltip says networks and network ranges, but nothing prevents you to use straight IP addresses. So the solution was easy. Just define static IP addresses to the router for the selected devices and then define them in the Domoticz allowed networks field and voila! Now if there are some non defined IP address trying to access Domo, they will be prompted with userid and password and the normal household mobiles/pads/mydomo appliances can use Domo as before.

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular