• Categories
  • Recent
  • Tags
  • Popular
  • Unsolved
Collapse
Discussion Forum to share and further the development of home control and automation, independent of platforms.

SmartHome Community

Beginner assistance
R

Hi folks,

I currently have some cheap Zigbee hub and some Amazon Alexas running my smart home which mostly consists of Zigbee power strips and Zigbee battery powered switches.

It all worked OK originally, but now whenever I press a Zigbee switch the light in the corresponding plug switches on then immediately off again.

If I ask Alexa to turn the light on it works fine. Likewise if I switch it on from my phone.

Any ideas what the issue could be?

I've tried unplugging the hub a number of times but that doesn't seem to fix it.

I was thinking about getting a Homey Pro 2023 to speed things up (tmas the Zigbee hub seems to be really slow now as well, for some reason) but I'm not sure about that either.

Any suggestions greatly appreciated!

General Discussion
Replacing Nest Thermostat but....
DesTD

Hey guys...

We are replacing the heat pump and furnace this week and I will also need to replace my nest thermostat at the same time 'cause Nest is ending the cloud thing end of the month.

Anyway, I'm looking to use the

T6 Pro Z-Wave Programmable Thermostat | Smart Home | Honeywell Home

That's what the heat pump installer recommend BUT, using Nest I was also using it to control the home humidifier using a single wire connected to nest... but no low voltage thermostat is able to do that, I checked all of them...

So I need some help on how I can do that, to connect the home humidifier using zwave also....

General Discussion
Prensence sensor - client - base technologi
E

Hi

We are looking for a solution where we can detect presence of a «thing» (people , car , dog, cat, and more..

We need:

fast detections, 1-3 seconds in range from 0 to 20 m from «base» fysical «client» , chip , transmitter , unit. base , receiver placed at a door, gate, house, etc uniq Identifying wireless

The client:

no need for pressing any thing (no buttons) battery , hoply 2-5 years battery time.

Have someone done anything like this?
What technologi will be best?

General Discussion
Smart bed sensor
C

Hey everyone, I'm currently working on developing a bed sensor that can detect when you're out of bed. It could be used to trigger other smart home gadgets, like lights or blinds, temperature etc.
The sensors are placed under the legs of your bed post. Should look and feel like "smart furniture pads" with size 2 inches in diameter and 1/4 inch thick.
Before we go any further, I'd love to get your thoughts on this - would a bed sensor like this be something you'd find useful? We're still in the early stages of development, so any feedback you have would be greatly appreciated. Thanks in advance!

smart möbeltass.JPG

General Discussion
Block Code (Fenced) formatting issues in new forums
toggledbitsT

@DesT, fenced code blocks display differently after the upgrade.

abc def

The above should display as abc and def on two separate lines. This works. But this fails:

verbose: true config: data: "auto"

The above should display as three lines, verbose: true, config: and data: "auto", but this fails. In order to make it display properly, I now have to open the fenced code block with ```text (specify language, generic text). This displays without highlighting. The words yml and yaml (and the all-caps versions) don't seem to be recognized. I can also use js to get JavaScript highlighting, but this isn't great for YAML. Here's the same block with the language (text) specifier added (no other changes):

verbose: true config: data: "auto"

Sure, we can start adding language specifiers to our new posts, but I suspect if we start digging around old posts, we're going to find a lot of broken display of the fenced code blocks (plain ``` at the start with no language specifier) in the thousands of old posts in these forums, upon which people still rely for answers and information.

Log file snippets also get similarly brutalized:

