Quantcast
Channel: Configuration - Home Assistant Community
Viewing all 105912 articles
Browse latest View live

Trying to add slimmelezer integration (esphome)

$
0
0

Hello everyone,

I had to reinstall my whole home assistant instance on TrueNAS, so I had the true charts version.

Now I can’t get my integration working because it keeps throwing me an error, which is making me nuts.

Logs:

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: 8:02:35 PM (3 occurrences)
Last logged: 8:03:08 PM

Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py”, line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py”, line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py”, line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/security_filter.py”, line 91, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/forwarded.py”, line 100, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 235, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/headers.py”, line 31, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 149, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/decorators.py”, line 72, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 185, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/data_validator.py”, line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py”, line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 358, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 404, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 501, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/esphome/config_flow.py”, line 92, in async_step_user
return await self._async_step_user_base(user_input=user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/esphome/config_flow.py”, line 71, in _async_step_user_base
return await self._async_try_fetch_device_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/esphome/config_flow.py”, line 167, in _async_try_fetch_device_info
response = await self.fetch_device_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/esphome/config_flow.py”, line 332, in fetch_device_info
zeroconf_instance = await zeroconf.async_get_instance(self.hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/zeroconf/init.py”, line 142, in async_get_instance
return cast(HaZeroconf, (await _async_get_instance(hass)).zeroconf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/zeroconf/init.py”, line 157, in _async_get_instance
zeroconf = HaZeroconf(**zcargs)
^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/zeroconf/_core.py”, line 176, in init
listen_socket, respond_sockets = create_sockets(interfaces, unicast, ip_version, apple_p2p=apple_p2p)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/zeroconf/_utils/net.py”, line 358, in create_sockets
listen_socket = new_socket(ip_version=ip_version, apple_p2p=apple_p2p, bind_addr=(‘’,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/zeroconf/_utils/net.py”, line 248, in new_socket
s.bind(bind_tup)
OSError: [Errno 98] Address in use

1 post - 1 participant

Read full topic


Use a usb web cam useing ha

$
0
0

hello i have ported the webcam from docker when i use lsusb home assistant can see the usb but I have no idea how to add it as I have done it before but forgot it.

1 post - 1 participant

Read full topic

Template Sensor That Updates Every X Minutes or Hours

$
0
0

I’m trying to configure a binary template sensor that recomputes on/off (or true/false) based on a time interval, although the derived state would rely on other sensor inputs. I do this because want to rate-limit it, so that it doesn’t update too rapidly based the inputs on which it relies.

I created a template binary sensor through the UI, and added this YAML:

template:
  - trigger:
    - platform: time_pattern
      minutes: /1
  - sensor:
    state: "on"

Obviously it does not derive a state yet, I’m just trying to test the time_pattern for now.

However, I get this warning:

This template does not listen for any events and will not update automatically.

Can anyone help with how to correctly create a template that does this?

1 post - 1 participant

Read full topic

Read energy meter with esphome SML

$
0
0

Hi guys,

I am trying to read an energy meter using esphome and a hichi ir. It’s an ACE3000 type 260 energy meter that supports SML and obis codes.

I tried a basic configuration:

uart:
  id: uart_bus
  tx_pin: 1
  rx_pin: 3
  baud_rate: 300
  data_bits: 7
  parity: EVEN
  stop_bits: 1

sml:
  id: mysml
  uart_id: uart_bus

sensor:
  - platform: sml
    name: "PV-Energie"
    sml_id: mysml
    obis_code: "1-0:1.8.0"
    unit_of_measurement: kWh
    accuracy_decimals: 0
    device_class: energy
    state_class: total_increasing

I don’t get any readings from the energy meter with this config. After looking in the manual, I figured out, that I have to send a start sequnece to the meter.
I tested this with an UART adapter and it works as expected.

So my question is: how can I send data via uart with my configuration?
Is the interval component a way to got? (Automations and Templates — ESPHome)

Thanks in advance and regards.

1 post - 1 participant

Read full topic

How To Show the Duration Since and Automation Finished

$
0
0

This might be on here somewhere but I haven’t found it yet. What I am trying to do is set a timer or stopwatch that will display on a card that I can put on a dashboard that shows when my washing machine last finished its cycle. I have an automation that currently runs when the cycle finishes and I was trying to tack onto that, but that has not worked. Does anyone do something like this or know of a way to make this work?

1 post - 1 participant

Read full topic

How to Show temperature of each area?

$
0
0

Hi,
I have placed temperature / humidity sensors in each room.
is there an elegant way to show a list of all areas with their temperature?

I can manually add area cards to a view, but they are rather bulky. I could manually add entity cards for the temp sensors and manually rename the title to the area name, but I feel that there should be a more elegant solution. Some jinja or auto-entitities magic that creates such a table. Any advice?

2 posts - 2 participants

Read full topic

Playback on ONVIF with Dahua NVR and Cameras

$
0
0

Just getting started with HA. Have added my Dahua NVR and cameras and can view them live. I can also see motion events being logged, but cant work out how to playback recordings of events. Any suggestions?

Thanks!

1 post - 1 participant

Read full topic

ZHA documentation for commands

$
0
0

Hi all,

I’am rather new to home assistant. I am currently trying to understand how to interact with zigbee devices. And among other things, trying to send command using the service “issue_zigbee_cluster_command”

I can’t find any documentation about what command can be sent (maybe official zigbee to zha standard command for instance) ?

For example, i found apost explaining how to use a standard command to add a delay to arm an alarm (keypad) :

service: zha.issue_zigbee_cluster_command
data:
  ieee: #######
  cluster_id: 1281
  command_type: client
  cluster_type: out
  args: [4, 4, 1, 0]
  command: 4
  endpoint_id: 44

Where does this kind of things are documented ?

Bests, and thanks !

1 post - 1 participant

Read full topic


Automation seems to keep working while the automation is deleted

$
0
0

I was playing around with automations and tried switching off of the hot water storage charging + sending a notification based on the condition power consumption on the P1 smart meter above x.

The condition triggered ok because I received the notification but the command to the ebusd device did not seem to change the state of the device. So I initially disabled the automation. After some hours I noticed that another ebus device was switched off every 15 minutes, and switched back on after 4 minutes.

So I tought I made some mistake and removed the automation, restarted the ebus deamon, even restarted the Raspbery Pi multiple times, but the strange thing is that the symptoms are reappearing when the deamon is started/running.

Looks like the ghost automation that is still running, I searched thru logs and states but I have no clue what/where to look for.

1 post - 1 participant

Read full topic

Blink pluggin - doenst work/ i am not able to setup / missing 2fa/pin option

$
0
0

Hi,
i am not able to setup blink plugin, and cant understand its doc (Blink - Home Assistant)

When i add integration i am asked only for username/pass no 2fa/pin.

it constantly shows:
image

There is almost nothing in the logs

when i am adding Integration i am not asked for a pin … only user/pass
… When you are prompted for your pin, there are (currently) two possibilities:…

any idea?

2 posts - 1 participant

Read full topic

IOS Companion App Location Updates are Really Slow (or Latest Proximity Integration is Broken)

$
0
0

Hi.

I’m not exactly sure whether this post belongs in the Companion App section or the Proximity integration section, so I’ll start here and the moderator can move it where he/she deems appropriate.

I have an automation that notifies me whenever I enter my housing subdivision. The GeoFence is set for 400 meters (roughly 1200 feet) from the House. Originally, I was using a proximity sensor ("proximity.xxxx’), that was defined in my configuration file. It was set to notify me whenever I crossed the GeoFence . This was working great…until the proximity integration changed, and that proximity sensor was deprecated.

Using the new proximity integration, the automation is set to notify me when ‘sensor.home_xxxx_distance’ is now below 1600 feet. (No idea why it suddenly started to use feet instead of meters, but that’s irrelevant.) Given this new GeoFence is set WAY beyond my subdivision’s boundary, it should trigger well before I arrive at the subdivision…except it doesn’t. Now, it only seems to trigger just before I drive up my driveway. So, something has changed.

While I’m reluctant to instantly blame the new proximity integration, the change in behavior is suspiciously coincidental. Logically, it seems like the phone not reporting location changes in a timely manner, except that it was working previously, and nothing has changed with those settings (unless an IOS update subtlety changed something in the background).

The Companion App is running on an iPhone 14 Pro, under IOS 17.3.1 (the latest as of mid-Feb 2023). Use Exact Location is enabled, and I’m using the Nabu Casa cloud services.

Any thoughts on what may be causing this, or has anyone else seen a similar change in behavior?

1 post - 1 participant

Read full topic

Secondary info on a cover entity row?

$
0
0

Seems like it should be a simple problem, but it doesn’t seem like it works:

I have a cover-entity for my garage door:

image

What I’d like is the secondary info line to show a text indication of the current state - i.e. Closed or Open - similar to the media player row:

image

This is pure usability so it’s just easier to see the state it’s in. Is this supported in the built-in row, or do I need do something custom?

1 post - 1 participant

Read full topic

Cannot get any Zigbee devices to stay online (ZHA)

$
0
0

I have a Zigbee network based on the SONOFF 3.0 dongle, six IKEA TRADFRI repeaters, a USB repeater and a Zigbee socket that acts as a repeater as well.

The devices have operated all for over a year, but following intermittent problems I revised the layout last October.

  1. I moved the hub away from a TV that was producing 2.4 GHz-band interference for some reason
  2. The hub and dongles are in a central location
  3. I moved the SONOFF dongle and a Bluetooth dongle about 2m away from the hub and each other to prevent mutual interference
  4. I ensured that the Zigbee and WiFi bands are well separated
  5. I redistributed the repeaters, keeping them away from WiFi access points and other known sources of interference

I was delighted that the network became much more stable and there were very few intermittent problems.

However, three months later it all fell apart. Pretty much all the Zigbee devices are offline, except the coordinator. If I reconnect the repeaters, they configure successfully but go offline again within minutes (I have the “Consider mains powered devices unavailable after” set to 60 seconds). If the repeaters are all offline, it is not surprising that the end devices are too.

I cannot think of anything I have changed apart from keeping the system up to date.

The general log shows no relevant errors.

If I enable debug logging and reload the Zigbee Coordinator, I get a debug log that I cannot decipher – I attach an extract from the end as the whole thing is apparently too big:


[...] 
2024-02-15 21:41:05.064 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.bed_occupied, old_state=<state sensor.bed_occupied=Unknown; icon=, friendly_name=Main bedroom bed occupancy @ 2024-02-15T21:40:50.586152+00:00>, new_state=<state sensor.bed_occupied=Unoccupied; icon=mdi:bed-empty, friendly_name=Main bedroom bed occupancy @ 2024-02-15T21:41:05.064420+00:00>>
2024-02-15 21:41:05.072 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': 00:12:4b:00:24:45:1b:a8, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.930135, 'min_update_delta': 30.0})
2024-02-15 21:41:05.072 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': 00:12:4b:00:24:45:1b:a8, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.930135, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.110 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.110 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:05.110 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:85:97:9e:2f:76, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.933835, 'min_update_delta': 30.0})
2024-02-15 21:41:05.111 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:85:97:9e:2f:76, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.933835, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.111 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.111 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:05.112 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:cb:fb:ec:c4:0d, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.936185, 'min_update_delta': 30.0})
2024-02-15 21:41:05.112 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:cb:fb:ec:c4:0d, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.936185, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.112 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.112 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:05.113 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:24:95:e2:78:8c, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.938618, 'min_update_delta': 30.0})
2024-02-15 21:41:05.113 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:24:95:e2:78:8c, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.938618, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.114 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.114 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:05.114 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:f9:65:93:0b:81, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.939173, 'min_update_delta': 30.0})
2024-02-15 21:41:05.115 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:f9:65:93:0b:81, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.939173, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.115 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.115 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:05.116 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:a0:c5:64:f8:c5, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.940265, 'min_update_delta': 30.0})
2024-02-15 21:41:05.116 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:a0:c5:64:f8:c5, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.940265, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.116 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.116 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:05.117 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:e6:4c:10:e7:04, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.943709, 'min_update_delta': 30.0})
2024-02-15 21:41:05.117 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:e6:4c:10:e7:04, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.943709, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.117 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.117 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:05.118 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:dc:4c:9a:f2:6e, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.94485, 'min_update_delta': 30.0})
2024-02-15 21:41:05.118 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:dc:4c:9a:f2:6e, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.94485, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.118 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.118 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:05.119 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:22:c0:ad:89:9f, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.945994, 'min_update_delta': 30.0})
2024-02-15 21:41:05.119 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f46c65058a0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:22:c0:ad:89:9f, 'endpoint_id': 1, 'cluster_id': 1280, 'attrid': 2, 'value': <ZoneStatus: 0>, 'timestamp': 1708033264.945994, 'min_update_delta': 30.0}) completed
2024-02-15 21:41:05.119 DEBUG (Thread-33) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>)
2024-02-15 21:41:05.119 DEBUG (Thread-33) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f46c65058a0>) completed
2024-02-15 21:41:08.136 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event logging_changed[L]>

