Navigation

    Discussion Forum to share and further the development of home control and automation, independent of platforms.

    SmartHome Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Elcid
    For those who registered but didn't received the confirmation email, please send an email to support@smarthome.community with the email you used
    • MSR in Alpine Docker

      PerH

      I have a docker running smoothly now, thought i'd share it. (and BTW, it looks awesome, Patrick!)
      So far i've only opened 8111, and /config as volume. Mabye the full /reactor folder should be exposed for easy updating?

      docker compose:

      version: "3.9" services: MSR: container_name: MSR restart: always image: perhu/msr-alpine:latest ports: - "8111:8111" volumes: - type: volume source: MSR-config target: /etc/reactor/config - type: volume source: MSR-Storage target: /etc/reactor/storage volumes: MSR-config: name: MSR-config MSR-storage: name: MSR-storage

      dockerfile for those who want to modify the image:

      FROM alpine:latest COPY /reactor/. /etc/reactor/ RUN apk add --update nodejs npm && cd /etc/reactor \ && npm install --loglevel error --no-save \ && cp dist-config/* config/ VOLUME ["/etc/reactor/config"] VOLUME ["/etc/reactor/storage"] EXPOSE 8111 CMD ["/bin/sh"] WORKDIR /etc/reactor CMD ["node", "/etc/reactor/app.js"]
      Multi-System Reactor
    • Multi-System Reactor Developer Preview AVAILABLE

      toggledbits

      OK, people, here we go! At long last, Multi-System Reactor developer preview is available!

      The package can be downloaded from the Reactor bug tracker, a MantisBT system (at https://reactor.toggledbits.com/mantisbt/). There is a download button in the left margin, as well as links to the documentation, which you will need for installation.

      UPDATE 2021-02-24 -- To keep spammers off, I've locked down registration on the Bug Tracker. To get access to the Bug Tracker and preview downloads, please PM me (not reply here) your full name and email address and I will set up an account for you.

      This version of MSR will run on Linux systems, including RPi's under Raspios Buster, running node.js version 12.10 or higher (v14.15.1). For RPi users, there is an installation script that will install a local copy of node.js (for the logged-in user).

      Bugs reports will be handled through the bug tracker only. Discussion and questions in this forum are fine, though (if that leads to a bug report, we'll transition).

      This version supports Vera and openLuup, Hubitat, and Home Assistant. Some of the device support on the H platforms is still a bit basic, but it is largely controlled by configuration and progress can be made quickly.

      The documentation beyond installation is a mess. Of course, I started with the existing documentation and have been massaging into MSR's particulars, but it still has a long way to go on the detail.

      I know I don't have to say this, but I will anyway... let me know how it goes!

      Multi-System Reactor
    • Vera account suspended for a 1000 years

      S

      So, after more than 10 years and 4 Vera's, my vera forum account is suspended.

      I think the monkey of the company, called melih is not man enough te have any critic. In the topic about the "great to come app" I responded to the topic (not off topic!) that a subscription can also be seen (financially) as buying a box, run it for 2 years and come to market with a better one (in better wordings).
      That means that if you as a company hast a box of 50USD cost, sell it at 250USD would give him a monthly subscription of 200/24=8.33 USD... Users that would last 5 years would pay a monthly of 3.33USD.

      But... the monkey on the rock has bolded his fists and said: ban him! He just can't take any criticism.

      To be honest! I am not even sad! It was a very rough journey with Vera. The journey stopped when Ezlo and the monkey took over the name.

      After that it quickly went downhill...

      Goodluck all! (except the monkey).

      Edit:
      The topic:

      Aug 16, 2020 MiOS Application - early Beta enrollment MiOS Application - early Beta enrollment

      are you serious? would I become a cost? that is, customers who periodically replace the control unit and are happy with the service praise the Vera system and therefore also free advertising but, the new “company” decides to charge less to bind the customer with a subscription … But the genius...

      The post:
      The point you are missing is:

      If the hardware would “cost” around 50USD, and you sold it for 250USD, an average life span of 5 years would mean 200/(5×12)=3.33USD per month. Thats how Vera used to do it.

      Then release a faster/better “beast” every 2 years gives you 200/(2×12)=8.33USD per month. That’s how vera used to do it.

      And that’s how I did it for around 8 years and 4 veras with them untill you bought the company.

      This is just a matter of how you look at it and explain it.

      I dont frikking care how you do the maths, I only liked a working product and a close user community (like it was).

      Now all I see on this forum is a lot of “we are going to” and “we are working on”, “keep them coming guys”. But the reason for ever considering to buy a new vera every 2 years is gone…

      No clear migration path, no clear compatibility path and no clear integration path…

      That’s why I started to look for alternatives…

      Vera
    • Support for 3rd party Vera plugins ?

      cw-kid

      Hi

      Does the Reactor plugin for Vera support some 3rd party Vera plugins such as the Logitech Harmony plugin for example ?

      In PLEG I am able to select a Harmony hub device and create some logic based on its various states.

      2ecefb43-5b2d-4505-aef1-dd0c5b09dc3f-image.png

      Other plugin examples might be the RGB Controller plugin which I am using with Fibaro RGBW modules, I can start the various light animations on the Fibaro RGBW module.

      19962434-a707-4301-b168-00787fea16ed-image.png

      8a629a9c-1968-40d8-a7c2-129bfebc9ac2-image.png

      Or the AltHue plugin which exposes aspects of the Hue Bridge like ColorLoop or to be able to start Hue Scenes etc.

      a8a67942-b862-4c3e-871f-f41081b20e8c-image.png

      With MSR all this type of functionality is currently lost.

      Obviously a work around would be to create Vera scenes instead and have those use these types of 3rd party plugins features and have MSR call those scenes. Don't think that would work for the Harmony plugin though where you are wanting to query states of the hub in your logic.

      I am just wondering how Reactor plugin for Vera currently works in this respect and what any plans for MSR might be ?

      Thank you.

      Multi-System Reactor
    • ALTHUE and Harmony mappings

      toggledbits

      Go ahead and open a PR for it, and we'll use that to track it.

      Multi-System Reactor
    • Installing MSR on Windows

      A

      @toggledbits said in Multi-System Reactor Developer Preview AVAILABLE:

      Version 21054 now available.
      ...
      2. This version runs on Windows, and there are draft instructions for how to get it installed.

      I am so excited!

      Sorry that I need to bother with a noob question at the first step😂
      Does this box need to be checked for MSR to run nicley?
      7bc519af-f0e4-46af-a040-0ce261d08a8f-image.png

      Multi-System Reactor
    • Setting RGB colour values

      cw-kid

      "You need to use 0.0 to 1.0, not 0 to 255 (just like dimming values)."

      How would I set the colour Purple as an example ?

      Its RGB value is: 128, 0, 128

      Thanks

      Multi-System Reactor
    • Still unable to set Thermostat setpoint

      J

      Just to let you know that I've updated to version 21054, but the added basic support for generic thermostats still does not allow me to set the current setpoint for either my Horstmann Thermostat or the Auto Virtual Thermostat.

      Multi-System Reactor
    • States 21053 but running 21054

      M

      Having updated to 21054 it still states 21053 in MSR although hard refresh in Chromium (Ctrl-F5) and even re-boot. Reading the startup log it runs 21054:

      2021-02-24T06:30:51.773Z app:null Reactor application v21054 starting on v14.15.4
      2021-02-24T06:30:51.779Z app:INFO Process ID 1801; platform linux/arm #1402 SMP Tue Feb 16 14:12:18 GMT 2021
      2021-02-24T06:30:51.818Z default:INFO Module Entity v21025
      2021-02-24T06:30:51.825Z Controller:null Module Controller v21054
      2021-02-24T06:30:51.827Z default:null Module Structure v21050
      2021-02-24T06:30:51.843Z default:null Module Ruleset v21041
      2021-02-24T06:30:51.844Z default:null Module Rulesets v21041
      2021-02-24T06:30:51.874Z default:null Module Rule v21051
      2021-02-24T06:30:51.882Z default:null Module Engine v21054
      2021-02-24T06:30:51.884Z default:null Module httpapi v21041
      2021-02-24T06:30:51.891Z default:null Module httpproxy v21054
      2021-02-24T06:30:51.945Z default:null Module wsapi v21053
      ...

      Probably something I am missing but can not figure out why

      Multi-System Reactor
    • Cant se Hubitat modes entity in msr

      M

      I have entered in Maker API that allow endpoint to control Modes. But in MSR I cant find modes entity for hubitat. The vera plus has it.

      Is it not just mapped in MSR?
      /Mattias

      Multi-System Reactor
    • IF Else without LUA Code ?

      cw-kid

      I guess there is no way to do IF Else statements without using LUA code ?

      This is a small portion of code, I've just copied out of one of my PLEG actions run LUA Code.

      The code checks a WOL with Ping switch in Vera, if its ON, it then sends a particular HTTP request to that Kodi HTPC to bring an IP Camera image on screen

      It then does the same check for the next WOL with Ping switch / Kodi HTPC and so on etc.

      Also the code checks Harmony activities to see if I'm currently in a FireTV activity instead? and if so sends a particular HTTP request to do Picture in Picture on the FireTV stick.

      local status = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", 38) --Check Status of KODI01 WOL switch if status == "1" then --If on then send command to show Security Cam os.execute('curl -X POST -H "content-type:application/json" http://kodi:kodi@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Addons.ExecuteAddon","params":{"addonid":"script.frontgardencam"},"id":"1"}\'') else end local status = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", 39) --Check Status of KODI02 WOL switch if status == "1" then --If on then send command to show Security Cam os.execute('curl -X POST -H "content-type:application/json" http://kodi:kodi@192.168.1.102:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Addons.ExecuteAddon","params":{"addonid":"script.frontgardencam"},"id":"1"}\'') else end

      I can't see that this would be possible using just an MSR rule ?

      Thanks

      Multi-System Reactor
    • Can't see VeraPlus and Hubitat (config question)

      M

      Him ... Got The reactor up and running but I can't see my Vera Plus and Hubitat.

      I have restarted the reactor after doing necessary input in the reactor.yaml file.reactor:

      What could I be doing wrong? Runs on a RPI

      Is it correct ?

      baseurl - The base URL to access the Reactor system.

      baseurl: "http://192.168**.***:8111"

      units - imperial or metric

      units: metric
      location:node app js
      city: "Stockholm City"
      # Non-US users please use "province"
      state: "GA"
      #province: "Akersberga"
      postal: "18494"
      # Must be ISO two-character country code (i.e. the ISO 3166-1 Alpha 2 code)
      country: "SE"
      # Must be properly set for sunset/sunrise calculation.
      latitude: 59.26465
      longitude: -18.14490
      # Units of elevation are meters (multiply feet by 0.3408 to get meters)
      elevation: 0

      controllers:

      id: vera
      enabled: true
      implementation: VeraController
      name: Penthouse 🙂
      config:
      source: 'http://192.168..*_3480'

      id: hass
      enabled: false
      implementation: HassController
      name: A Home Assistant system
      config:
      source: 'http://192.168.0.7:8123'
      access_token: "place long-lived access token within"

      id: hubitat
      enabled: true
      implementation: HubitatController
      name: Penthouse
      config:
      source: 'http://192.168..'
      access_token: '*************************************'

      Multi-System Reactor
    • Running Lua Code ? And watching device properties?

      cw-kid

      Hi

      In some of my PLEG actions I run Lua code.

      I guess I can't do that now with MSR. Assume I have to create a Vera scene with that same LUA code and have the MSR action call that scene etc.

      What about the people who were using Reactor plugin for Vera? I assume they can run Lua code.

      But won't be able to when using MSR on a separate box to Vera.

      I am also seeing other things I am doing in PLEG but don't think I will be able to on MSR? Like monitoring devices for certain things.

      For example I use PLEG with Fibaro Dimmer 2 modules to enable me to use the Scene Activation for double and triple clicks on the actual wall switches, PLEG sees this happening and then my action can run a Vera scene or whatever else I want.

      I have three "Device Properties" setup in PLEG to monitor those aspects of the Fibaro Dimmer 2 device.

      078cad4f-ebee-4951-a631-304da033d60f-image.png

      Then this condition in PLEG:

      (LoungeSceneActivated;LoungeLastSceneTime) and (LoungeLastSceneID == 15)

      Runs an action when I double click the Lounge Light wall switch.

      Thanks

      Multi-System Reactor
    • Updated to 0.1.21054 but it still says 0.1.21053

      cw-kid

      As per the title, I tried the update process twice.

      Multi-System Reactor
    • Will MSR have its own Http API? (Luup Requests)

      cw-kid

      If my longer term goal is to just use Vera as a Z-Wave radio only.

      Or to maybe even replace Vera and Ezlo altogether with another Z-Wave hub like Hubitat or perhaps even a USB stick Z-Wave.me Z-Way or something (Assuming MSR supports that platform you plan to move to etc) .

      Then all my "Scenes" might end up being rules in MSR.

      These rules in MSR may have triggers that are automated as I'm setting up right now, or they may not have any triggers at all, other than being manual, like you can setup a manual scene in Vera.

      I'd then want to be able to initiate some of those "scenes" by sending http requests to MSR from other devices and apps on my LAN.

      Presumably for controlling Z-Wave devices directly on / off / dim etc, I'd been sending http requests to whatever the new Z-Wave hub might be? Hubitat or whatever.

      Just thinking how you'd fully move away from Vera and any Vera scenes.

      Or is this more the realm of OpenLuup? With using Vera still as the Z-Wave radio or a Z-Wave USB stick, which do they support?

      In short I'd like to be able to send a simple one line HTTP request to MSR to have it run a particular "Set Reaction" action(s).

      Multi-System Reactor
    • Would you use a self-hosted geofencing solution?

      toggledbits

      Some of you may know that I took at shot at building an alternate geofencing solution for Vera. The core of it was system agnostic, using the OwnTracks application and AWS lambdas to track devices and keep a central data, then disseminate that to the Vera via a websocket-based plugin. It worked with other apps as well, including Tasker and GPSLogger, but of the dozen people that were testing it, most used OwnTracks.

      A lot was learned in the process, not the least of which is that the success of any such solution is highly dependent on the phone and its settings. Phone manufacturers love to set things up for the longest battery life, of course, but that's usually very anti-geofencing behavior. In the case of at least one brand, it was unusable and the settings could not be modified. It was also cost-prohibitive to maintain on Amazon, as AWS grabs a dime here and a dollar there and before you know it, it added $100/month to my AWS bill, which my wife deducted from my Scotch budget. Unacceptable.

      But it's quite reasonable to use OwnTracks to a local endpoint, and I could pretty easily replicate the functionality as a local application, or maybe even as an additional endpoint built into MSR's API (still separate port and process, but in the package).

      So the question really is... would you do it, or would you be too concerned about the security risks associated (e.g., dynamic DNS and NAT mapping in the firewall necessary for the phone to contact the service when not on LAN)?

      General Discussion
    • SiteSensor triggered my both sirens

      S

      Installed Sitesensor yesterday. Defined a http request towards yr.no for the weather.
      Default it only sends requests when the device is armed. When I armed the sensor both of my sirens started bleeping. Not funny with at night with two kids asleep.

      Simultaneous with arming the device, the first http request probably is send and my first http request did not have the Useragent http header so the result was a 403; this probably made the sitesensor device being triggered.

      I unchecked the box "only send requests when armed" and disarmed the sitesensor. This works ok but only one slight mistake with thick fingers and I have armed it again.

      I see the sitesensor device is being configured as a SecuritySensor (as it implements the securitysensor serivce?). This makes that sirens react when the sitesensor trips. I have a leakage sensor as well and I know this one triggers the sirens as well. Do not have any doorsensors right now but hope these will not trigger sirens as well.

      Is there a way to tell Sirens to ignore Sitesensor and/or other specific devices. Or should sitesensor not be configured as a security device?
      Is there an easy solution?

      Grtz Swiddy

      Some details:
      -Vera Secure box with built in siren (siren is a separate device)
      -POPP Smokedetector with siren
      -Upto-date with Vera firmware and Not on Openluup yet but don't think this would make a difference here

      General Discussion
    • Another transition from Vera to OpenLuup - PerH

      PerH

      So cool to find the forum of all the banned vera gurus!

      I've had a Vera Plus for about 6 years now, and have had a fairly problem free time with it compared to many other stories. The last years have however been lacking in progression in many fields i'd like to explore, so now i'm looking closely at Openluup.
      Other systems have been tested as well, but i find that the community and plugins made for vera is kind of special, and something i'd like to contribute to as well. (getting older and not wanting to change to new stuff probably plays a part too!)

      So, my stab at opeluup starts with an HP Chromebox 1 i got for free. Its a fairly powerfull thing, but as google wants to sell new ones, its now EOL.
      I wiped it clean and installed debian, as it seems to be the closest thing to raspberry which many use for openluup.

      Openluup installed fine, and i got the vera bridge working fairly well by bothering ppl at the vera forum with questions. Its now running OK, but there seems to be an issue with Icons?

      f0e29622-0397-4b84-819c-f1b632daab41-image.png

      Also at the devices tab:
      2892faff-a3ee-4f21-9db8-2a03f604fc74-image.png

      I did the "GetFiles", and I see the /icons/ is populated, but no icons. In the luup log says that its trying to GET the icon, but returns no packages.

      2020-09-15 17:04:30.818 openLuup.server:: GET /cmh/skins/default/img/devices/device_states/dimmable_light_off.png HTTP/1.1 tcp{client}: 0x55eca8d90cb8 2020-09-15 17:04:30.819 openLuup.server:: request completed (0 bytes, 0 chunks, 0 ms) tcp{client}: 0x55eca8d90cb8

      I do have a UZB stick on the way, but before i go down that road i'd like to be sure that the installation is stable and sound.. Do I have all the nessecary packages/background processes? I did install cjson which helped on some things..

      Also fairly new at linux in general, so bear with me. 😉

      Roadmap:

      Get the openluup/AltUI running smoothly
      Transfer Z-wave devices
      Transfer 433 devices (RFXtrx plugin)
      Transfer Zigbee devices (Vera or mabye ezlo plus? zigbee stick?)

      more questions will follow!

      Blogs
    • Does this rule look correct ?

      cw-kid

      Schedule to turn on two side table lamps, 40 minutes before Sunset (everyday of the week) with some Constraints (Conditions) attached.

      Condition 1 = Both lamps have to be off in the first place

      AND

      Condition 2 = A virtual switch called “Dark Mode” should be off

      AND

      Condition 3 = Vera is NOT in either house mode “away” OR “vacation”

      I hope the screen shot is readable.

      1de0e3ca-0104-40b6-a3f3-0fbf2b33ea87-image.png

      I am a Reactor luddite and just want to make sure I am getting things in the right order / areas of the rule.

      Thanks

      Multi-System Reactor
    • Profile
    • Following 0
    • Followers 0
    • Topics 13
    • Posts 107
    • Best 25
    • Groups 0

    Elcid

    @Elcid

    37
    Reputation
    27
    Profile views
    107
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Location England

    Elcid Follow

    Best posts made by Elcid

    • My Wandering

      I am a Electrician. I installed hundreds of smart devices for others prior to having my own home automation. In 2013 I bought a new house and decided to make it smart. I did some homework and settled on Z-wave and VeraPlus.
      My installation comprises of
      25 Z-wave dimmer/switch inserts
      3 Z-wave door sensors
      10 sonoff devices(basics,TH16 and Mini) ,
      4 Tuya(lamps and RGB strips) ,
      6 shellys(connected to motion sensors and 2 controlling dead DIY bolts )
      3 Amazon Dots(gen2)
      2 Broadlink (RMPro's)
      4 DIY RF Venetian Blinds
      2 Multi button DIY remotes
      1 NVR
      1 Network drive/Media server/ftp server.
      1 smart thermostat heating and hot water
      4 wired 240v/battery Aico smoke and heat detectors (connect to zwave via Relays)
      1 robot hover.
      1 Siren
      Node-red server running on android.
      Testing openluup on android.
      Automate App running on andorid Boxes/phones.
      All tv's are connected to android boxes.
      No windows PC.
      Debian running on android box.
      Plugins Reactor, AlexaTTS, Switchboard and Virtual HTTP Switch.

      I can control all of my devices from anyone of these platforms Vera/OpenLuup, Node-red, Automate(phone/tv box) or Alexa.
      All devices have a standard/manual switch for anyone to control, and can be controlled even if my VeraPlus stopped working or internet out. My system is stable and may get a luup reload every couple of weeks.

      None of my sonoff's or tuya have been flashed. I found Shelly very late into game and will be using these more now i found them, as they offer local control.

      I have some coding knowledge from the 90's, but have never worked in the industry.

      posted in Blogs
      Elcid
      Elcid
    • node-red Alexa OpenLuup/Vera voice integration

      Here is a simple integration of OpenLuup/vera device to Alexa via Node-red.

      E1cid/Node-red-Vera

      E1cid/Node-red-Vera

      Node-red flows for Vera. Contribute to E1cid/Node-red-Vera development by creating an account on GitHub.

      The speed is fast sub 1 second responses.

      Requirements -
      node-red.
      alexa.
      node-red-contrib-amazon-echo(local Hue devices).
      openluup or Vera (or any controller via http requests).

      Capabilities-
      Binary switch.
      dimming switch.
      rgb switch.
      Run scenes.

      Each alexa device node is configured in the topic of the amazon-echo device node -
      (device number#type of switch)
      bnary - 123#binary.
      dimming - 123#dimming.
      rgb - 123#colour (W/D is default 310 to adjust colour temp add value to end e.g. 123#colour#300
      scene - 123#scene#124 (123 on 124 off. 124 can be omitted).

      Enter the ip of your controller in the http request block.
      Just copy code and import into Node-red

      [
          {
              "id": "de7838ac.ebead",
              "type": "amazon-echo-hub",
              "z": "8659fc6b.981b4",
              "port": "8980",
              "processinput": "0",
              "discovery": true,
              "x": 150,
              "y": 840,
              "wires": [
                  [
                      "cd0ae070.e98378",
                      "a605448.899d8b8",
                      "21ca89ff.b0f6ce"
                  ]
              ]
          },
          {
              "id": "a605448.899d8b8",
              "type": "amazon-echo-device",
              "z": "8659fc6b.981b4",
              "name": "bedroom four",
              "topic": "199#colour",
              "x": 410,
              "y": 860,
              "wires": [
                  [
                      "688830f.c57775"
                  ]
              ]
          },
          {
              "id": "21ca89ff.b0f6ce",
              "type": "amazon-echo-device",
              "z": "8659fc6b.981b4",
              "name": "app safe",
              "topic": "164#binary",
              "x": 390,
              "y": 900,
              "wires": [
                  [
                      "688830f.c57775"
                  ]
              ]
          },
          {
              "id": "cd0ae070.e98378",
              "type": "amazon-echo-device",
              "z": "8659fc6b.981b4",
              "name": "lounge 1",
              "topic": "8#dimming",
              "x": 390,
              "y": 940,
              "wires": [
                  [
                      "688830f.c57775"
                  ]
              ]
          },
          {
              "id": "688830f.c57775",
              "type": "function",
              "z": "8659fc6b.981b4",
              "name": "",
              "func": "let types = {\n    \"dimming\":[\"urn:upnp-org:serviceId:Dimming1\",\"SetLoadLevelTarget\",\"newLoadlevelTarget\"],\n    \"binary\":[\"urn:upnp-org:serviceId:SwitchPower1\",\"SetTarget\",\"newTargetValue\"],\n    \"scene\":[\"urn:micasaverde-com:serviceId:HomeAutomationGateway1\",\"RunScene\",\"SceneNum\"],\n    \"colour\":[\"urn:micasaverde-com:serviceId:Color1\",{\"tt\":\"SetColor\",\"hs\":\"SetColorRGB\",\"ct\":\"SetColorTemp\"},{\"tt\":\"newColorTarget\",\"hs\":\"newColorRGBTarget\",\"ct\":\"newColorTempTarget\"}] \t\n}\nfunction binaryPayload(device, type, turnOn, payload) {\n    payload.id = \"action\";\n    payload.serviceId = type[0];\n    payload.DeviceNum = device;\n    payload.action = type[1];\n    payload[type[2]] = (turnOn === true ? 1 : 0);\n    payload.message = payload[type[2]];\nreturn payload;\n}\n\nfunction dimmingPayload(device, type, level, payload) {\n    payload.id = \"action\";\n    payload.serviceId = type[0];\n    payload.DeviceNum = device;\n    payload.action = type[1];\n    payload[type[2]] = level;\n    payload.message = level;\nreturn payload;\n}\nfunction scenePayload(device, type, turnOn, payload) {\n    payload.id = \"action\";\n    payload.serviceId = type[0];\n    payload.action = type[1];\n    payload[type[2]] = (turnOn === true ? device[0] : (device[2] || device[0]));\n    payload.message =\"Run Scene \" + payload[type[2]];\nreturn payload;\n}\n\nfunction rgbPayload(device, types, msg, payload) { \n    if(msg.on === true && msg.meta.changes.on === false && msg.meta[\"input\"].on === true){\n        payload =  binaryPayload(device[0], types[\"binary\"], msg.on, {});\n    }else if (msg.meta.changes.percentage && msg.on === true){\n        payload = dimmingPayload(device[0], types[\"dimming\"], msg.percentage, {});\n    }else if (msg.on === true && msg.colormode === \"hs\"){\n        payload.id = \"action\";\n        payload.serviceId = types[\"colour\"][0];\n        payload.DeviceNum = device[0];\n        payload.action = types[\"colour\"][1][\"hs\"];\n        payload[types[\"colour\"][2][\"hs\"]] =  msg.rgb.join(\",\");\n        payload.message = msg.rgb.join(\",\");\n    }else if (msg.on === true && msg.colormode === \"ct\"){\n        let diff = msg.ct - (Number(device[2]) || 310);\n        msg.ct = (diff < 0) ? \"D\" + Math.min(Math.abs(diff * 1.7),255).toFixed() : \"W\" + Math.abs(Math.min((diff * 1.7),255) - 255).toFixed();\n        payload.id = \"action\";\n        payload.serviceId = types[\"colour\"][0];\n        payload.DeviceNum = device[0];\n        payload.action = types[\"colour\"][1][\"ct\"];\n        payload[types[\"colour\"][2][\"ct\"]] = msg.ct;\n        payload.message = msg.ct;\n    }\nreturn payload;\n}\n\nmsg.topic = msg.topic.split(\"#\").map(Function.prototype.call, String.prototype.trim);\nmsg.hold = msg.payload;\nmsg.payload = {};\nlet type = msg.topic[1] || \"binary\";\nif(msg.topic[1] === \"scene\"){\n    msg.payload = scenePayload(msg.topic, types[\"scene\"], msg.on, {});\n}else if (msg.topic[1] === \"binary\" || msg.percentage === 0 || msg.on === false){\n    msg.payload =  binaryPayload(msg.topic[0], types[\"binary\"], msg.on, {});\n}else if(msg.topic[1] ===\"dimming\"){\n    msg.payload = dimmingPayload(msg.topic[0], types[\"dimming\"], msg.percentage, {});\n}else if (msg.topic[1] === \"colour\"){\n    msg.payload = rgbPayload(msg.topic, types, msg, {});\n}\nlet  error = [\"green\", msg.topic[1] + \" | \" + msg.topic[0], msg.payload.message];\ndelete msg.payload.message;\nif (Object.keys(msg.payload).length < 1){\n    error[0] =\"red\";\n    error[2] =\"failed to create payload\";\n}\nnode.status({\"fill\": error[0],\"shape\":\"ring\",\"text\": error[1] + \" | \" + error[2]});\n\nreturn msg;\n",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "x": 590,
              "y": 940,
              "wires": [
                  [
                      "680d28ae.8a163"
                  ]
              ]
          },
          {
              "id": "680d28ae.8a163",
              "type": "http request",
              "z": "8659fc6b.981b4",
              "name": "Get request",
              "method": "GET",
              "ret": "txt",
              "paytoqs": "query",
              "url": "http://192.168.1.11:3480/data_request",
              "tls": "",
              "persist": false,
              "proxy": "",
              "authType": "",
              "x": 760,
              "y": 1000,
              "wires": [
                  [
                      "cb471442.5d60c8"
                  ]
              ]
          }
      ]
      
      posted in Code/Snippet library
      Elcid
      Elcid
    • RE: Removing Orange Notification

      Yes thanks for your efforts @DesT

      posted in Comments & Feedback
      Elcid
      Elcid
    • RE: Video Doorbells

      My door is covered by a hidden microwave sensor. when triggered reactor sends a http request to my phone or tv box, depending on home or away. My phone/box uses Automate to receive the http request, Automate then opens the camera app and displays the camera. I can talk and listen though the camera app. Normally takes 5-10 seconds to complete. If i am home vera sends a TTS to alexa, informing me there is some one at the door.

      posted in IPCam
      Elcid
      Elcid
    • RE: This is me

      @CatmanV2 said in This is me:

      Well, if I see further, it's because I stand of the shoulders of giants. I've got where I got because of the experts here.

      Well said.

      posted in Blogs
      Elcid
      Elcid
    • RE: Setting RGB colour values

      0.5019607843137255, 0, 0.5019607843137255 You may want to round them. LOL

      posted in Multi-System Reactor
      Elcid
      Elcid
    • First post to say hello

      Hi to all, Thought i would join as not to miss out on anygood information that you developers may share here.

      note- The input box for text does not display to well.I can not see what i am typing.
      Android 8 full sreen on tv box using firefox mobile view.
      If i use desktop view everything is ok.

      posted in General Discussion
      Elcid
      Elcid
    • RE: Alarm Clock

      I now have node-red setting a silent switching of a v device, by saying "wake me up at [any time and/or day]". also depending which echo i use i can set a different v device, so different morning routines for each bedroom.

      @catman you can also do all your H A Bridge devices in node red to, as it has the local hue lights bridge to. So you could replace H A Bridge with node-red. It would not be difficult to set a http request to set your virtual alarm.

      posted in Plugins
      Elcid
      Elcid
    • RE: Vera account suspended for a 1000 years

      Stange, That post is still up. If that was the cause i would have thought it would have been removed to. If they keep up this tyrannical behaviour the forum will die a death of a thousand cuts.

      posted in Vera
      Elcid
      Elcid
    • Code example library

      How about a an area to paste code examples with a short explanation, like a libary, Eg. how to watch a variable, http Post request etc. All in one place so easy for biginners to find.

      posted in Comments & Feedback
      Elcid
      Elcid

    Latest posts made by Elcid

    • RE: Multi-System Reactor Developer Preview AVAILABLE

      In fact its a good idea, those sd cards can fail all to easily, with all the reading and writing.

      posted in Multi-System Reactor
      Elcid
      Elcid
    • RE: Setting RGB colour values

      0-255 would be clearer, or 0 - 2.55. That conversion to 0-1 could produce errors.

      posted in Multi-System Reactor
      Elcid
      Elcid
    • RE: Setting RGB colour values

      0.5019607843137255, 0, 0.5019607843137255 You may want to round them. LOL

      posted in Multi-System Reactor
      Elcid
      Elcid
    • RE: IF Else without LUA Code ?

      seem there is a ternary operator.
      http://192.168.1.10:8111/docs/Expressions-%26-Variables/#new-operations-and-symbols

      posted in Multi-System Reactor
      Elcid
      Elcid
    • RE: Running Lua Code ? And watching device properties?

      In vera reactor to watch a device state you just set a variable and there is a button to pick what you want to get/watch, this creates the expression for you. The button exists in MSR, but as Patrick says expressions are not fully implemented yet. When it is you will see how simple it is. Install Vera reactor just to have a play.

      posted in Multi-System Reactor
      Elcid
      Elcid
    • RE: Running Lua Code ? And watching device properties?

      {variable} - refers to expression variable.
      you can set dynamic names in input fields and you can also use luaxp

      This reactor page explains more https://www.toggledbits.com/static/reactor/docs/3.6/Expressions-%26-Variables/#luaxp-built-in-functions

      This will probably be available in MSR to.

      posted in Multi-System Reactor
      Elcid
      Elcid
    • RE: Running Lua Code ? And watching device properties?

      To RunLua you would need reactor on the vera. you could then call it from MSR

      Also the {variable or luaxp} works in reactor and will be working in MSR in the near future

      posted in Multi-System Reactor
      Elcid
      Elcid
    • Units

      Being in the UK, we use a mix of metric for most thing, but still use imperial miles for distance.

      So when we select metric are miles are off, and when select imperial are temps are off.

      Can we have a third option "metric uk" which shows everything metric except mile. i like my temps in degres c and distance in miles.

      posted in Multi-System Reactor
      Elcid
      Elcid
    • RE: Sunset with offset didn't run

      Would that not be after sunset - 40

      so if sunset is 5.00pm
      the light would turn on only after 4.20pm up to midnight

      posted in Multi-System Reactor
      Elcid
      Elcid
    • RE: Sunset with offset didn't run

      Yes, that's correct

      posted in Multi-System Reactor
      Elcid
      Elcid