[###BUILDVERSION###]2023-04-26T19:41:51.683Z <ZWaveJSController:NOTICE> ZWaveJSController#zwavejs added file logger to zwavejs.log [###BUILDVERSION###]2023-04-26T19:41:51.747Z <ZWaveJSController:WARN> zwavejs_capabilities defines x_zwave_device_cfg, which is not consistent with the recommended naming [###BUILDVERSION###]2023-04-26T19:41:51.747Z <ZWaveJSController:WARN> zwavejs_capabilities defines x_zwave_mfg_spec, which is not consistent with the recommended naming [###BUILDVERSION###]2023-04-26T19:41:51.747Z <ZWaveJSController:WARN> zwavejs_capabilities defines x_zwave_device_ver, which is not consistent with the recommended naming [###BUILDVERSION###]2023-04-26T19:41:51.747Z <ZWaveJSController:WARN> zwavejs_capabilities defines x_zwave_values, which is not consistent with the recommended naming [###BUILDVERSION###]2023-04-26T19:41:51.837Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs connecting to ws://192.168.0.10:3000 [###BUILDVERSION###]2023-04-26T19:41:51.874Z <ZWaveJSController:NOTICE> ZWaveJSController#zwavejs connected [###BUILDVERSION###]2023-04-26T19:41:51.874Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs sending connection initialization [###BUILDVERSION###]2023-04-26T19:41:51.931Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs greeting from server: [Object]{ "type": "version", "driverVersion": "10.16.0", "serverVersion": "1.28.0", "homeId": 3631280043, "minSchemaVersion": 0, "maxSchemaVersion": 28 } [###BUILDVERSION###]2023-04-26T19:41:51.932Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs performing initial inventory [###BUILDVERSION###]2023-04-26T19:41:52.325Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs manufacturer-specific data for 134 (AEON Labs) from package ver 22315.1 [###BUILDVERSION###]2023-04-26T19:41:52.328Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs configuring node 1 endpoint 0 (entity "1-0") [###BUILDVERSION###]2023-04-26T19:41:52.339Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs manufacturer-specific data for 543 (Elexa Consumer Products Inc.)

I think this is going to be a problem. Is there a way in NodeBB to configure the default language for fenced code block markdown for the entire forum so that these display more as they did before the upgrade?

EDIT: Examples below of old posts with corrupt formatting now:

https://smarthome.community/topic/1101/dynamic-groups-controller-filter-expressions

https://smarthome.community/post/11362

This last old post is interesting, because the first block displays incorrectly, but the second block is OK. In playing around, there seem to be triggering character sequences, suggesting that the markdown processor is trying to "guess" the language but not getting it right, perhaps:

https://smarthome.community/post/11332

General Discussion
Privacy concerns in Smart homes survey
M

Hi guys,
we are doing a survey in IT privacy and security and we want to analyze the user perception of privacy concerns in smart homes. It will only take 5-10 min to fill out the survey 🙂
i would be very thankful if you could take part and help us to get as many responses as possible.

User Perception of Privacy concerns of actual and potential Home Automatisation users

Thank you!

General Discussion
MIOS - UI5 web login
Black CatB

Can anyone help with the MIOS UI5 weblink? Not the getvera one.
Still running UI5 on a couple of sensors & lights and need to tweak PLEG but for the life of me I can't remember the link to tunnel back to the trusty machine....

General Discussion
Smart devices and mesh
J

The wifi on my router is turned off, and wifi around the house is provided using a mesh - 3 units altogether (one connected directly to the router) that are spread around the house.

I would like to start automating certain tasks around the house and intend to try adding a few smart sockets to my setup.

The mesh system I have supports both 2.4GHz and 5GHz, and does not provide me with the option to control them - i.e. turn one or both on/off, give each a different SSID, etc.

The devices I wish to purchase/use only support 2.4GHz.

Will turning the mesh units off and temporarily turning the 2.4GHz wifi on the router to allow me to set them up be enough? Will I then be able to return to my usual setup and everything will work as it should?

Many thanks in advance

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
A topic for self learning...
CatmanV2C

...which I'd like to do. I know I go about these things all wrong (namely think of something I'd like to do, then try and work out what I need to know) but that's me 🙂

Just looking for some pointers on what I should google for really:

What I'd like is to provide a selection of (basically two word) phases which I can select from randomly (or even pseudo randomly) and pass to Alexa to be spoken. There are 10 such phrases only.

So what should I be reading up on to get me started?