1 post - 1 participant

Read full topic

Lost all Tuya devices after migrating to SSD from SD

$
0
0

I just migrated from SD to SSD. All worked well except I’ve lost access to all my Tuya devices. I get the following message: “Cannot change status. Disabled by Config entry” when I examine the device. I don’t know where to look to fix this.

I have the version 2024.2.1 and already updated the Tuya account using the QR code without issue.

Thanks for any help you can offer. I no longer have control over most of my lights!

1 post - 1 participant

Read full topic

Zwave-JS-UI on Znet via docker

$
0
0

This Solution has only been tested on Z-net device (RPI-3b) with the Ezzee REV 09.12.14 board mounted on, I have no idea if this method will work on a RPI 4, there might be some adjustments to be done in regards with the serial port access

1- First strongly suggest to make a copy of the original SD card with win32 disk imager and keep original and copy safe
2- Use a new SD card (minimum 32GIG suggested for Docker)
3- Install the Raspberry PI imager software https://www.raspberrypi.com/software/

  • Start the RPI imager software
  • Select the RPI 3 for the Raspberry PI model
  • Select Raspberry PI OS (legacy 32-bit) as the OS
  • Select my SD card (I used a new 32GB card)
    4- Once copy process completed, remove SD card from computer and Insert the SD card in the Z-net device
    5- Connect keyboard, mouse and HDMI screen to the Raspberry device
    6- Plug power and let the PI Boot
  • Configure language, timezone
  • Use ‘pi’ as the usernoame and enter your own password
  • Configure the wifi network on your PI (note the ip adress of your device)
  • Wait until a message from the OS suggest updating the new installation and proceed with all the available updates
  • Select Restart
  • Activate VNC and SSH on the PI (so you can remotely access the PI either by terminal or graphical interface) without keyboard,mouse and monitor
  • Click on the raspberry image (upper left corner)
  • Select ‘preferences’ then ‘configuration’
  • In the interface tab, activate ‘SSH’,‘VNC’, ‘serial port’ and desactivate ‘serial console’ then validate
  • Don’t reboot immediatly
  • Edit /boot/config.txt and disable Bluetooth, if not the Ezzee board won’t be available to the /dev/ttyAMA0 port
  • Click on the terminal icon
  • Type and execute ‘sudo nano /boot/config.txt’
  • Add following at the end of the file,

