Skip to content

General Discussion

A place to talk about whatever you want

167 Topics 1.6k Posts
  • RPI 4B 2GB Available in NL

    Unsolved
    2
    0 Votes
    2 Posts
    156 Views
    toggledbitsT

    BerryBase in Germany is reported to have a pretty broad stock of Compute Module 4. The 2GB RAM + 8GB MMC are an OK base model for a Reactor host, and if you have the budget, more RAM (first priority, IMO) and bigger MMC is good for more capability (e.g. run more services) and longevity. You'd also need something like the RPi CM4 I/O Board to mount it on, but those are readily available and not too pricey. More discussion about the CM4 here.

  • Status of SMARTHOME and SwitchLinc products

    Unsolved
    1
    0 Votes
    1 Posts
    123 Views
    No one has replied
  • Smart door lock

    Unsolved
    7
    0 Votes
    7 Posts
    415 Views
    P

    I'm still using quite a few Schlage BE469 units in several homes. There is a very specific process to follow during set up and you need to be sure you have the right secure Zwave devices or direct path to your controller. But once set up they work flawlessly and have been very reliable on Vera.

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    16 Views
    No one has replied
  • Lua - Code to encrypt / decrypt with AES 128 CBC

    Unsolved
    27
    0 Votes
    27 Posts
    5k Views
    parkercP

    Thanks @akbooer - you’re so right i cant believe i missed that, I’m supposed to decode, not encode ! Doh !!

    FYI - Here’s the source.. https://github.com/florianholzapfel/panasonic-viera/issues/9#issuecomment-476919658

    How did the rest look ? Here’s my Lua inline with the source.

    -- import binascii -- import base64 -- import hmac, hashlib -- from Crypto.Cipher import AES local bit = require("bit") local mime = require("mime") local binascii = require("binascii") -- # Example challenge (which is our IV) -- iv = base64.b64decode("mUQdS7/RyJTMsiojPz9i1Q==") local challenge_key = "iL9XqQOMfkFWz2rvh0Xm+w==" local challenge_Key_unb64 = mime.unb64(challenge_key) print (challenge_Key_unb64) -- # Get character codes from IV bytes -- iv_vals = [ord(c) for c in iv] -- # Initialise key character codes array -- key_vals = [0] * 16 -- # Derive key from IV -- i = 0 -- while i < 16: -- key_vals[i] = ~iv_vals[i + 3] & 0xFF -- key_vals[i + 1] = ~iv_vals[i + 2] & 0xFF -- key_vals[i + 2] = ~iv_vals[i + 1] & 0xFF -- key_vals[i + 3] = ~iv_vals[i] & 0xFF -- i += 4 -- # Convert our key character codes to bytes -- key = ''.join(chr(c) for c in key_vals) local challenge_Key_unb64 = "ˆ¿W©Œ~AVÏjï‡Eæû" local challengekey_vals = { challenge_Key_unb64:byte(1, -1) } local key_vals = {} for i = 1, 16, 4 do key_vals[ i ] = bit.band(bit.bnot(challengekey_vals[ i + 3 ]), 0xFF) key_vals[ i + 1 ] = bit.band(bit.bnot(challengekey_vals[ i + 2 ]), 0xFF) key_vals[ i + 2 ] = bit.band(bit.bnot(challengekey_vals[ i + 1 ]), 0xFF) key_vals[ i + 3 ] = bit.band(bit.bnot(challengekey_vals[ i ]), 0xFF) end local key = string.char(unpack(key_vals)) print(key) -- "V¨@w¾sü•0©ºx " -- # Initialise HMAC key mask (taken from libtvconnect.so) -- hmac_key_mask_vals = [ord(c) for c in binascii.unhexlify("15C95AC2B08AA7EB4E228F811E34D04FA54BA7DCAC9879FA8ACDA3FC244F3854")] -- # Initialise HMAC key character codes array -- hmac_vals = [0] * 32 -- # Calculate HMAC key using HMAC key mask and IV -- i = 0 -- while i < 32: -- hmac_vals[i] = hmac_key_mask_vals[i] ^ iv_vals[(i + 2) & 0xF] -- hmac_vals[i + 1] = hmac_key_mask_vals[i + 1] ^ iv_vals[(i + 3) & 0xF] -- hmac_vals[i + 2] = hmac_key_mask_vals[i + 2] ^ iv_vals[i & 0xF] -- hmac_vals[i + 3] = hmac_key_mask_vals[i + 3] ^ iv_vals[(i + 1) & 0xF] -- i += 4 -- # Convert our HMAC key character codes to bytes -- hmac_key = ''.join(chr(c) for c in hmac_vals) local challenge_Key_unb64 = "ˆ¿W©Œ~AVÏjï‡Eæû" local challengekey_vals = { challenge_Key_unb64:byte(1, -1) } local hmac_key_mask = binascii.unhexlify('15C95AC2B08AA7EB4E228F811E34D04FA54BA7DCAC9879FA8ACDA3FC244F3854') local hmac_key_mask_vals = { hmac_key_mask:byte(1, -1) } local hmac_vals = {} for i = 1, 32, 4 do hmac_vals[i] = bit.bxor(hmac_key_mask_vals[ i ], challengekey_vals[ bit.band(i + 1, 0xF) + 1 ]) hmac_vals[i+1] = bit.bxor(hmac_key_mask_vals[ i + 1 ], challengekey_vals[ bit.band(i + 2, 0xF) + 1 ]) hmac_vals[i+2] = bit.bxor(hmac_key_mask_vals[ i + 2 ], challengekey_vals[ bit.band(i - 1, 0xF) + 1 ]) hmac_vals[i+3] = bit.bxor(hmac_key_mask_vals[ i + 3 ], challengekey_vals[ bit.band(i, 0xF) + 1 ]) end local hmac_key = string.char(unpack(hmac_vals)) print(hmac_key) --"B`Ò}Îˤg$ÍÙNøÏWòâ/cÒÙzvà"õ3´¿"" -- # This is our plaintext SOAP argument for the pin code shown on the TV -- authinfo = "<X_PinCode>4410</X_PinCode>" -- # First 12 bytes are randomised, let's just set them to 0 because it doesn't matter -- payload = "000000000000" -- # The next 4 bytes contain the plaintext (SOAP arg) length in big endian -- n = len(authinfo) -- payload += chr(n >> 24) -- payload += chr((n >> 16) & 0xFF) -- payload += chr((n >> 8) & 0xFF) -- payload += chr(n & 0xFF) -- # Now we concatenate our payload, which is starting at byte 17 of the payload -- payload += authinfo local payload = '000000000000' -- First 12 bytes are randomised local pincode = "<X_PinCode>1234</X_PinCode>" -- Next 4 bytes are from the pincode prompted by the TV n = #pincode payload = payload .. string.char(bit.band(bit.rshift(n, 24), 0xFF)) payload = payload .. string.char(bit.band(bit.rshift(n, 16), 0xFF)) payload = payload .. string.char(bit.band(bit.rshift(n, 8), 0xFF)) payload = payload .. string.char(bit.band(n, 0xFF)) payload = payload .. pincode local iv = payload print(iv) -- "0000000000001234" -- # Let's encrypt it with AES-CBC! We need to make sure we pad it to a multiple of 16 bytes beforehand -- aes = AES.new(key, AES.MODE_CBC, iv) -- ciphertext = aes.encrypt(pad(payload)) -- # Calculate the HMAC-SHA-256 signature of our encrypted payload -- sig = hmac.new(hmac_key, ciphertext, hashlib.sha256).digest() -- # Concatenate the HMAC signature to the encrypted payload and base64 encode it, and we're done! -- encrypted_payload = base64.b64encode(ciphertext + sig)

    Still the AES/CBC bit to get working, but hopefully this is progress..

  • Seeking experts for implementing Modbus TCP

    Solved
    9
    0 Votes
    9 Posts
    659 Views
    CrilleC

    OK, after trying a few solutions a finally ended up with Home Assistant as a Hyper-V guest on my Windows server.
    First I evaluated this by Emilv2 but it did not fit my needs and wasn't very stable.
    The best option by far was this for Huawei inverters, I even tweaked the polling frequency down to 10s to have "realtime" data matching my ESP8266 hooked up to my electricity meter sending data every 10s.
    Unfortunately HASS was not able to connect to openLuup broker so I enabled the HASS controller for MSR and echo the newly created sensors to openLuup.
    I then wrote a MQTT handler for openLuup to set appropriate variables and do some math comparing electricity use and production and edited Historian to keep those for Grafana.

    Been running it for almost 2 days now without any issues.

    Some of the HASS sensors:
    hass.PNG

    openLuup variables:
    solar.PNG

    Grafana: (sorry for Swedish)
    chart.PNG sum.PNG

    This was a fun project and thanks for pointing me in the right direction!

  • http relay activate with username and password authentication

    Unsolved
    5
    0 Votes
    5 Posts
    351 Views
    D

    @tunnus said in http relay activate with username and password authentication:

    @destination what if you just try that curl command from the command line (without os.execute)? Just to narrow down what is working and what's not.

    No luck

  • Vera Secure usage without mios

    Unsolved
    5
    0 Votes
    5 Posts
    392 Views
    D

    @tunnus said in Vera Secure usage without mios:

    @destination A bit late now, but you haven't heard about decoupling? No need for Vera/Ezlo servers...

    I haven't heard about decoupling, Thank you, i will search about it.

  • An electricians or wiring experts here?

    Unsolved
    9
    0 Votes
    9 Posts
    371 Views
    therealdbT

    @akbooer I agree. My new house has them everywhere and it’s useful to use them as scene controllers as well (long press to dim, double click
    to sync levels, etc)

  • Looking for ideas on how to implement an automation.

    Solved
    17
    0 Votes
    17 Posts
    718 Views
    R

    Thanks, at 4 for $15, I can replace them cheap.

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Is Hubitat to HA Bridge possible?

    Solved
    8
    1 Votes
    8 Posts
    411 Views
    therealdbT

    @droy you could definitely call MSR http endpoint to achieve the same result. At this point, MSR will perform the call for you.

  • New Developer - What I should know/do ? (Vera/OpenLuup)

    Unsolved
    1
    0 Votes
    1 Posts
    142 Views
    No one has replied
  • New to Smart Home

    Unsolved
    3
    0 Votes
    3 Posts
    230 Views
    therealdbT

    I'll definitely start with Home Assistant (or OpenHab, if you want to keep Java) and EspHome/Tasmota, in your case.Don't start from scratch.

    Tasmota and EspHome are two firmware quite popular in the market, and you'd flash them on microcontrollers and access sensors. Look at both before choosing. I prefer Tasmota, but only because that's what I know better.

    After you'll be set, you'd always add anything you want to the mix. I'm a C# dev and part of my logic runs inside a custom made applications, that's glueing different systems together. Take a look at Multi System Reactor as well, since you'll soon discover that Home Assistant lacks in terms of a powerful automation engine. Good luck!

  • Amazon Alexa hosts

    Unsolved
    1
    0 Votes
    1 Posts
    120 Views
    No one has replied
  • Merry Christmas/Happy Holidays

    15
    8 Votes
    15 Posts
    563 Views
    PablaP

    Happy holidays everyone!

  • Very newbie man looking for help

    Unsolved
    4
    0 Votes
    4 Posts
    230 Views
    CatmanV2C

    OK so three things here:

    The Qubino. Sadly I have no idea how well supported that device is on Vera. Many devices that Vera claim to support do not really work very well. It's possible that you might be able to modify the properties of the device to make it work better, but I'm afraid I have no idea where to start. SSH is possible. I would expect this is still the way to do it:
    http://wiki.micasaverde.com/index.php/Logon_Vera_SSH OpenLuup is an Open source home automation system that is similar to Vera but much much better:
    GitHub - akbooer/openLuup: a pure-Lua open-source emulation of the Vera Luup environment GitHub - akbooer/openLuup: a pure-Lua open-source emulation of the Vera Luup environment

    a pure-Lua open-source emulation of the Vera Luup environment - akbooer/openLuup

    Many of us are on this forum because we were banned from the Vera forum for daring to challenge the approach taken by Melih. So far we seem to have been correct. Vera is a dead end and will very soon be un-supported

    Good luck!

    C

  • Help please with Node-Red "Lost connection to server"

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    cw-kidC

    I've now powered that Tuya light back ON again so it is reachable on the WLAN and now I am able to update the nodes OK and then I rebooted the Linux box. Now the "Lost connection to server, reconnecting..." message has stopped appearing. So seems related to this Tuya node / light.

    I then powered OFF the Tuya light again and fingers crossed the "Lost connection to server, reconnecting..." message still hasn't come back, so I think managing to update the Tuya node may have fixed it. I will keep an eye on it.

  • Goodbye Brothers in crime!

    Unsolved
    5
    4 Votes
    5 Posts
    301 Views
    PerHP

    Shouldn't this topic be set to "SOLVED"? 😉 Good luck with Hass, and not in the ironic way.

  • Re-number on OpenLuup

    Solved
    4
    0 Votes
    4 Posts
    233 Views
    CatmanV2C

    @toggledbits said in Re-number on OpenLuup:

    @catmanv2 if you're using the Reactor plug in, there's a device replacement tool on the tools menu that will appear when the failed device is deleted.

    Well I've just replaced the coffee grinder so normal service should be resumed shortly

    @kfxo said in Re-number on OpenLuup:

    Is it marked as failed in z-wave (z-way?) server? If you can reset the device without excluding it, I think you can use the replace failed node operation on the z-way server control section.

    It is marked as failed indeed.

    I was distracted and this post wasn't sent. I couldn't remove it from z-wave as it was waiting on an interview.

    It re-added fine as a new device and I've just edited Reactor manually.

    Cheers

    C

Recent Topics