TIA for any guidance

C

General Discussion
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
LibraSun's Dashboard Apps Roundup 2023
LibraSunL

For what it's worth, I've been putting the finishing touches on a much-updated version of my DP Apps spreadsheet -- specifically intended for HE users, at least for now -- and invite you all to take a gander http://bit.ly/hedb23 at the PDF one-page version.

Corrections and edits welcome (esp. for the HOMEKIT column, just added yesterday)! Thanks in advance, especially because I'm not a big dashboard user myself, but somehow accepted this role as "keeper of the list" as it were.

General Discussion
Separate switching bulb in one ceiling light
P

Hello guys,

I would like to achieve two different things with lights, but I am not sure it could be done. I am starting with smart things, and I am far from any electrician knowledge, wo any help is really appreciated.

I have dumb switches in my hall, controlled from 3 places. I understood that installing one smart module before first switch will make them "hybrid", both smart controlled and dumb controlled.

I would like to buy ceiling light with two bulb sockets. What I would like to achieve is I would like to have one bulb for normal daily usage (lets say cold white full brightness), and second for night time (aprox from 10pm till morning) with some red/orange - minimum brightness.

So question are:

Is there a way to keep both bulbs turning-on separated? So only one will be on during day, and then only second during night?

And could that be done with pressing dumb switch? What would I need to achieve it? (maybe another module into the ceiling lights)

Thank you in advance

General Discussion

Welcome. If you’d like to participate in the discussion, rather than just read, then you can join the forum. As a member, you can interact with others here to share your experience and ask the questions you need answered.

For those who registered but didn't received the confirmation email, please send an email to support@smarthome.community with the email you used

Latest version is installed, we are still working on some visual changes.

SNMP - Is anyone leveraging info via the Simple Network Management Protocol ?