#Disable Bluetooth
dtoverlay=disable-bt

  • Save and exit (CTRL-X) and Yes and enter
  • Reboot the PI (select the raspberry image, select disconnect and then reboot)
  • You can now disconnect keyboard, mouse and monitor and you can connect to your PI either using VNC terminal client or SSH using the IP adress noted above

7- Install Docker

  • Click on the terminal icon to open a terminal window
  • Type and execute ‘sudo apt-get update && sudo apt-get upgrade’ to make sure you got all the latest packages installed
  • Type and execute ‘curl -sSL https://get.docker.com | sh’ this process takes a few minutes to execute
  • Type and execute ‘sudo usermod -aG docker $USER’
  • Close the terminal window
  • Reboot your PI

8- Test and make sure docker was installed correctly

  • Click on the terminal icon to open a terminal window
  • Type and execute ‘docker run hello-world’
  • You should have a message with the following text in it:
    “Hello from Docker!
    This message shows that your installation appears to be working correctly.”

10- Install and Run ZWave-JS-UI as a service:

  • Type and execute ‘sudo mkdir /opt/zwavejs-ui’
  • Type and execute ‘cd /opt/zwavejs-ui’
  • Type and execute ‘sudo nano /opt/zwavejs-ui/docker-compose.yml’
  • Cut and paste the following in the editor:

