Some of us experienced slow downs and re-connections with previous version. This one is rock solid for me.
Thanks for the info. Did the update immediately.
getting this error in the log file
Logger: homeassistant.components.python_script.shellies_discovery.py
Source: components/python_script/__init__.py:221
Integration: Python Scripts (documentation, issues)
First occurred: 11:55:47 PM (1 occurrences)
Last logged: 11:55:47 PM
Error executing script: id value None is not valid, check script configuration
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/python_script/__init__.py", line 221, in execute
exec(compiled.code, restricted_globals)
File "shellies_discovery.py", line 513, in <module>
ValueError: id value None is not valid, check script configuration
Can anybody tell me whatâs wrong ?
Solved this , there was a copy-paste error within the config.yaml.
Now thereâs no error in the log, but also none shellyâs whe where âdetectedâ of avaliable in the MQTT integration :S
When i start a listening to: shellies/# there are some showups like : Message 31 received on shellies/shellybadkamer/overtemperature
So thereâs some MQTT traffic i supose , whatâs the next thing to troubleshoot this ?
This is the automation.yaml for now:
- id: shellies_announce
alias: 'Shellies Announce'
trigger:
- platform: homeassistant
event: start
- platform: time_pattern
hours: "/1" # Modifying this if you are using Shelly Motion can drain your device's battery quickly.
action:
service: mqtt.publish
data:
topic: shellies/command
payload: announce
- id: 'shellies_discovery'
alias: 'Shellies Discovery'
mode: queued
max: 999
trigger:
platform: mqtt
topic: shellies/announce
action:
service: python_script.shellies_discovery
data:
id: '{{ trigger.payload_json.id }}'
mac: '{{ trigger.payload_json.mac }}'
fw_ver: '{{ trigger.payload_json.fw_ver }}'
model: '{{ trigger.payload_json.model }}'
mode: '{{ trigger.payload_json.mode | default }}'
We need debug log for to help you. Look here GitHub - bieniu/ha-shellies-discovery: Script that adds MQTT discovery support for Shellies devices
i have a lot of flood sensors, and after a reboot ha they are all unavailable until the next update, I see the values in the mqtt, why is ha not updated?
Show me debug log for python_script component.
Hi,
Am building a new HA instance and am slowly getting to grips with how everything is supposed to work. This weekend I planned to get MQTT up and running so I can start deploying Shelly units - I want MQTT as I have some Zigbee sensors that will also use MQTT, and from what Iâve read the MQTT approach to Shellies means a very fast no-lag response.
As a first step Iâve started with the H&T units as theyâre a (relatively) easy way to get the MQTT stuff working and thereâs no need to mess with the power in the house yet. On paper this should all have been pretty straightforward but in realityâŚletâs just say that Iâve been beating my head against various walls for two straight days trying to get this to work.
-
I believe I have the Shelly discovery script properly set up (installed python as instructed, tested with HelloWorld, installed Shelly Discovery via HACS, copied and pasted the configs from the instructions to configuration.yaml and automations.yaml). The H&T units are discovered and added under Config > Integrations
-
Data looks like it is getting through because the MQTT log also has entries like this:
1623548735: New connection from 192.168.20.70 on port 1883.
{âresultâ: âokâ, âdataâ: {}}1623548735: New client connected from 192.168.20.70 as shellyht-1E67D4 (p2, c1, k60, uâmqttuserâ). -
I can confirm this using MQTT Explorer where I see data coming through with time stamps and it is doing this nice little trend.
-
If I go to Config > Integrations > Mosquitto Broker > Configure and listen to shellies/# I can see data coming through.
-
I can see my discovered Shellies listed as devices and entities in the Mosquitto Broker integration (they appeared as soon as I changed my automation.yaml discovery prefix to âhomeassistantâ)
But the way I see it now I think I have three problems:
A. Everything is listed twice
I expected that the devices would just appear (after a lengthy battle) but when they did I started seeing double!
I have these âShelly Integrationâ device entities:
sensor.study_h_t_battery
sensor.study_h_t_humidity
sensor.study_h_t_temperature
and
I have these âMQTTâ device entities:
sensor.shelly_h_t_study_battery
binary_sensor.shelly_h_t_study_firmware_update
sensor.shelly_h_t_study_humidity
sensor.shelly_h_t_study_ip
sensor.shelly_h_t_study_temperature
I donât understand why Iâm ending up with duplicates, I donât know how they relate to each otherâŚand I donât know what this behaviour will mean when I start loading in shelly switchesâŚ
B. The âShelly Integrationâ sensors do not update
If I add a Lovelace card for the Shelly Integration devices they get the value at the point of integration, but they never updateâŚnot for HOURS, not even if the temperature changes. I can see the changes coming though on the MQTT Explorer and in the MQTT âListenâ but nothing changes on the card. Ever.
In contrast, the MQTT device entities do update and if I add them to a Lovelace card I get updates all the time!
C. The MQTT updates seem to be very frequent
I have the update threshold set to 1C, but Iâm regularly seeing updates of just 0.1CâŚand more than could be accounted for by parallel changes in humidityâŚas I understand it the Shellies should be asleep so I shouldnât get any updates unless the temp or humidity changes by 1C or 5%. At time these updates are coming through in five minute intervalsâŚwhich is also very strange.
Having added / removed / reinstalled for two days straight (to be fair it took a day to get it going because it is all so new) Iâm at the point where I need to ask for helpâŚ
Iâm running:
- HA OS running on a NUC (core-2021.6.3) - so everything is managed/containerised
- MariaDB as the database (seems to be working fine)
- Mosquitto Broker 6.0.1
- The lastest Shelly Script from HACS
Thereâs no obvious errors in the Supervisor log
Thereâs no obvious errors in the MQTT log
Thereâs no obvious errors in the Log Viewer
Thereâs no obvious errors anywhereâŚat least not the fat red onesâŚ
What the heck am I missing?
Cheers,
CP.
Probably you configured devices with core Shelly integration and with the Shellies Discovery. If you prefer to use MQTT, simply remove core integration configs.
HmmmmâŚmaybe thatâs it. I clicked on the Shelly core integration to read the documentation like you do in HACS (there wasnât any) so then I just cancelled it. I didnât add any devicesâŚ
So now I know that any integration you click on is immediately installedâŚeven if it turns out you donât need itâŚso now I need to figure out how to get rid of an integration I canât see to stop it from always getting in the wayâŚ
Fun times.
I canât seem to add my Shelly Duo - RGBW. I see that Duo is supported but I suppose not the RGBW version then?
So this was my bad. Iâm going to keep my post here in case someone else mess up like I did. Make sure to have the latest firmware!
Hello,
I use Shelly and MQTT on HA, i donât find problème.
A friend have the same installation like me. But the Shelly donât appear in HA:
-
Installed mosquitto add-on
-
Created user in user configuration
-
Set up integration (it now points to the add-on)
-
Run pyhon shelly discovery automations
-
Reboot HA
-
Shelly active MQTT and set up
Python script is ok.
Mosquitto MQTT is ok with MQTT Explorer.
Shelly status:
wifi_sta":{âconnectedâ:true,âssidâ:âFreebox-690CD0â,âipâ:â192.168.1.124â,ârssiâ:-59},âcloudâ:{âenabledâ:false,âconnectedâ:false},âmqttâ:{âconnectedâ:false},"
I have 2 Shelly with MQTT activated, none appear into HA intĂŠgration ou Supervisor Logs.
Any idear what iâm doing wrong ?
The device is not connected to the MQTT Broker.
Thanks for your answer and all you do for community
Ok, I understand the Shelly is not connected to MQTT, but why ? I donât have any error⌠And all parameters look ok. Need help !!!
Check MQTT broker log and the device log.
You can enable Shelly log in the device web panel, Settings â Device Info â Enable Debug Log
New version: 0.40.0
Changelog:
- remove
mode
argument for Shelly 2/Shelly 2.5 BREAKING CHANGE - use
voltege
topic forvoltage
sensor (Shelly 2/Shelly 2.5) - add light transition
Requirements:
- firmware 1.11.0
Hi All,
iâm using Shellies Discovery since few months, i prefer it to standard integration.
Today i updated the shellies firmwares and itâs a mess.
First issues was that 2 shelly2.5 used as roller shutter stopped to be recognized as roller.
I delete them from HA, run an shelly announce and restarted HA with no luck.
now i have deleted all my shellies but they are not recognized well.
Every one has only few entities like this one
any ideas what happened?
Thanks
Yes, you have not read the changelog.
out of curiosity: what changed in v1.11 regarding mqtt?