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
    • Unsolved
    1. Home
    2. parkerc
    • Home Assistant add-on

      M

      I've done a bit of repackaging of MSR to make it work as an add-on under Home Assistant mostly for my own purposes but hopefully it makes it a bit easier to install and get going.

      GitHub - mrw298/hassio-reactor-addon GitHub - mrw298/hassio-reactor-addon

      Contribute to mrw298/hassio-reactor-addon development by creating an account on GitHub.

      Multi-System Reactor
    • Renaming Global Expressions possible?

      Snowman

      I am doing some clean-up and wondering if there is a way to rename Global Expressions.

      Unless I am blind, which I wouldn't be surprised, I can't seem to find an answer.

      Thanks

      Multi-System Reactor
    • How to reset kwh

      B

      Aften some testing I watt to clear KWH how ?

      Regards Bjarne

      General Discussion
    • ChatGPT - finally I can now retyre in piece and quite, knowing everting is in goof hands.

      A

      ChatGPT samples:

      Me:

      Tell me about an iot program called openLuup.

      It:

      OpenLuup is an open source home automation system that is built on the VeraLuup platform. It is designed to be easy to install and configure, and provides users with a powerful and versatile way to control their home automation devices. OpenLuup offers a wide range of features, including support for many popular home automation devices, scheduling, scripting, and integration with other services. OpenLuup is designed to be customizable, allowing users to create their own home automation systems. It is an excellent choice for those looking to create their own home automation system without spending a lot of money.

      Me:

      Write an iot program using openLuup.

      It:

      --openLuup IoT Program-- -- Initialize Variables -- local device_id = "MyHomeDevice" local temperature_sensor_id = "MyTemperatureSensor" local temperature_threshold = 75 -- Create Devices -- luup.create_device("OpenLuup Temperature Sensor", 0, device_id, "D_GenericSensor1.xml", "I_GenericSensor1.xml", "S_TemperatureSensor1.xml", "") luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 0, device_id) -- Start Timer -- luup.call_delay("check_temperature", 10, "", false) --Function to Check Temperature-- function check_temperature() local current_temperature = luup.variable_get(temperature_sensor_id, "CurrentTemperature", 0) --Check Temperature Threshold-- if current_temperature >= temperature_threshold then --Send Alert-- luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "SendTextMessage", {PhoneNumber="1234567890", Message="ALERT! Temperature exceeded threshold!"}, 0) end --Reset Timer-- luup.call_delay("check_temperature", 10, "", false) end

      Me:

      Write an iot program using openLuup.

      It:

      Write an iot program using openLuup. -- openLuup IOT Program -- -- Variables local lampState = false local lampTime = 0 -- Functions function lampTimer() if lampTime > 0 then lampTime = lampTime - 1 if lampTime == 0 then luup.variable_set('urn:upnp-org:serviceId:SwitchPower1', 'Status', 0, lampDeviceID) lampState = false end end end -- Setup luup.call_delay('lampTimer', 60, 0) -- Main Loop while true do -- Check for motion if luup.variable_get('urn:micasaverde-com:serviceId:MotionSensor1', 'Tripped', motionSensorDeviceID) == '1' then if not lampState then luup.variable_set('urn:upnp-org:serviceId:SwitchPower1', 'Status', 1, lampDeviceID) lampState = true -- Set lamp timer to 5 minutes lampTime = 300 end end luup.sleep(1) end

      What??

      luup.sleep(1)

      Not good - looks like I still have some semblance of a job to fulfill.

      Me:

      An iot program called openLuup was written by akbooer. Who is akbooer?

      It: (note: answer redacted and as I understand it, also incorrect re: AltUI):

      akbooer is the pseudonym of the software developer and home automation enthusiast. He is the creator of the openLuup home automation software, which is an open-source version of the Vera home automation system. He is also the creator of the AltUI graphical user interface for openLuup.

      Me:

      Who created of the AltUI graphical user interface for openLuup.

      and

      Me:

      Who created of the AltUI graphical user interface for the home automation system Vera.

      Names two different people - mmmm.

      Regardless very impressive - give it a few more years.

      General Discussion
    • Super newbie here. Need help with lots of stuff

      A

      Hello guys. I'm currently building my own home and i want it to be kind of high tech and cool but i have actually never owned a smart device other than a smartphone and an old smart TV so i don't even know what exactly am i looking for. I will explain my idea and i am looking forward to somebody shining some light.

      Sooo - i was thinking about getting a WiFi controlled AC, TV, Washing machine, Dryer and smart switches for the lights. I suppose i need some kind of a assistant that connects to the wifi and can control all of these. Also i want an audio system - for the TV in the living room aaaand i also want to have 2 speakers in the bathroom which i have no idea where i would connect. I guees i need some kind of a receiver and amplifier for them to work correctly. But i also want that reciever to be hidden somewhere so it ahould be small and it also should be able to connect to the wifi i guess.
      So wgat exactly do i need so far. Would any wifi device connect to any assistant? Or am i lookng for particullar stuff... Will i be able for example to turn on my AC from outside the household for example when im at work? And can i also connect an alarm system of some type?

      How-To
    • Setting Aeotec Siren 6 volume and duration not working

      Snowman

      Having trouble setting the Aeotec Siren 6 volume and the duration for a specific siren (alarm).

      Reactor version: latest-23010-7dd2c9e9

      Setting the tone value works fine. On the other end, what ever value I put under volume_level and duration has no effect.

      As usual, I am doing something wrong but can't figure out what.

      aca1fe53-792d-4da0-9ea9-8ad62cbff3ce-image.png

      Thanks in advance.

      Software
    • MSR controller status panel

      R

      Running latest version of MSR in Docker on Bullseye/Raspberry Pi CM4. Every time I "restart" MSR it returns to the default set of status panels. I add "Controller Status", but it disappears on every restart. Is this the planned behavior or do I have an issue somewhere?

      Multi-System Reactor
    • Short survey

      P

      Hi,
      I am a student and recently i am working on smart home project and writing a seminar paper about the way users handle and manage IoT devices. I you have 3 min, please fill below survey. Its really short.
      Thank you in advance, I really appreciate everyone's help.

      General Discussion
    • Way to copy or export Alerts?

      cw-kid

      Hi

      Is there a way to copy text from an Alert or export them?

      I wanted to copy a device ID number that MSR says no longer exists on my Ezlo Plus controller.

      Thanks

      e7f39b4c-c283-4d47-a73a-e77974c0b2ae-image.png

      Multi-System Reactor
    • Alexa TTS volume does not update as expected

      CatmanV2

      Hardly a big deal, and likely user error. Bare metal install on Debian Bullseye

      Observed behaviour:
      TTS announcements are made with the correct volume. So a message to group 'Everywhere' with Volume 40 is announced. Asking an individual echo device to state its volume after the announcement gets the response 'This device is at volume 4'
      So far so good.

      Using the:

      x_vera_svc_bochicchio_com_VeraAlexa1.SetVolume

      In an MSR reaction appears to have no impact when either applied to the group 'Everywhere' or a specific device.

      So executing this reaction:
      Screenshot 2023-01-31 at 09.17.40.png

      Is acknowledged by the device (with a 'beep') and shows the Lua Log below:

      2023-01-31 09:21:45.778 openLuup.io.server:: HTTP:3480 connection from 192.168.70.249 tcp{client}: 0x5572399831f8 2023-01-31 09:21:45.779 openLuup.server:: GET /data_request?GroupZones=Office&DesiredVolume=10&DeviceNum=22&id=action&serviceId=urn%3Abochicchio-com%3AserviceId%3AVeraAlexa1&action=SetVolume&output_format=json&_r=1675156905777 HTTP/1.1 tcp{client}: 0x5572399831f8 2023-01-31 09:21:45.780 luup.call_action:: 22.urn:bochicchio-com:serviceId:VeraAlexa1.SetVolume 2023-01-31 09:21:51.670 luup.variable_set:: 22.urn:bochicchio-com:serviceId:VeraAlexa1.LatestResponse was: sending cmd:speak:<s>Volume Set</s><break time="0s" /> to dev:Office type:A32DOYMUN6DTXA serial:G090U50991550NLS cu... now: sending cmd:vol:10 to dev:Office type:A32DOYMUN6DTXA serial:G090U50991550NLS customerid:A1CVTZEBJIUFJI #hooks:0 2023-01-31 09:21:51.671 openLuup.server:: request completed (35 bytes, 1 chunks, 5891 ms) tcp{client}: 0x5572399831f8 2023-01-31 09:21:51.683 openLuup.io.server:: HTTP:3480 connection closed openLuup.server.receive closed tcp{client}: 0x5572399831f8 2023-01-31 09:21:51.685 openLuup.server:: request completed (930 bytes, 1 chunks, 42818 ms) tcp{client}: 0x557239726708 2023-01-31 09:21:51.687 openLuup.server:: request completed (930 bytes, 1 chunks, 42548 ms) tcp{client}: 0x5572392c0fd8 2023-01-31 09:21:51.688 openLuup.server:: request completed (930 bytes, 1 chunks, 12501 ms) tcp{client}: 0x5572392c7f88 2023-01-31 09:21:51.692 openLuup.io.server:: HTTP:3480 connection closed openLuup.server.receive closed tcp{client}: 0x5572392c7f88 2023-01-31 09:21:51.704 openLuup.io.server:: HTTP:3480 connection from 192.168.70.249 tcp{client}: 0x557239be10b8 2023-01-31 09:21:51.704 openLuup.server:: GET /data_request?id=status&Timeout=15&DataVersion=66666322&MinimumDelay=50&output_format=json&_r=1675156911703 HTTP/1.1 tcp{client}: 0x557239be10b8 2023-01-31 09:21:51.905 openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=66666322&Timeout=60&MinimumDelay=1500&_=1675022474387 HTTP/1.1 tcp{client}: 0x5572392c0fd8 2023-01-31 09:21:53.042 openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=66666322&Timeout=60&MinimumDelay=1500&_=1675079237873 HTTP/1.1 tcp{client}: 0x557239726708

      However direct interrogation of the device reveals the volume has not changed.

      I assume I'm doing something wrong or not understanding how this is meant to work?

      One other observation is that messages announce to the 'Everywhere' group appear to make the volume 'stick' where as messages to an individual device appear to revert to the previous volume setting.
      My expectation would be analagous to a radio i.e. the volume stays as it was last set, but happy to be corrected.

      TIA!

      C

      Vera/openLuup plugins
    • Include Entity by Name in Dynamic Group Controller

      Pabla

      Trying to figure out how I can include a list of entities that have "battery_level" in their ID without having to manually include them in a list. I have a group which selects all entities with the battery_power capability and filters them if they are dead. In HA there are quite a few entities that have the battery_power capability but don't actually report a battery percent (see screenshot below for an example), the entities I am interested in are the ones that contain battery_level in their ID.

      I tried the following in the config file but it hasn't worked:

      "dead_battery": select: - include_capability: battery_power - include_entity: "/^hass>battery_level/"

      What I think I am doing wrong here is that I am including entities with the batter_level capability which doesn't actually exist.

      b50a2bfe-1779-4467-8b91-c078ff9404ef-image.png

      Multi-System Reactor
    • Need help in finding the right smart switch for my kitchen lights

      M

      Hello,
      I have a kitchen light that can be controlled by two switches, using either to turn it off or on. I have been slowly changing things over to be a smart home but this is the first switch I am attempting to install.
      I am in a double wide modular home (mobile) that was built in 1994.
      At first I thought I would need a 3 way switch but when taking the normal switches apart I realized that was incorrect because the wiring on my switches are different than anything I could find online.
      For one a 3 way smart switch requires 5 wires and there are only 2 wires going into the primary switch with 3 wires going into the secondary switch from the primary switch (at least I think the 3 wires connect the two switches together). Images will be attached of the wiring.
      There are two wires (one black and one white) going into the first switch and 3 wires (black, white, and red) going out of that and into the second switch (I assume). The odd thing is the red wire going to the second switch is connected to the white wire going into the first switch and the white wire going into the second switch seems to be a bridge wire or a traveler wire. Not exactly sure. You will see what I mean in the images.
      I need to know what kind of smart switch I can use in this set up with one remaining a normal switch.
      Note that for some reason the images got switched around when uploading them. The image with 2 wires on one side and 3 on the other is what I think is the primary and the image with just 3 wires is the secondary.
      Primary.jpg Secondary.jpg

      General Discussion
    • [Solved] MSR actions aren't running anymore-- can't find what's broken

      E

      Suddenly my MSR actions aren't running anymore. I've had this before, but with an update to a new version it was fixed. see also

      https://smarthome.community/topic/987/msr-actions-aren-t-running-anymore-can-t-find-what-s-broken/3?_=1674661492589

      But an update from version 22240 to 22256 gave this time no result.

      The reactions aren't running correctly. Most of my MSR automations are use turn lights on/off, and time based automations nothing worked where MSR does his magic.

      I've also tested a bunch of things to see what's broken, here's what I've observed:
      -I can successfully flip lights on/off manually within Vera
      -I can successfully flip lights on/off manually within MSR's Entities section
      -the sensors are correctly reporting to Vera and MSR (I can see when they're switch on/off)
      -the rules within MSR are working correctly, I can see when they flip to 'true' of 'false' '
      '
      But I cannot successfully run the "Set Reaction" and "Reset Reaction" within MSR (by hitting the 'play' button)
      But the play buttons on the entitiy action in the "Set Reaction" and in "Reset Reaction" they work well.

      Can someone help me to get MSR working again

      MSR is running bare metal on Rpi4

      Multi-System Reactor
    • Reactor (Multi-System/Multi-Hub) Announcements

      toggledbits

      Build 21228 has been released. Docker images available from DockerHub as usual, and bare-metal packages here.

      Home Assistant up to version 2021.8.6 supported; the online version of the manual will now state the current supported versions; Fix an error in OWMWeatherController that could cause it to stop updating; Unify the approach to entity filtering on all hub interface classes (controllers); this works for device entities only; it may be extended to other entities later; Improve error detail in messages for EzloController during auth phase; Add isRuleSet() and isRuleEnabled() functions to expressions extensions; Implement set action for lock and passage capabilities (makes them more easily scriptable in some cases); Fix a place in the UI where 24-hour time was not being displayed.
      Multi-System Reactor
    • My MQTTController templates contribution

      Crille

      I've made a few templates for MQTTController, mostly Zigbee2MQTT, and sharing them to the community if anyone else would find use for them.

      GitHub - calmen77/MSR-mqtt_templates: MQTT templates for Multi-hub Reactor GitHub - calmen77/MSR-mqtt_templates: MQTT templates for Multi-hub Reactor

      MQTT templates for Multi-hub Reactor. Contribute to calmen77/MSR-mqtt_templates development by creating an account on GitHub.

      These are the ones I'm using but I'm happy to add more Zigbee2MQTT templates if needed.

      Happy Holidays!

      Multi-System Reactor
    • Sonoff zbmini-l and philips hue

      L

      Hello!

      I have recently begun making my home smarter, and I've run into some trouble while trying to get my Sonoff zbmini-l, which is connected to my Philips Hue bridge, to work properly. I am able to control it individually, but not through scenes or with the Google Home app. Has anyone else encountered this problem and know of a fix? Additionally, I have another Zigbee bridge, but I am unable to find the Sonoff device on it.

      Thank you in advance for your help!

      PS: I am very new to this.

      Zigbee
    • Ezlo Controller - Error Incompatible serialization data - api cloud Timeout

      N

      Hi,
      Connection to Ezlo is going in timeout with api-cloud.ezlo. This happens in anonymous_access set to false or in true.
      A lot of Error Incompatible serialization data (in the log I cut many more).
      In MSR controller status, Ezlo is in green icon but after sometime devices start to not respond.
      Can I have some help?

      Synology Nas - INTEL - DSM 7.1.1-42962 Update 3
      Ezlo Hub Model: h2.1 - v.2.0.35.2156.5
      Docker Container
      Reactor latest-23010-7dd2c9e9

      Thanks in advance

      [latest-23010]2023-01-20T18:11:08.069Z <app:null> Reactor build latest-23010-7dd2c9e9 starting on v16.15.1 [latest-23010]2023-01-20T18:11:08.071Z <app:null> Process ID 1 user/group 0/0; docker; platform linux/x64 #42962 SMP Tue Oct 18 15:07:03 CST 2022; locale (undefined) [latest-23010]2023-01-20T18:11:08.071Z <app:null> Basedir /opt/reactor; data in /var/reactor/storage [latest-23010]2023-01-20T18:11:08.071Z <app:null> NODE_PATH=/opt/reactor:/opt/reactor/node_modules [latest-23010]2023-01-20T18:11:08.085Z <app:INFO> Configured locale (undefined); selected locale(s) en-US.UTF-8 [latest-23010]2023-01-20T18:11:08.122Z <app:INFO> Loaded locale en-US [latest-23010]2023-01-20T18:11:08.128Z <Structure:null> Module Structure v22323 [latest-23010]2023-01-20T18:11:08.131Z <Capabilities:null> Module Capabilities v22356 [latest-23010]2023-01-20T18:11:08.166Z <Capabilities:NOTICE> System capabilities loaded from core distribution, data version 22356 revision 1 [latest-23010]2023-01-20T18:11:08.211Z <Plugin:null> Module Plugin v22300 [latest-23010]2023-01-20T18:11:08.238Z <TimerBroker:null> Module TimerBroker v22283 [latest-23010]2023-01-20T18:11:08.241Z <Entity:null> Module Entity v22353 [latest-23010]2023-01-20T18:11:08.247Z <Controller:null> Module Controller v22323 [latest-23010]2023-01-20T18:11:08.261Z <default:null> Module Ruleset v22293 [latest-23010]2023-01-20T18:11:08.262Z <default:null> Module Rulesets v22146 [latest-23010]2023-01-20T18:11:08.271Z <GlobalExpression:null> Module GlobalExpression v22146 [latest-23010]2023-01-20T18:11:08.296Z <Predicate:null> Module Predicate v22345 [latest-23010]2023-01-20T18:11:08.317Z <AlertManager:null> Module AlertManager v22283 [latest-23010]2023-01-20T18:11:08.322Z <Rule:null> Module Rule v22345 [latest-23010]2023-01-20T18:11:08.327Z <GlobalReaction:null> Module GlobalReaction v22324 [latest-23010]2023-01-20T18:11:08.329Z <Engine:null> Module Engine v23001 [latest-23010]2023-01-20T18:11:08.335Z <httpapi:null> Module httpapi v22347 [latest-23010]2023-01-20T18:11:08.400Z <wsapi:null> Module wsapi v22320 [latest-23010]2023-01-20T18:11:08.400Z <app:NOTICE> Starting Structure... [latest-23010]2023-01-20T18:11:08.460Z <InfluxFeed:null> Module InfluxFeed v22286 [latest-23010]2023-01-20T18:11:08.462Z <Structure:INFO> Structure#1 starting plugin influx (InfluxFeed) [latest-23010]2023-01-20T18:11:08.463Z <Structure:INFO> Structure#1 loading controller interface vera (VeraController) [latest-23010]2023-01-20T18:11:08.517Z <TaskQueue:null> Module TaskQueue 21351 [latest-23010]2023-01-20T18:11:08.518Z <VeraController:null> Module VeraController v22325 [latest-23010]2023-01-20T18:11:08.548Z <Structure:INFO> Structure#1 loading controller interface ezlo (EzloController) [latest-23010]2023-01-20T18:11:08.635Z <EzloController:null> Module EzloController v22344 [latest-23010]2023-01-20T18:11:08.867Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_613c8f94129e291209006add: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.868Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.869Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_613c9094129e291209006ae4: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.869Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.902Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_61437a57129e29124dfcd791: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.902Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.925Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_61437a58129e29124dfcd7a0: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.925Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.942Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_6198168b129e2918c5ce97bc: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.943Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.945Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_61981760129e2918c5ce97cb: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.945Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.945Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_61981770129e2918c5ce97d0: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.945Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.946Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_6198177e129e2918c5ce97d5: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.946Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.947Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_6198178b129e2918c5ce97da: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.947Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.947Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_6198179b129e2918c5ce97df: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.947Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.948Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_619817a6129e2918c5ce97e4: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.948Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:08.948Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_619817b2129e2918c5ce97e9: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:08.949Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.012Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_626d5d16129e291244463492: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.012Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.013Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_626d5d16129e291244463494: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.013Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.013Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_626d64d4129e2912444634a8: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.014Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.014Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_626d64d5129e2912444634af: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.014Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.015Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_626d64d5129e2912444634b2: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.015Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.039Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_629e6ec1129e2912b034351f: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.040Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.040Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_629e6ec2129e2912b0343529: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.040Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.041Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_629e6ec3129e2912b034352b: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.041Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.042Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_629e6ec3129e2912b034352d: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.042Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.043Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_629e6ec3129e2912b034352f: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.043Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.043Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_62a6d99a129e29123e7b0a8f: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.043Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Entity.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.044Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity device_62a6d99b129e29123e7b0a9d: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.044Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.060Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity room_629687b6129e2912430f2de2: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.060Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Group.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.061Z <Controller:WARN> EzloController#ezlo failed (1) to restore entity room_62a66189129e29124345f791: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.061Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Group.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at EzloController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new EzloController (/opt/reactor/server/lib/EzloController.js:707:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.128Z <Structure:INFO> Structure#1 loading controller interface groups (DynamicGroupController) [latest-23010]2023-01-20T18:11:09.146Z <DynamicGroupController:null> Module DynamicGroupController v22313 [latest-23010]2023-01-20T18:11:09.178Z <Controller:WARN> DynamicGroupController#groups failed (1) to restore entity earthquake_entities: [Error] Incompatible serialization data; can't unserialize [-] [latest-23010]2023-01-20T18:11:09.178Z <Controller:CRIT> Error: Incompatible serialization data; can't unserialize [-] Error: Incompatible serialization data; can't unserialize at Group.unserialize (/opt/reactor/server/lib/Entity.js:452:19) at /opt/reactor/server/lib/Controller.js:794:70 at Array.forEach (<anonymous>) at DynamicGroupController._restoreEntities (/opt/reactor/server/lib/Controller.js:782:36) at new Controller (/opt/reactor/server/lib/Controller.js:395:43) at new DynamicGroupController (/opt/reactor/server/lib/DynamicGroupController.js:207:9) at /opt/reactor/server/lib/Controller.js:451:37 [latest-23010]2023-01-20T18:11:09.186Z <Structure:INFO> Structure#1 loading controller interface weather (OWMWeatherController) [latest-23010]2023-01-20T18:11:09.219Z <OWMWeatherController:null> Module OWMWeatherController v22294 [latest-23010]2023-01-20T18:11:09.222Z <Structure:INFO> Structure#1 loading controller interface reactor_system (SystemController) [latest-23010]2023-01-20T18:11:09.227Z <SystemController:null> Module SystemController v22306 [latest-23010]2023-01-20T18:11:09.231Z <Structure:INFO> Structure#1 loading controller interface virtual (VirtualEntityController) [latest-23010]2023-01-20T18:11:09.238Z <VirtualEntityController:null> Module VirtualEntityController v22325 [latest-23010]2023-01-20T18:11:09.348Z <Structure:INFO> Starting controller VeraController#vera [latest-23010]2023-01-20T18:11:09.348Z <VeraController:NOTICE> VeraController#vera starting... [latest-23010]2023-01-20T18:11:09.357Z <Controller:INFO> VeraController#vera loaded vera capabilities ver 22253 rev 1 format 1 [latest-23010]2023-01-20T18:11:09.394Z <Controller:INFO> VeraController#vera loaded implementation data ver 22345 rev 1 format 1 [latest-23010]2023-01-20T18:11:09.394Z <Structure:INFO> Starting controller EzloController#ezlo [latest-23010]2023-01-20T18:11:09.397Z <Controller:INFO> EzloController#ezlo loaded ezlo capabilities ver 22266 rev 1 format 1 [latest-23010]2023-01-20T18:11:09.408Z <Controller:INFO> EzloController#ezlo loaded implementation data ver 22344 rev 1 format 1 [latest-23010]2023-01-20T18:11:09.408Z <Structure:INFO> Starting controller DynamicGroupController#groups [latest-23010]2023-01-20T18:11:09.413Z <Controller:NOTICE> Controller DynamicGroupController#groups is now online. [latest-23010]2023-01-20T18:11:09.413Z <Structure:INFO> Starting controller OWMWeatherController#weather [latest-23010]2023-01-20T18:11:09.503Z <Structure:INFO> Starting controller SystemController#reactor_system [latest-23010]2023-01-20T18:11:09.506Z <Controller:NOTICE> Controller SystemController#reactor_system is now online. [latest-23010]2023-01-20T18:11:09.537Z <Structure:INFO> Starting controller VirtualEntityController#virtual [latest-23010]2023-01-20T18:11:09.549Z <Controller:INFO> VirtualEntityController#virtual loaded virtualentity capabilities ver 22263 rev 2 format 1 [latest-23010]2023-01-20T18:11:09.550Z <Controller:INFO> VirtualEntityController#virtual loaded implementation data ver 22280 rev 1 format 1 [latest-23010]2023-01-20T18:11:09.556Z <VeraController:INFO> VeraController: deviceclass room capability sys_group does not provide attribute members [latest-23010]2023-01-20T18:11:09.556Z <VeraController:INFO> VeraController: deviceclass room capability sys_group does not provide attribute empty [latest-23010]2023-01-20T18:11:09.557Z <EzloController:INFO> EzloController#ezlo device mapping data loaded; checking... [latest-23010]2023-01-20T18:11:09.566Z <EzloController:INFO> EzloController#ezlo: connecting to hub "90000464" [latest-23010]2023-01-20T18:11:09.570Z <VirtualEntityController:INFO> VirtualEntityController#virtual configuring virtual .DefaultMode (vec01) [latest-23010]2023-01-20T18:11:09.571Z <VirtualEntityController:INFO> VirtualEntityController#virtual configuring virtual .GuestMode (vec02) [latest-23010]2023-01-20T18:11:09.571Z <VirtualEntityController:INFO> VirtualEntityController#virtual configuring virtual .PartyMode (vec03)
      Multi-System Reactor
    • MQTT log levels & log rotation

      tunnus

      Trying to set log level for MQTT to the lowest possible, is it in practise level 4? Also, would like to set maximum size and log rotation, but the following setup in logging.yaml did not work:

      MQTTController: level: 4 streams: - type: file maxsize: 2 keep: 2

      Using the latest build (23010).

      Multi-System Reactor
    For those who registered but didn't received the confirmation email, please send an email to support@smarthome.community with the email you used
    • Profile
    • Following 0
    • Followers 0
    • Topics 39
    • Posts 300
    • Best 18
    • Controversial 0
    • Groups 0

    parkerc

    @parkerc

    26
    Reputation
    95
    Profile views
    300
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    parkerc Unfollow Follow

    Best posts made by parkerc

    • RE: Messaging after VERA decoupling

      I’m a bit old school, I still use Prowl with my Veras - https://www.prowlapp.com/

      Here’s some code examples on how to use it.

      
      function my_escape (s)
          s = string.gsub(s, " ", "+")
          return s
      end
      
      function my_prowl (appl, event, description)
          local prowl_url      = "https://api.prowlapp.com/publicapi/add?apikey="
              .. "put-your-api-code-here"
              .. "&application=" .. my_escape(appl)
              .. "&event="         .. my_escape(event)
              .. "&description=" .. my_escape(description)
              .. "&priority=-1"
              .. "&url=https://www.google.co.uk/"
          luup.inet.wget(prowl_url)
      end
      
      my_prowl ("Vera Home Controller", "Testing code", "this could any description")
      

      Or something all in one..

      
      luup.inet.wget("https://api.prowlapp.com/publicapi/add?apikey=Your-api-key-goes-here&application=Test+Event&event=Armed+Notification&description=The+DSC+alarm+system+has+been+armed&priority=1")
      
      posted in Vera
      parkerc
      parkerc
    • Luup : Report - Last Trip

      I’m sure there is a better/more polished way to do this, but this remains one of my go to report urls on Vera.

      
      -- http://forum.micasaverde.com/index.php?topic=52025.msg334246#msg334246
      
      local d, n
      local file = io.open("/www/sb.html", "w")
         file:write("<head> <meta http-equiv='refresh' content='30' /> </head>\n")
         file:write("<style>.custom { font-size: 1em; font-family: Gill Sans Extrabold, sans-serif; padding:5px; border-collapse: collapse; border: 1px solid black; }</style><table class=custom><tr class=custom><th class=custom>Security Sensor</th><th class=custom>Last Tripped</th></tr>\n")
      
      local tt = {}
      for n,d in pairs(luup.devices) do
      
          if d.category_num == 4 then
          -- local lasttrip = tonumber(luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", n) or 0,10)
          local lasttrip = tonumber(luup.variable_get ("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", n) or os.time())
          local timeString = os.date(" %Y/%m/%d - %X", lasttrip)
          
          if lasttrip > 0 then
              table.insert(tt, { devnum=n, last=lasttrip, ltime=timeString })
          end
        end
      end
      
      table.sort(tt, function(a,b) return a.last > b.last end) -- sort highest to lowest
      
      for n,d in ipairs(tt) do
          
         file:write("<tr class=custom><td class=custom>" .. luup.devices[d.devnum].description .. "</td><td class=custom>".. d.ltime .. "</td></tr>\n")
      
          print (
          d.ltime ..
         ' : ' .. luup.devices[d.devnum].description .. " Sensor was last tripped")
      end
      file:write("</table>\n")
      file:close()
      
      
      posted in Code/Snippet library
      parkerc
      parkerc
    • RE: Generic support for vacuums

      Thanks - this is good timing as I’m at the point where I need to replace both the vacuum cleaner and also our lawn mower , and the robot option look very attractive in both areas

      posted in Plugins
      parkerc
      parkerc
    • Luup : Foscam API

      Sharing the love...

      As I have a number of foscam cameras around the house, using their API I created the following bit of code to set to retrieve any settings across all of them, to keep them in sync.

      This one gets the device name from each of them. If anyone has any variations or ways to improve the bit of code please let me know..

      local url = require("socket.url")
      local URL = "http://" 
      local username = "admin" 
      local password = "password" 
      local cmd = "getDevName"
      
      -- /cgi-bin/CGIProxy.fcgi?cmd=getDevName&usr=admin&pwd=
      
      local foscamsIPs = {
          { NO=1, IP="192.168.102.165:88", LOCATION="conservatory"}, 
          { NO=2, IP="192.168.102.38:80", LOCATION="boiler room"},
          { NO=3, IP="192.168.102.223:88", LOCATION="Living room"},
      	{ NO=4, IP="192.168.102.245:88", LOCATION="front room"},
      	{ NO=5, IP="192.168.102.104:88", LOCATION="kitchen"},
      }
      
      for k,v in pairs(foscamsIPs) do
        -- Read each value.
        local update = URL .. v["IP"] .. "/cgi-bin/CGIProxy.fcgi?cmd="..cmd.."&usr="..username.."&pwd="..password
        -- do this for each reading.
        local status, result = luup.inet.wget(update)
        	print(v["LOCATION"].. " status is " ..status.. " : result is " ..result)
      end````
      posted in Code/Snippet library
      parkerc
      parkerc
    • RE: SNMP - Is anyone leveraging info via the Simple Network Management Protocol ?

      Oh, and if I just want to pull one of the items I just specify the iso number with the snmpget command. E.g

      local command = io.popen("ssh -i /etc/dropbear/dropbear_rsa_host_key pi@192.168.102.37 'snmpget -v1 -c public 10.10.10.103 iso.3.6.1.2.1.1.1.0' 2>&1")
      local response = command:read("*a")
      print(response)
      

      which in this case will just return the first one.

      iso.3.6.1.2.1.1.1.0 = STRING: "Eaton 5P 1150"
      
      posted in General Discussion
      parkerc
      parkerc
    • RE: Nuke Vera Script

      Hey @rafale77

      I’m going to have a play with this later, as a comprehensive usb/serial server (https://smarthome.community/topic/209/home-automation-serial-server-raspberry-pi ) is something I’ve been tinkering with for years ! (https://community.getvera.com/t/building-a-ser2net-serial-to-ip-server/173673) - wow has it really been that long .. 2012 !!!

      Once announced and eventually added to Vera, Zigbee has been a capability that I’ve been keen to explore, but due to it’s lack of consistency (compared to z-wave) I’ve not invested much time.

      Although; it is on my HA to-do list, - out of my league, but by opening up the zigbee on Vera, is there the potential to extend its usage with (https://github.com/koenkk/zigbee-herdsman ) and (https://github.com/koenkk/zigbee2mqtt) ?

      posted in Vera
      parkerc
      parkerc
    • RE: Add-on - Aviosys IPPower 9258

      Thanks @toggledbits - it’s all working now !! 🤞🤞🤞

      My last piece is back to my other post around error handling, and how I can present that better to the user, and so for that topic, I;ll revert back to that thread.. - > https://smarthome.community/topic/777/luup-error-handling/9

      posted in Code/Snippet library
      parkerc
      parkerc
    • RE: Discover IR codes for lost remote

      There is a great community/code bank on GitHub.

      GitHub - probonopd/irdb: One of the largest crowd-sourced, manufacturer-independent databases of infrared remote control codes on the web, and aspiring to become the most comprehensive and most...

      GitHub - probonopd/irdb: One of the largest crowd-sourced, manufacturer-independent databases of infrared remote control codes on the web, and aspiring to become the most comprehensive and most...

      One of the largest crowd-sourced, manufacturer-independent databases of infrared remote control codes on the web, and aspiring to become the most comprehensive and most accurate one - GitHub - prob...

      Index of codes is here - https://github.com/probonopd/irdb/blob/master/index

      With their API - http://irdb.tk/api

      And you can retrieve a .csv set for anyone via https://cdn.jsdelivr.net/gh/probonopd/irdb@master/codes/Samsung/TV/7,7.csv

      posted in General Discussion
      parkerc
      parkerc
    • RE: Happy Birthday openLuup!

      Happy Birthday!

      posted in openLuup
      parkerc
      parkerc
    • RE: Lua - multi-part/form submission (Paperless-ngx API)

      Managed to get there in the end, posting here to help others..

      local http = require("socket.http")
      local ltn12 = require("ltn12")
      local mime = require("mime")
      local lfs = require("lfs")
      
      local username = "username,"
      local password = "password"
      
      http.TIMEOUT = 5
      
      local function upload_file ( url, filename, title, correspondent )
          local fileHandle = io.open( filename,"rb")
          local fileContent = fileHandle:read( "*a" )
          fileHandle:close()
      
          local boundary = 'abcd'
      	local cdfd = 'Content-Disposition: form-data; '
      
          local header_b = cdfd.. 'name="document"; filename="' ..filename.. '"\r\nContent-Type: application/pdf'
          local header_c = cdfd.. 'name="title"\r\n\r\n'..title
          local header_d = cdfd.. 'name="correspondent"\r\n\r\n'..correspondent
      
          local MP_b = '--'..boundary..'\r\n'..header_b..'\r\n\r\n'..fileContent..'\r\n'
          local MP_c = '--'..boundary..'\r\n'..header_c..'\r\n'
          local MP_d = '--'..boundary..'\r\n'..header_d..'\r\n'
      
          local MPCombined = MP_b..MP_c..MP_d..'--'..boundary..'--\r\n'
      
          local   response_body = { }
          local   _, code = http.request {
                  url = url ,
                  method = "POST",
                  headers = {    
      						["Authorization"] = "Basic " .. (mime.b64(username ..":" .. password)),
      						["Content-Length"] =  MPCombined:len(),
                              ['Content-Type'] = 'multipart/form-data; boundary=' .. boundary
                               },
                  source = ltn12.source.string(MPCombined) ,
                  sink = ltn12.sink.table(response_body),
                      }
           return code, table.concat(response_body)
      end
      
       -- local rc,content = upload_file ('http://httpbin.org/post', '/mnt/nas/10.pdf' )
       local rc,content = upload_file ('http://192.168.1.134:8777/api/documents/post_document/', '/mnt/nas/10.pdf', 'Companies House', '12')
       print(rc,content)
      
      posted in Code/Snippet library
      parkerc
      parkerc

    Latest posts made by parkerc

    • DisplayLine1 & 2 - Ability to align text?

      Hi

      Just wondering if it’s possible when writing plugins to set if the text shown via DisplayLine1/2 can be left, right or centre aligned ?

      posted in openLuup
      parkerc
      parkerc
    • RE: Lua - multi-part/form submission (Paperless-ngx API)

      Managed to get there in the end, posting here to help others..

      local http = require("socket.http")
      local ltn12 = require("ltn12")
      local mime = require("mime")
      local lfs = require("lfs")
      
      local username = "username,"
      local password = "password"
      
      http.TIMEOUT = 5
      
      local function upload_file ( url, filename, title, correspondent )
          local fileHandle = io.open( filename,"rb")
          local fileContent = fileHandle:read( "*a" )
          fileHandle:close()
      
          local boundary = 'abcd'
      	local cdfd = 'Content-Disposition: form-data; '
      
          local header_b = cdfd.. 'name="document"; filename="' ..filename.. '"\r\nContent-Type: application/pdf'
          local header_c = cdfd.. 'name="title"\r\n\r\n'..title
          local header_d = cdfd.. 'name="correspondent"\r\n\r\n'..correspondent
      
          local MP_b = '--'..boundary..'\r\n'..header_b..'\r\n\r\n'..fileContent..'\r\n'
          local MP_c = '--'..boundary..'\r\n'..header_c..'\r\n'
          local MP_d = '--'..boundary..'\r\n'..header_d..'\r\n'
      
          local MPCombined = MP_b..MP_c..MP_d..'--'..boundary..'--\r\n'
      
          local   response_body = { }
          local   _, code = http.request {
                  url = url ,
                  method = "POST",
                  headers = {    
      						["Authorization"] = "Basic " .. (mime.b64(username ..":" .. password)),
      						["Content-Length"] =  MPCombined:len(),
                              ['Content-Type'] = 'multipart/form-data; boundary=' .. boundary
                               },
                  source = ltn12.source.string(MPCombined) ,
                  sink = ltn12.sink.table(response_body),
                      }
           return code, table.concat(response_body)
      end
      
       -- local rc,content = upload_file ('http://httpbin.org/post', '/mnt/nas/10.pdf' )
       local rc,content = upload_file ('http://192.168.1.134:8777/api/documents/post_document/', '/mnt/nas/10.pdf', 'Companies House', '12')
       print(rc,content)
      
      posted in Code/Snippet library
      parkerc
      parkerc
    • RE: Lua - multi-part/form submission (Paperless-ngx API)

      --

      To provide some additional information, the following Curl command sent to httpbin.org/post..

      local url_open = 'curl -u "username:password" -F "title=Companies House File" -F "correspondent=12" -F "document=@/mnt/nas/10.pdf" http://httpbin.org/post'
      local command = io.popen(url_open)
      local result = command:read("*a")
      print(result)
      

      Returns the following, which looks good…

      {
      "args": {}, 
      "data": "", 
      "files": {
      "document": "data:application/octet-stream;base64,JVBERi0xLjMNJeLjz9MNCjIyNyAwIG9iag08PCANL0xpbmVhcml6ZWQgMSANL08gMjMxIA0vSCBbIDIzNTAgODc5IF<REDACTED>T5dDT4+DXN0YXJ0eHJlZg0xNzMNJSVFT0YN"
      }, 
      "form": {
      "correspondent": "12", 
      "title": "Companies House File"
      }, 
      "headers": {
      "Accept": "*/*", 
      "Authorization": "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", 
      "Content-Length": "66501", 
      "Content-Type": "multipart/form-data; boundary=------------------------1a4c10e40f1ccf8e", 
      "Host": "httpbin.org", 
      "User-Agent": "curl/7.38.0", 
      "X-Amzn-Trace-Id": "Root=1-6360dbdb-6bea68142a74a1762e74ca04"
      }, 
      "json": null, 
      "origin": "82.30.93.28", 
      "url": "http://httpbin.org/post"
      }
      

      Then using the following Lua code to try and achieve the same thing..

      local http = require("socket.http")
      local ltn12 = require("ltn12")
      local mime = require("mime")
      local lfs = require("lfs")
      
      local username = "username"
      local password = "password"
      
      local httpendpoint = 'http://httpbin.org/post'
      local filepath = "/mnt/nas/10.pdf"
      local file = io.open(filepath, "rb")
      local contents = file:read( "*a" )
      
      -- https://stackoverflow.com/questions/3508338/what-is-the-boundary-in-multipart-form-data
      
      local boundary = "-----BoundaryePkpFF7tjBAqx29L"
      local send = "--"..boundary..
                  "\r\nContent-Disposition: form-data; title='Companies House File'\r\n"
      			.."----"..boundary..
      			"\r\nContent-Disposition: form-data; document="..filepath..
                  "\r\nContent-type: application/pdf".."\r\n"
      			..contents.."\r\n"
      			.."------"..boundary.."--\r\n"
      
      -- Execute request (returns response body, response code, response header)
      
      local resp = {}
      local body, code, headers, status = http.request {
          url = httpendpoint,
          method = 'POST',
          headers = {
      		["Authorization"] = "Basic " .. (mime.b64(username ..":" .. password)),
      		["Content-Length"] = lfs.attributes(filepath, 'size'),
      		['Content-Type'] = "multipart/form-data; boundary="..boundary,
          },
         -- source = ltn12.source.file( io.open(filepath,"rb") ),
         source = ltn12.source.file( io.open(send) ),
          sink = ltn12.sink.table(resp)
      }
      
      print(body, code, headers, status)
      print(table.concat(resp))
      
      if headers then 
          for k,v in pairs(headers) do 
              print(k,v) 
          end
      end
      
      

      I get this returned..

      nil     -------BoundaryePkpFF7tjBAqx29L 
      Content-Disposition: form-data; title='Companies House File' 
      ---------BoundaryePkpFF7tjBAqx29L 
      Content-Disposition: form-data; document=/mnt/nas/10.pdf 
      Content-type: application/pdf 
      %PDF-1.3 %âãÏÓ 
      227 0 obj << /Linearized 1 /O 231 /H [ 2350 879 ] /L 66081 /E 19639 /N 4 /T 61422 >> endobj xref 227 57 0000000016 00000 n 
      0000001509 00000 n 
      0000001585 00000 n 
      0000001726 00000 n 
      0000003229 00000 n 
      0000003404 00000 n 
      0000003589 00000 n 
      0000003808 00000 n 
      0000003956 00000 n 
      0000004161 00000 n 
      0000004309 00000 n 
      0000004515 00000 n 
      0000004663 00000 n 
      0000004843 00000 n 
      0000005015 00000 n 
      0000005218 00000 n 
      0000005366 00000 n 
      0000005570 00000 n 
      0000005718 00000 n 
      0000006003 00000 n 
      0000006289 00000 n 
      0000006456 00000 n 
      0000006549 00000 n 
      0000006804 00000 n 
      0000007035 00000 n 
      0000007265 00000 n 
      0000007461 00000 n 
      0000007655 00000 n 
      0000007851 00000 n 
      0000008046 00000 n 
      0000008253 00000 n 
      0000008400 00000 n 
      0000008622 00000 n 
      0000008770 00000 n 
      0000008982 00000 n 
      0000009130 00000 n 
      0000009353 00000 n 
      0000009501 00000 n 
      0000009720 00000 n 
      0000009866 00000 n 
      0000010075 00000 n 
      0000010223 00000 n 
      0000010948 00000 n 
      0000011372 00000 n 
      0000011394 00000 n 
      0000011503 00000 n 
      0000012853 00000 n 
      0000013021 00000 n 
      0000013133 00000 n 
      0000014623 00000 n 
      0000014730 00000 n 
      0000016927 00000 n 
      0000016950 00000 n 
      0000019315 00000 n 
      0000019394 00000 n 
      0000002350 00000 n 
      0000003207 00000 n 
      trailer << /Size 284 /Info 226 0 R /Encrypt 229 0 R /Root 228 0 R /Prev 61411 /ID[] >> startxref 0 %%EOF 228 0 obj << /Type /Catalog /Pages 225 0 R /AcroForm 230 0 R >> endobj 229 0 obj << /Filter /Standard /V 1 /R 2 /O (ÞŒŠþ0á6xƒV\nX¹#'ügã;Èè_Žu®ãªæu_-) /U (Ôeè³~„ˆ¸ÚC»ÒV!Øm: No such file or directory     
      

      It’s clear I’m not getting the content sent in the right format/structure, but I cannot find any guidance that clearly explains how to construct a multi-part form submissions via Lua code..

      Hoping someone can help…

      posted in Code/Snippet library
      parkerc
      parkerc
    • Lua - multi-part/form submission (Paperless-ngx API)

      Hi

      I’ve been investing a lot of time recently trying to digitise everything I can, and my current adventure is with all my paper documents.

      My tool of choice is Paperless-ngx, which so far is an amazing open source solution, and highly recommended if you’re interest in such a thing…

      Such a move to Paperless would not be complete without some form of integration into Vera / openLuup, and thankfully it has a nice Rest API (https://paperless-ngx.readthedocs.io/en/latest/api.html) I can use. So far I’ve been able to make use the GET requests, to provide document counts etc., but it’s the mutipart/form data piece where I’m struggling..

      The Curl command to upload a document, is as follows

      curl -H "Authorization: Basic Y2hyaXM62tgbsgjunotmeY2hyaXNob3N0aW5n" -F "title=Companies House File 10" -F "correspondent=12" -F "document=@/mnt/nas/10.pdf" http://192.168.102.134:8777/api/documents/post_document/
      

      But, I’d like to know how to do this with Lua code, more just to help me in my Lua learning curve, and what I thought would be reasonably straight forward thing to do, has turned out to be quite the opposite 🙂 Sending a multipart form data submission via http.request, is not as straight forward as I hoped. If anyone has any time to help, I’d appreciate some guidance on what I’m missing with the following, as based on the feedback, it looks like it not seeing the file (which I think I’ve confirmed by trying to sending both the curl and Lua commands to httbin.org ) …

      local http = require("socket.http")
      local ltn12 = require("ltn12")
      local mime = require("mime")
      local lfs = require("lfs")
      
      local username = "username"
      local password = "password"
      
      local httpendpoint = 'http://httpbin.org/post'
      local filepath = "/mnt/nas/10.pdf"
      local file = io.open(filepath, "rb")
      local contents = file:read( "*a" )
      
      -- https://stackoverflow.com/questions/3508338/what-is-the-boundary-in-multipart-form-data
      
      local boundary = "-----BoundaryePkpFF7tjBAqx29L"
      local send = "--"..boundary..
                  "\r\nContent-Disposition: form-data; title='Companies House File'\r\n"
      			.."----"..boundary..
      			"\r\nContent-Disposition: form-data; document="..filepath..
                  "\r\nContent-type: application/pdf".."\r\n"
      			..contents.."\r\n"
      			.."------"..boundary.."--\r\n"
      
      -- Execute request (returns response body, response code, response header)
      
      local resp = {}
      local body, code, headers, status = http.request {
          url = httpendpoint,
          method = 'POST',
          headers = {
      		["Authorization"] = "Basic " .. (mime.b64(username ..":" .. password)),
      		["Content-Length"] = lfs.attributes(filepath, 'size'),
      		['Content-Type'] = "multipart/form-data; boundary="..boundary,
          },
         -- source = ltn12.source.file( io.open(filepath,"rb") ),
         source = ltn12.source.file( io.open(send) ),
          sink = ltn12.sink.table(resp)
      }
      
      print(body, code, headers, status)
      print(table.concat(resp))
      
      if headers then 
          for k,v in pairs(headers) do 
              print(k,v) 
          end
      end
      
      posted in Code/Snippet library
      parkerc
      parkerc
    • RE: Generic support for vacuums

      Ok, I decided to dive into Robot Vaccum cleaners , so picked up an 2nd hand Roomba e5 and have also got a Deenkee arriving tomorrow (damn you Amazon and your lightening deals !!!)

      Now, I obviously will want to get them both integrated into my Vera/OpenLuup world at some point, and starting with the Roomba, I’ve been trying to get Rest980 up and running (https://github.com/koalazak/rest980)..

      Is anyone already using this to interface with their Roomba ?
      If not, what are people using with their Roombas?

      posted in Plugins
      parkerc
      parkerc
    • RE: Lua : Downloading a file over https

      Ok, not had much luck with the variations I tried, 😞

      One thing I did notice was that the luasec version on VeraPlus is v0.4 and the openssl version is v1.0.2

      # openssl version
      OpenSSL 1.0.2l  25 May 2017
      

      Checking the luasec guidance here, https://github.com/brunoos/luasec/wiki/LuaSec-1.0.x , that VeraPlus openSSL version supports luasec v 1.0.x ?

      Without being able to install/use Luarocks, any idea how to upgrade from luasec 0.4 to 1.0.x?

      posted in Code/Snippet library
      parkerc
      parkerc
    • RE: Lua : Downloading a file over https

      Thanks all..

      Looks like curl is the way to go in situations like this..

      Quick question in regards to being able to do this all in Lua on a VeraPlus, I came across the following bit of code (not sure of the origin, but i can see it specifies a certificate file, is this an option ?

      require("socket")
      local ssl = require("ssl")
      local url = "test"
      
      local params = {
        mode = "client",
        protocol = "tlsv1_2",
        cafile = "/path/to/downloaded/cacert.pem", --<-- added cafile parameters
        verify = "peer", --<-- changed "none" to "peer"
        options = "all",
      }
      
      local conn = socket.tcp()
      conn:connect(url, 443)
      
      -- TLS/SSL initialization
      conn = ssl.wrap(conn, params)
      conn:dohandshake()
      
      conn:send("GET / HTTP/1.1\n\n")
      local line, err = conn:receive()
      print(err or line)
      conn:close()
      
      posted in Code/Snippet library
      parkerc
      parkerc
    • RE: Lua : Downloading a file over https

      Is the lack of TLS 1.2 with Vera addressed with something like this, not sure how this works, but I assume there is a default if something is not specified ?

      local _, code = https.request{
            url = url,
            protocol = "tlsv1_2",
           }
           ResetData()
           Log(" sent data status: " .. code)
      return code
      
      posted in Code/Snippet library
      parkerc
      parkerc
    • RE: Lua : Downloading a file over https

      Sorry, yes this is being done on my VeraPlus, with latest ‘production’ firmware 7.31..

      When I run this, i get nothing back not even an error for the https call.

      Print output
      --------DOWNLOAD http---------     
      { status="HTTP/1.1 200 OK", length=129373, headers={ x-content-type-options="nosniff", x-cache="MISS", server-timing="x-cache;desc=MISS, x-tw-cdn;desc=FT", x-served-by="cache-lhr6621-LHR, cache-tw-ZZZ1", content-length="129373", strict-transport-security="max-age=631138519", access-control-allow-origin="*", x-tw-cdn="FT", access-control-expose-headers="Content-Length", content-type="image/jpeg", timing-allow-origin="https://twitter.com, https://mobile.twitter.com", accept-ranges="bytes", connection="close", date="Tue, 20 Sep 2022 13:31:56 GMT", cache-control="max-age=604800, must-revalidate", last-modified="Fri, 10 Apr 2015 23:57:23 GMT" }, code=200 }     
      --------DOWNLOAD https---------    
      
      
      posted in Code/Snippet library
      parkerc
      parkerc
    • Lua : Downloading a file over https

      Hi,

      I’m sure this is not a unique question about Vera (& Lua 5.1) and I’ve seen this reference in place,, but I can’t seem to find a fix to make an https download request work..

      To give you an example, the code below aims to download 2 different files, the http call works fine, returning a 200 code, but the https one doesn’t, it doesn’t return anything ?

      Please could some highlight what I’m missing?

      print("--------DOWNLOAD http---------")
      
      local http = require("socket.http")
      local body, code = http.request("http://pbs.twimg.com/media/CCROQ8vUEAEgFke.jpg")
      print(code)
      if not body then error(code) end
      local f = assert(io.open('mnt/nas/webtest1.jpg', 'wb')) -- open in "binary" mode
      f:write(body)
      f:close()
      
      print("--------DOWNLOAD https---------")
      
      local https = require "ssl.https" --luasec
      local body, code = https.request("https://u.cubeupload.com/jbcooper/16146313918060.jpg")
      print(code)
      if not body then error(code) end
      local f = assert(io.open('mnt/nas/webtest2.jpg', 'wb')) -- open in "binary" mode
      f:write(body)
      f:close()
      posted in Code/Snippet library
      parkerc
      parkerc