version: “3.7”
services:
zwave-js-ui:
container_name: zwave-js-ui
image: zwavejs/zwave-js-ui:latest
restart: unless-stopped
tty: true
stop_signal: SIGINT
environment:

  • SESSION_SECRET=mySecretSession
  • TZ=Europe/Amsterdam
    devices:
  • ‘/dev/ttyAMA0:/dev/zwave’
    volumes:
  • ./store:/usr/src/app/store
    ports:
  • “8091:8091” # port for web interface
  • “3000:3000” # port for Z-Wave JS websocket server
  • Save and exit (CTRL-X) and Yes and enter
    11- Now you can launch the docker compose container with ‘docker compose up -d’ or you can launch it without -d to see what’s going on.
  • Type and execute ‘docker compose up -d’
  • First execution might take some time as it is downloading packages
    12- From here you should be able to connect to the Zwave-JS-UI typing ‘your RPI IP adresss’:8091 in a browser to get to the Z-wave-JS-UI interface
    13- In the ZWave-js-is interface, in setting (cog wheel) under the zwave tab, make sure you type in /dev/zwave in the serial port and then select ‘Save’
    -After about 2 minutes, the interface will reload and in thecontrol panel, if your Z-net used to have devices configured you should find them there

1 post - 1 participant

Read full topic


