Hi All,
and many thanks @Bieniu for your job.
I’m trying to integrate a news shelly1pm device.
What I have done
- setting a mosquito broker on my server,
- configuring shelly device two publish on that broker,
- check that connexion is ok:
On my server:
mosquitto_sub -h localhost -t shellies/announce
{"id":"shelly1pm-A4CF12F3D0EF","mac":"A4CF12F3D0EF","ip":"192.168.1.64","new_fw":false, "fw_ver":"20200601-123334/v1.7.0@d7961837"}
- install shellies discovery through HACS
- modify configuration.yaml file with following lines
python_script:
logger:
default: warning
logs:
homeassistant.components.python_script: debug
homeassistant.components.automation: info
mqtt:
broker: localhost
- modify automation.yaml file
- id: shellies_announce
alias: 'Shellies Announce'
trigger:
- platform: homeassistant
event: start
action:
service: mqtt.publish
data:
topic: shellies/command
payload: announce
- id: 'shellies_discovery'
alias: 'Shellies Discovery'
trigger:
- platform: mqtt
topic: shellies/announce
action:
service: python_script.shellies_discovery
data_template:
id: '{{ trigger.payload_json.id }}'
mac: '{{ trigger.payload_json.mac }}'
2020-07-22 20:57:28 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/binary_sensor/shelly1pm-A4CF12F3D0EF-firmware-update/config {"name": "Shelly 1PM A4CF12F3D0EF Firmware Update", "stat_t": "~announce", "uniq_id": "shelly1pm-a4cf12f3d0ef-firmware-update", "qos": 2, "dev": {"ids": ["a4cf12f3d0ef"], "name": "Shelly 1PM A4CF12F3D0EF", "mdl": "Shelly 1PM", "sw": "20200601-123334/v1.7.0@d7961837", "mf": "Allterco Robotics"}, "~": "shellies/", "val_tpl": "{% if value_json.id == 'shelly1pm-A4CF12F3D0EF' and value_json.new_fw == true %}ON{% else %}OFF{% endif %}", "avty_t": "shellies/shelly1pm-A4CF12F3D0EF/online", "pl_avail": "true", "pl_not_avail": "false"}
2020-07-22 20:57:28 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for shelly which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-07-22 20:57:35 INFO (MainThread) [homeassistant.components.automation] Initialized trigger Shellies Announce
2020-07-22 20:57:44 INFO (MainThread) [homeassistant.components.automation] Executing Shellies Announce
2020-07-22 20:57:44 INFO (MainThread) [homeassistant.components.automation] Shellies Announce: Running script
2020-07-22 20:57:44 INFO (MainThread) [homeassistant.components.automation] Shellies Announce: Executing step call service
Device is seen correctly, automation is started.
The fact is that I don’t know what to do now. No new device or entity appear in Configuration > integration > mqtt.
I must miss something, but what?