Scheduled Pinned Locked Moved General Discussion
18 Posts 2 Posters 517 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • parkercP Offline
    parkercP Offline
    parkerc
    wrote on last edited by
    #1

    Hi

    In my ongoing quest to try and retrieve as much information as I can about the amount of energy I’m using , I found out that I could use SNMP to see how much power (watts) my UPS is handling .

    To do this, I installed snmpd/snmp on my Vera linked Raspberry Pi, and then ran the following command.

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

    Which returned a huge amount of information, which prompted me to ask the community here if there anything on Vera/OpenLuup that people have that can process this sort of information into a new devices and associated variables to then monitor/track going forward ?

    iso.3.6.1.2.1.1.1.0 = STRING: "Eaton 5P 1150"
    iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.705.1
    iso.3.6.1.2.1.1.3.0 = Timeticks: (51435090) 5 days, 22:52:30.90
    iso.3.6.1.2.1.1.4.0 = STRING: "Computer Room Manager"
    iso.3.6.1.2.1.1.5.0 = STRING: "ups239"
    iso.3.6.1.2.1.1.6.0 = STRING: "Computer Room"
    iso.3.6.1.2.1.1.7.0 = INTEGER: 72
    iso.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.1
    iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.10.3.1.1
    iso.3.6.1.2.1.1.9.1.2.3 = OID: iso.3.6.1.6.3.11.3.1.1
    iso.3.6.1.2.1.1.9.1.2.4 = OID: iso.3.6.1.6.3.15.2.1.1
    iso.3.6.1.2.1.1.9.1.2.5 = OID: iso.3.6.1.6.3.16.2.1.1
    iso.3.6.1.2.1.1.9.1.3.1 = STRING: "The MIB Module from SNMPv2 entities"
    iso.3.6.1.2.1.1.9.1.3.2 = STRING: "SNMP Management Architecture MIB"
    iso.3.6.1.2.1.1.9.1.3.3 = STRING: "Message Processing and Dispatching MIB"
    iso.3.6.1.2.1.1.9.1.3.4 = STRING: "USM User MIB"
    iso.3.6.1.2.1.1.9.1.3.5 = STRING: "VACM MIB"
    iso.3.6.1.2.1.1.9.1.4.1 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.2 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.3 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.4 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.5 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.2.1.0 = INTEGER: 2
    iso.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
    iso.3.6.1.2.1.2.2.1.1.2 = INTEGER: 2
    iso.3.6.1.2.1.2.2.1.2.1 = STRING: "LOOPBACK"
    iso.3.6.1.2.1.2.2.1.2.2 = STRING: "eth0"
    iso.3.6.1.2.1.2.2.1.3.1 = INTEGER: 24
    iso.3.6.1.2.1.2.2.1.3.2 = INTEGER: 6
    iso.3.6.1.2.1.2.2.1.4.1 = INTEGER: 1500
    iso.3.6.1.2.1.2.2.1.4.2 = INTEGER: 1500
    etc....
    
    1 Reply Last reply
    0
  • parkercP Offline
    parkercP Offline
    parkerc
    wrote on last edited by
    #2

    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"
    
    1 Reply Last reply
    2
  • propheadP Offline
    propheadP Offline
    prophead
    wrote on last edited by
    #3

    I use a lua scene to read snmp network usage from my switches. Working great for a couple of years now.

    1 Reply Last reply
    0
  • parkercP Offline
    parkercP Offline
    parkerc
    wrote on last edited by
    #4

    Hi @prophead - can you share more details on the Scene, is it with Lua/luup code ?

    propheadP 2 Replies Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    replied to parkerc on last edited by prophead
    #5

    @parkerc Yes, I have 3 lua scenes, one for each switch for LAN monitoring and one for my Edgerouter for WAN monitoring. Each uses the same basic snmp framework with device specific tweaks and then saves results to an empty device and then I graph those device variables. I'm happy to share my code below:

    1 Reply Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    replied to parkerc on last edited by
    #6

    @parkerc this is the Dlink 8 port SNMP switch lua:

    -- SNMP 8 port BWmon
    -- read stored in/out values
    local lines = ""
    local Din = {}
    local Dout = {}
    local Oin = {}
    local Oout = {}
    local Nin = {}
    local Nout = {}
    local T = {}
    local i,j
    
    --check for switch
    local ping = os.execute("ping -c 1 192.168.1.11")
    if ping ~= 0 then
      luup.log("Dlink 8: Switch down. Aborted.")
      do return end
    end
    
    for i = 1,8 do
    -- read stored values
       local f = io.open("/tmp/8"..i.."I.txt")
       if f then
       for line in f:lines() do
         lines = line
       end -- for each line
      f:close()
      else os.execute("touch /tmp/8"..i.."I.txt")
      end
    
      if not lines then lines = "0" end
      Oin[i] = lines
      --print (Oin[i])
      
       local f = io.open("/tmp/8"..i.."O.txt")
       if f then
         for line in f:lines() do
           lines = line
         end -- for each line
       f:close()
       else os.execute("touch /tmp/8"..i.."O.txt")
       end
    
      if not lines then lines = "0" end
      Oout[i] = lines
      --print (Oout[i])
    
    end -- for each port read
    
    -- parse values
    for j = 1,8 do
    
    Oin[j] = string.match(Oin[j], ".*Counter32: (%d+)")
    if Oin[j] == "" or Oin[j] == nil then Oin[j] = 0 end
    Oout[j] = string.match(Oout[j], ".*Counter32: (%d+)")
    if Oout[j] == "" or Oout[j] == nil then Oout[j] = 0 end
    
    -- read snmp
    lines = ""
    os.execute("/usr/bin/snmpget -r 1 -v1 -c PASSWORD 192.168.1.11 iso.3.6.1.2.1.2.2.1.10."..j.." >/tmp/8"..j.."I.txt")
    local f = io.open("/tmp/8"..j.."I.txt")
       if not f then return end  
       for line in f:lines() do
          lines = line
       end
    f:close()
    Nin[j] = lines
    --print (Nin[j])
    
    lines = ""
    os.execute("/usr/bin/snmpget -r 1 -v1 -c PASSWORD 192.168.1.11 iso.3.6.1.2.1.2.2.1.16."..j.." >/tmp/8"..j.."O.txt")
    local f = io.open("/tmp/8"..j.."O.txt")
       if not f then return end  
       for line in f:lines() do
          lines = line
       end
    f:close()
    Nout[j] = lines
    --print (Nout[j])
    
    --parse
    Nin[j] = string.match(Nin[j], ".*Counter32: (%d+)")
    if Nin[j] == "" or Nin[j] == nil then Nin[j] = 0 end
    Nout[j] = string.match(Nout[j], ".*Counter32: (%d+)")
    if Nout[j] == "" or Nout[j] == nil then Nout[j] = 0 end
    
    --print (Nin[j])
    --print (Nout[j])
    
    --deltas
    Din[j] = Nin[j] - Oin[j]
    Dout[j] = Nout[j] - Oout[j]
    
    local max32 = 4294967295
    --local max32 = 4294966864
    
    -- handle rotation
    if Nin[j] < Oin[j] then Din[j] = max32 - Oin[j] + Nin[j] end
    if Nout[j] < Oout[j] then Dout[j] = max32 - Oout[j] + Nout[j] end
    if Din[j] > max32 or Din[j]<0 then Din[j] = 0 end --math.max(Oin[j],Nin[j]) end
    if Dout[j] > max32 or Dout[j]<0 then Dout[j] = 0 end --math.max(Oout[j],Nout[j]) end
    
    end -- end for each port write
    
    -- add real time interval tracking
    -- read old time
    lines = ""
    local ot = ""
    local f = io.open("/tmp/lastDlink8run.txt")
        if not f then os.execute("touch /tmp/lastDlink8run.txt") return end
        for line in f:lines() do
            ot = line
        end
    f:close()
    if not ot then ot = "300" end -- default to five minutes
    
    -- write new time
    local nt = tonumber(os.time())
    local t = assert(io.open("/tmp/lastDlink8run.txt", "w"), "Failed to open lastDlink8run.txt")
    t:write(nt)
    io.close(t)
    
    -- delta seconds
    local nds = nt - ot
    
    -- bounds
    if nds < 24 then nds = 24 end
    if nds > 900 then nds = 900 end
    
    -- debugging
    local t = assert(io.open("/tmp/Dlink8nds.txt", "w"), "Failed to open Dlink8nds.txt")
    t:write(nds)
    io.close(t)
    
    -- maths
    for k = 1,8 do
    Din[k] = ((Din[k]/nds)/1024)
    if Din[k] > 1500000 then Din[k] = 0 end
    Dout[k] = ((Dout[k]/nds)/1024)
    if Dout[k] > 1500000 then Dout[k] = 0 end
    T[k] = Din[k]+Dout[k]
    end -- end for each K conversion
    
    -- set luup device variables for device 12, LAN
    luup.variable_set("urn:upnp-org:serviceId:altui1", "DoorBirdINKBps", Din[1] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "DoorBirdOUTKBps", Dout[1] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "DoorBirdKBps", T[1] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "RoomHubINKBps", Din[2] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "RoomHubOUTKBps", Dout[2] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "RoomHubKBps", T[2] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "BedroomINKBps", Din[3] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "BedroomOUTKBps", Dout[3] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "BedroomKBps", T[3] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "DownstairsINKBps", Din[4] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "DownstairsOUTKBps", Dout[4] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "DownstairsKBps", T[4] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "LivingRoomINKBps", Din[5] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "LivingRoomOUTKBps", Dout[5] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "LivingRoomKBps", T[5] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "KitchenINKBps", Din[6] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "KitchenOUTKBps", Dout[6] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "KitchenKBps", T[6] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "UpstairsINKBps", Din[7] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "UpstairsOUTKBps", Dout[7] , 12)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "UpstairsKBps", T[7] , 12)
    
    1 Reply Last reply
    0
  • parkercP Offline
    parkercP Offline
    parkerc
    wrote on last edited by
    #7

    Many thanks for sharing @prophead

    QQ - How did you get smtpget installed on your Vera ? (I don’t have smtpget listed in usr/bin ?)

    propheadP 3 Replies Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    wrote on last edited by
    #8

    Altui on a pi

    1 Reply Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    replied to parkerc on last edited by
    #9

    @parkerc then I use grafana to graph
    F6CFFAB5-D8A7-42D2-A1B2-2C5299DC5CB6.jpeg

    1 Reply Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    replied to parkerc on last edited by
    #10

    @parkerc I’m going to point you here:

    GitHub - jertel/vuegraf: Populate metrics from your Emporia Vue energy monitoring devices into an InfluxDB

    GitHub - jertel/vuegraf: Populate metrics from your Emporia Vue energy monitoring devices into an InfluxDB

    Populate metrics from your Emporia Vue energy monitoring devices into an InfluxDB - GitHub - jertel/vuegraf: Populate metrics from your Emporia Vue energy monitoring devices into an InfluxDB

    For more energy centric metrics then snmp. I love the vue devices and the grafana integration with this link is stellar for really understanding your energy use.

    1 Reply Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    replied to parkerc on last edited by
    #11

    @parkerc
    FC4656C3-8DD1-4493-9E74-5DC71923C335.jpeg F2329C8D-3B50-4C93-914B-8BA3FF49656C.jpeg

    1 Reply Last reply
    0
  • parkercP Offline
    parkercP Offline
    parkerc
    wrote on last edited by
    #12

    Impressive stuff, thanks for sharing @prophead ..

    Earlier you mentioned ‘ Edgerouter’ , does that mean you have a Ubiquiti router ? If so would you be able to share the scene Lua for that, as I have a Unfi set up so would love to test that out..

    propheadP 2 Replies Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    replied to parkerc on last edited by
    #13

    @parkerc

    -- SNMP BWmon
    -- read stored in/out values
    local files = ""
    local f = io.open("/tmp/INO.txt")
    if not f then os.execute("touch /tmp/INO.txt") end
       for line in f:lines() do
          files = line
       end
    f:close()
    
    local OINO = files
    
    local f = io.open("/tmp/OUTO.txt")
    if not f then os.execute("touch /tmp/OUTO.txt") end
       for line in f:lines() do
          files = line
       end
    f:close()
    if not files then files = "Counter32: (0)" end
    local OOUTO = files
    
    -- parse values
    local ROINO = string.match(OINO, ".*Counter32: (%d+)")
    local ROOUTO = string.match(OOUTO, ".*Counter32: (%d+)")
    
    -- read snmp
    os.execute("/usr/bin/snmpget -r 1 -v1 -c PASSWORD 172.16.0.1 iso.3.6.1.2.1.2.2.1.10.4 >/tmp/INO.txt")
    local f = io.open("/tmp/INO.txt")
       if not f then return end  
       for line in f:lines() do
          files = line
       end
    f:close()
    local INO = files
    
    --print (INO)
    
    files = ""  
     os.execute("/usr/bin/snmpget -r 1 -v1 -c PASSWORD 172.16.0.1 iso.3.6.1.2.1.2.2.1.16.4 >/tmp/OUTO.txt")
     local f = io.open("/tmp/OUTO.txt")
        if not f then return end
        for line in f:lines() do
            files = line
        end
    f:close()
    local OUTO = files
    
    --print (OUTO)
    
    --parse
    local RINO = 0 
    RINO = string.match(INO, ".*Counter32: (%d+)")
    local ROUTO = 0
    ROUTO = string.match(OUTO, ".*Counter32: (%d+)")
    
    --print (RINO)
    --print (ROUTO)
    
    --maths
    local RINB = 0
    RINB = RINO --* 8
    local ROINB = 0
    ROINB = ROINO --* 8
    local ROUTB = 0
    ROUTB = ROUTO --* 8
    local ROOUTB = 0
    ROOUTB = ROOUTO --* 8
    
    --deltas
    local INt = 0
    INt = RINB - ROINB
    local OUTt = 0
    OUTt = ROUTB - ROOUTB
    
    local max32 = 4294966864
    
    --debug
    --luup.log ('RINB ='..RINB..', ROINB ='..ROINB)
    --luup.log ('ROUTB ='..ROUTB..', ROOUTB ='..ROOUTB)
    
    -- handle rotation
    if RINB < ROINB then INt = max32 - ROINB + RINB end
    if ROUTB < ROOUTB then OUTt = max32 - ROOUTB + ROUTB end
    if INt > max32 or INt<0 then INt = max(RINB,ROINB) end
    if OUTt > max32 or OUTt<0 then OUTt = max(ROUTB,ROOUTB) end
    
    --luup.log ('INt ='..INt..', OUTt ='..OUTt)
    
    -- 60 is 1 min interval and 1024 makes kBps
    local kbpsINt = ((INt/60)/1024)
    local kbpsOUTt = ((OUTt/60)/1024)
    local total = kbpsINt + kbpsOUTt
    
    luup.variable_set("urn:upnp-org:serviceId:altui1", "ComcastKBps", total, 11)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "ComcastInKBps", kbpsINt, 11)
    luup.variable_set("urn:upnp-org:serviceId:altui1", "ComcastOutKBps", kbpsOUTt, 11)
    
    1 Reply Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    replied to parkerc on last edited by
    #14

    @parkerc as you can see it's virtually same because SNMP is pretty standardized. Yes, this is the ubiquity edgerouter, a great $60 piece of kit. I use it for ISP failover and firewall.

    1 Reply Last reply
    0
  • parkercP Offline
    parkercP Offline
    parkerc
    wrote on last edited by
    #15

    Many thanks @prophead - I’m going to try and use this with my UniFi Switch this morning..

    1 Reply Last reply
    0
  • parkercP Offline
    parkercP Offline
    parkerc
    wrote on last edited by parkerc
    #16

    Quick observation, if I try the following against my UniFi (USG) Router

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

    it times out..

    Timeout: No Response from 192.168.102.1.
    

    Yet if I try this against a UniFi Switch,

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

    it works fine.

    iso.3.6.1.2.1.2.2.1.10.4 = Counter32: 29157590
    

    Hummm..

    1 Reply Last reply
    0
  • parkercP Offline
    parkercP Offline
    parkerc
    wrote on last edited by parkerc
    #17

    I tried an snmpwalk on the UniFi (USG) Router too,

    'snmpwalk -Os -c public -v 1 192.168.102.1' 2>&1
    

    and that timed out..

    More digging is needed later, as all seem to have SNMP enabled..

    propheadP 1 Reply Last reply
    0
  • propheadP Offline
    propheadP Offline
    prophead
    replied to parkerc on last edited by
    #18

    @parkerc sounds like a permissions issue. Debug on command line before trying to script. I would also avoid use of the public access to snmp as it’s a potential security issue. I always setup private domain the proceedure differs by manufacturers. You can use snmpwalk for debugging then move to snmpget once you’re ready to drill down. Good luck.

    1 Reply Last reply
    0

Recent Topics

  • G
    [SOLVED] New iblind and zwaveJScontroller/MSR not communicating
  • PerHP
    Nuke Vera Script
  • akbooerA
    Truncated web pages using wireguard over long distances
  • wmarcolinW
    [Solved] OWM error
  • wmarcolinW
    Host time is wrong
  • R
    Beginner assistance
  • DesTD
    RulesEngine
  • therealdbT
    Replacing Nest Thermostat but....
  • H
    Connect small (torch-sized) light bulb to smart home network
  • toggledbitsT
    Reactor (Multi-System/Multi-Hub) Announcements
  • E
    Prensence sensor - client - base technologi
Powered by NodeBB | Contributors
Hosted freely by 10RUPTiV - Solutions Technologiques | Contact us
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved
  • Login

  • Don't have an account? Register

  • Login or register to search.