Zwave-JS-UI on ZNET status light python script

$
0
0

if you want LED on the Ezzee board to show ZWave_JS-UI Driver status: (Ready==>green, Not Ready==>Red) AND a GUI widget on your PI also showing the status:

Can be configured on as many Z-Net devices you want, just make sure to follow the procedure and specify the DEVICE_NAME accordingly in Node red and ZWAVW-JS-UI *****

1- Configure MQTT on Zwave-JS-UI to log the specific driver status in MQTT

  • Open a browser and connect to you Z-NET Zwave-JS-UI interface #:8091
  • Go in the configuratiuon tab (the cog wheel)
  • Make sur that “Disable MQTT Gateway” is greyed
  • Click on the MQTT Tab
  • Enter a “Name” for your Z-NET gateway
  • Fill in your MQTT Broker Ip adress in the “Hosts url”
  • Enter your MQTT server port in “Port” # usually 1883
  • In “Prefix” enter a unique name for this Z-net device #***** Please note for later use*****
  • Make sure that you select “Retain” # switch turned in blue
  • Enter your MQTT broker “Username” and “Password” if your MQTT server requires auth
  • Click “SAVE” at the bottom right of the page

2- Configure Node-Red on Homne Assistant to log the status of the Z-Wave card in the specific Z-net

  • Connect to your HA server, find the device corresponding to your specific Z-net device Zwave card

  • Go in devices & services

  • Click on the Z-wave icon

  • Under the desired bridge, click on the devices

  • Find the device corresponding to the Zwave card in the Z-net (probably something that has ezzee in the model field) and click on it

  • find the device entity details by clicking on the status than on the cog wheel (ex:sensor.ezzee_status_3 in my case) # ***** note for later use ****

  • Start the Node Red Addon on HA

  • Copy the following:

[{“id”:“3f8ff68d90f074ad”,“type”:“tab”,“label”:“Flux 1”,“disabled”:false,“info”:“”,“env”:},{“id”:“e7f5aae55972280f”,“type”:“mqtt out”,“z”:“3f8ff68d90f074ad”,“name”:“”,“topic”:“”,“qos”:“”," r etain":“”,“respTopic”:“”,“contentType”:“”,“userProps”:“”,“co rrel”:“”,“expiry”:“”,“broker”:“1243ae281ae5c763”,“x”:870,“y” :440,“wires”:},{“id”:“4978253042667a79”,“type”:“server-state-changed”,“z”:“3f8ff68d90f074ad”,“name”:“”,“server”:“72efb04. 171835”,“version”:5,“outputs”:2,“exposeAsEntityConfig”:“”,“e ntityId”:“sensor.ezzee_status_3”,“entityIdType”:“exact”,“out putInitially”:false,“stateType”:“str”,“ifState”:“ready”,“ifS tateType”:“str”,“ifStateOperator”:“is”,“outputOnlyOnStateCha nge”:true,“for”:“0”,“forType”:“num”,“forUnits”:“minutes”,“i g norePrevStateNull”:false,“ignorePrevStateUnknown”:false,“ign orePrevStateUnavailable”:false,“ignoreCurrentStateUnknown”:f alse,“ignoreCurrentStateUnavailable”:false,“outputProperties “:[{“property”:“topic”,“propertyType”:“msg”,“value”:“DEVICE_ NAM E/HA/ezzee”,“valueType”:“str”},{“property”:“retain”,“propertyType “:“msg”,“value”:“true”,“valueType”:“bool”}],“x”:320,“y”:440,“wires”:[[“fa98a87c3c8f8e2b”],[“829cb3f05e5c4998”]]},{“id”:“fa98a87c3c8f8e2b”,“type”:“change”,“z”:“3f8ff68d90f 0 74ad”,“name”:””,“rules”:[{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“true”,“tot”:“st r”}],“action”:””,“property”:“”,“from”:“”,“to”:“”,“reg”:false, “x” :640,“y”:420,“wires”:[[“e7f5aae55972280f”]]},{“id”:“829cb3f05e5c4998”,“type”:“change”,“z”:“3f8ff68d90f 0 74ad”,“name”:“”,“rules”:[{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“false”,“tot”:“s tr” }],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false, “x” :640,“y”:460,“wires”:[[“e7f5aae55972280f”]]},{“id”:“1243ae281ae5c763”,“type”:“mqtt-broker”,“name”:“MQTT server”,“broker”:“X.X.X.X”,“port”:“XXXX”,“clientid”:“”,“auto Connect”:true,“usetls”:false,“protocolVersion”:“4”,“keepaliv e”:“60”,“cleansession”:true,“autoUnsubscribe”:true,“birth Top ic”:“”,“birthQos”:“0”,“birthRetain”:“false”,“birthPayload” :" “,“birthMsg”:{},“closeTopic”:”“,“closeQos”:“0”,“closeRet ain” :“false”,“closePayload”:”“,“closeMsg”:{},“willTopic”:”“,” wil lQos":“0”,“willRetain”:“false”,“willPayload”:“”,“willMsg”:{} ,“userProps”:“”,“sessionExpiry”:“”},{“id”:“72efb04.171835 “,” type”:“server”,“name”:“Home Assistant”,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_b oolean”:“”,“connectionDelay”:false,“cacheJson”:false,“heartb eat”:false,“heartbeatInterval”:“”,“deviceSelector”:“friendl y Name”,“entitySelector”:“friendlyName”,“statusSeparator”:“”," enableGlobalContextStore":false}]

  • In Node-red, click on the hamburger menu uop right and select “import”
  • In the pink window, paste the copied text above
  • Click “Import”
  • Adjust the flow for your specifics:
  • Double click on the blue box (your HA device)
  • in server make sure you select your HA server
  • in Entity find and select the entity we noted few minutres ago
  • in the outpout properties replace DEVICE_NAME with the name you gave above in the “Prefix” field of the MQTT, make sure you keep the /HA/ezzee after exemple: Z-NET-House/HA/ezzee
  • Click finish
  • Double click the pink mqtt box
  • Either select your MQTT server if already configured in Node-Red OR select “Add a new MQTT-Broker”
  • If you select “Add a new MQTT-Broker”
  • Fill your MQTT broker info; IP, Port,
  • Go in the security tab if your server use auth to COMPLETE user and password
  • Click “add”
  • Click Deploy

3- install python3

  • Type and execute ‘sudo apt install python3’

4- Install paho-mqtt

  • Type and execute ‘pip3 install paho-mqtt’

5- Create the python script that will check the mqtt topics and change LED and screen message accordingly

  • Cut and paste the following in the file:

from datetime import datetime
from tkinter import * #for color status window
from tkinter import ttk
import time
import paho.mqtt.client as mqtt #for mqtt client
import sys
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)

MQTT_BROKER=“192.168.40.70” replace with yout MQTT server ip adress
MQTT_PORT=1883 replace with yout MQTT broker IP port, usually 1883
MQTT_USER=“mqttgoldriver” replace with yout MQTT broker User
MQTT_PWD=“m20190107M” replace with yout MQTT broker Password
DEVICE_NAME=“cabanon” replace with the device name you have set in the prefix field of the ZWAVE-JS-UI MQTT Tab

EZZ_PIN_3=2 #ezzee pin 3 equals GPIO 2 on raspberry pi 3
EZZ_PIN_5=3 #ezzee pin 5 equals GPIO 3 on raspberry pi 3
EZZ_PIN_7=4 #ezzee pin 7 equals GPIO 4 on raspberry pi 3
GPIO.setup(EZZ_PIN_3,GPIO.OUT)
GPIO.setup(EZZ_PIN_5,GPIO.OUT)
GPIO.setup(EZZ_PIN_7,GPIO.OUT)

ZWAVE_JS_UI_DRIVER_TOPIC=DEVICE_NAME + “/driver/status”
HA_CONNECTED_TOPIC=DEVICE_NAME + “/HA/ezzee”
first_run=“yes”

#set status window environment
def donothing():
pass
#create ZNET status window
root = Tk()
#prevent status window being closed
root.protocol(‘WM_DELETE_WINDOW’,donothing)
#status window title
root.title(“Z-Net Status”)
#size of the status window
root.geometry(‘350x200’)
#enter status the window
root.eval(‘tk::PlaceWindow . center’)
#Configure a black background at start that can change to green,yellow and red
root.configure(background=‘black’)
#prevent user changing window size
root.resizable(False, False)
#define the zwave message label variable as tkinter StringVar
label_Zwave=StringVar()
#define the mqtt message label variable as tkinter StringVar
label_MQTT=StringVar()

def on_connect(client, userdata, flags, rc, properties):
now = datetime.now()
date_time = now.strftime(“%Y/%m/%d %H-%M-%S”)
if rc == 0:
label=Label(root, textvariable=label_MQTT)
label.pack(pady=30)#create tkinter label space
temp_status=(“MQTT Connected “+date_time)#define tkinter message
label_MQTT.set(temp_status)#set tkinter label message
with open(”/etc/init.d/chkZNETLEDstate.txt”, “a+”) as file:
file.write(date_time+" MQTT Connected\n")
else:
label=Label(root, textvariable=label_MQTT)
label.pack(pady=30) #create tkinter label space
temp_status=(“MQTT NOT Connected “+date_time) #define tkinter message
label_MQTT.set(temp_status) #set tkinter label message
with open(”/etc/init.d/chkZNETLEDstate.txt”, “a+”) as file:
file.write(date_time+" MQTT Not Connected\n")

def on_message_from_HA(client, userdata, message):
global HA_STATUS
global first_run
HA_STATUS=message.payload.decode()
if (first_run == ‘no’):
set_led()

def on_message_from_Zwave_JS_UI(client, userdata, message):
global ZWAVE_JS_UI_STATUS
global first_run
first_run=‘no’
ZWAVE_JS_UI_STATUS=message.payload.decode()
if (first_run == ‘no’):
set_led()

def on_message(client, userdata, message):
print("Message Recieved from Others: "+message.payload.decode())

def set_led():
global label
now = datetime.now()
date_time = now.strftime(“%Y/%m/%d %H-%M-%S”)

if (HA_STATUS != ‘true’ and ZWAVE_JS_UI_STATUS != ‘true’):
#3=0, 5=1, 7=1 RED
GPIO.output(EZZ_PIN_3,GPIO.LOW)
GPIO.output(EZZ_PIN_5,GPIO.HIGH)
GPIO.output(EZZ_PIN_7,GPIO.HIGH)
label=Label(root, textvariable=label_Zwave)
label.pack(pady=30)
label_Zwave.set(“ZWAVE_JS_UI Not connected to Zwave card”)
root.configure(background=‘red’)#change the status window to red

if (HA_STATUS != ‘true’ and ZWAVE_JS_UI_STATUS == ‘true’):
#3=0, 5=0, 7=1 yellow
GPIO.output(EZZ_PIN_3,GPIO.LOW)
GPIO.output(EZZ_PIN_5,GPIO.LOW)
GPIO.output(EZZ_PIN_7,GPIO.HIGH)
label=Label(root, textvariable=label_Zwave)
label.pack(pady=30)
label_Zwave.set(“HA NOT connected / Zwave-JS-UI connected”)
root.configure(background=‘yellow’)#change the status window to yellow

if (HA_STATUS == ‘true’ and ZWAVE_JS_UI_STATUS == ‘true’):
#3=1, 5=0, 7=1 green
GPIO.output(EZZ_PIN_3,GPIO.HIGH)
GPIO.output(EZZ_PIN_5,GPIO.LOW)
GPIO.output(EZZ_PIN_7,GPIO.HIGH)
label=Label(root, textvariable=label_Zwave)
label.pack(pady=30)
label_Zwave.set(“Everything is OK”)
root.configure(background=‘green’)#change the status window to green

client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
client.on_connect=on_connect
client.on_message=on_message
client.username_pw_set(MQTT_USER, MQTT_PWD)
client.connect(MQTT_BROKER,MQTT_PORT)

#subscribe to both topics
client.subscribe(HA_CONNECTED_TOPIC,qos=1)
client.subscribe(ZWAVE_JS_UI_DRIVER_TOPIC,qos=1)
client.message_callback_add(HA_CONNECTED_TOPIC, on_message_from_HA)
client.message_callback_add(ZWAVE_JS_UI_DRIVER_TOPIC, on_message_from_Zwave_JS_UI)

#client.loop_forever()
client.loop_start()

#Execute Tkinter
root.mainloop()

  • Adjust the MQTT_BROKER, MQTT_PORT, MQTT_USER, MQTT_PWD and DEVICE_NAME to fit your specific environment
  • Save and Close the editor ‘CTRL-X’ answer yes and then enter

​6- Set the program to start at boot

  • Type and execute ‘cd /home/pi/.config’
  • Type and execute ‘sudo mkdir autostart’
  • Type and execute ‘cd autostart’
  • Type and execute ‘sudo nano showZNETstatus.desktop’
  • Cut and paste the following in the file:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=myprogram
Exec=python3 /home/pi/chkZNETstatus.py
Terminal=true

  • Save and Close the editor ‘CTRL-X’ answer yes and then enter
  • Type and execute ‘chmod a+r showZNETstatus.desktop’
  • Type and execute 'reboot’​

1 post - 1 participant

Read full topic

Automation trigger if notification text contains a certain string

$
0
0

Hi! I’m fairly new to HA, and I’m trying to do my first “advanced” automation, but I’m struggling a lot, here’s my project:

I simply want to detect when a precise set of characters are present in the text field of a notification I’m receiving on my android phone.

For a first attempt I wanted to try that with the facebook messenger app, I want to trigger an automation when the word “test” is anywhere in the message I’m receiving.

I had success in triggering something when the EXACT word is in the message (right now the word is “test”), but I want to add a condition saying “if the word ‘test’ is anywhere in the message, then trigger happens”, so it could also trigger when the message is something like “blablabla test blablabla”.

Here’s my code as of right now:

alias: test notif
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.sm_g781b_last_notification
    attribute: android.text
    to: {%- if is_state_attr('sensor.sm_g781b_last_notification.android.text') | contains('test') %}
action:
  - service: light.turn_on
    metadata: {}
    data:
      rgb_color:
        - 211
        - 29
        - 29
      brightness_pct: 100
    target:
      device_id: 273b38c9d6eb63a7d2cf1ab9168d24
mode: single

Obviously this doesn’t work at all.

I’ve tried a lot of different codes from looking at other topics here, like “value_template:”, but nothing I could make successfully work :pensive:

Any help would be greatly appreciated!

2 posts - 2 participants

Read full topic

Trying to setup a Thread network via SkyConnect

$
0
0

I’m trying to set up a Thread-enabled Aqara door P2 sensor. I have purchased a Skyconnect USB dongle and flashed it with Thread RCP (instead of the dual-protocol Zigbee & Thread because I already have a functional Zigbee antenna). I have installed and setup the Matter Server and Open Thread Border Router add ons as well as the Matter (BETA), Open Thread Border Router, and Thread integrations. I see nothing unusual in the logs of the add ons and the Integrations aren’t reporting any errors that I can find. When I go to add the sensor to my HA instance using the Companion app, I can see that the device is able to establish a connection to my phone (an iPhone 13 Pro running iOS 16.6) because the P2 starts blinking fast but then the Companion app gives me an error stating “Thread Border Router Required.” I don’t understand why the Companion app doesn’t see the established TBR since HA isn’t showing me anything (that I have found) that resembles a configuration or runtime error. I’ve been beating my head on this off & on for a week, have worn out Google trying to solve it, and am completely out of ideas. Can anyone help me figure out what I’ve done wrong or missed in trying to get this working, please?

One bit that seems suspicious is that the logs of the Matter Server addon does report a warning which had me rabbit holed for hours:

2024-02-15 16:55:04 core-matter-server zeroconf[126] WARNING Error with socket 69 (('::1', 5353, 0, 0))): [Errno 101] Network is unreachable
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 1200, in sendto
    self._sock.sendto(data, addr)
OSError: [Errno 101] Network is unreachable

But after setting the log level to debug, it immediately prints these additional statements which seem to indicate that it is actually connected to the network and listening for activity:

2024-02-15 16:55:11 core-matter-server matter_server.server.client_handler[126] DEBUG [547839923600] Connected from 192.168.1.176
2024-02-15 16:55:11 core-matter-server matter_server.server.client_handler[126] DEBUG [547839923600] Received: {
  "message_id": "25e69c9789794a529adcd93bd4f8b7a6",
  "command": "start_listening",
  "args": null
}
2024-02-15 16:55:11 core-matter-server matter_server.server.client_handler[126] DEBUG [547839923600] Received CommandMessage(message_id='25e69c9789794a529adcd93bd4f8b7a6', command='start_listening', args=None)
2024-02-15 16:55:11 core-matter-server matter_server.server.client_handler[126] DEBUG [547839923600] Handling command start_listening

My HA instance is running HAOS on a RPi4. It is physically located ~10 feet away from the sensor that I’m trying to pair with it with an interior wall between them. The Skyconnect is connected to the USB port with an extension dongle per recommendations related to potential interference.

1 post - 1 participant

Read full topic

3d dash borad

$
0
0

Not shure why getting error for all the stanked picktures but buttons and effect on board still work any ideas or thoughts would be appreciated.

2 posts - 2 participants

Read full topic

Google travel time instructions for dummies

$
0
0

So I want to use travel time to home for me and my wife. Does that mean I need to go into the google cloud console under my account and create an API key and then go under her account and create another API key?

Then add both into the integration with the Destination as: zone.Home for both of them

And origin would be: person.Jim, person.Wife?

1 post - 1 participant

Read full topic

Viewing all 105912 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>