High,
I’m running a few ALLNET-Devices (ALLNET 3073 plug). As I’m new to HA, I’m looking for some ideas/guides or tips on how to integrate the device.
Maybe somebody already has included/integrated those devices and can be of some assistance.
Thanks
High,
I’m running a few ALLNET-Devices (ALLNET 3073 plug). As I’m new to HA, I’m looking for some ideas/guides or tips on how to integrate the device.
Maybe somebody already has included/integrated those devices and can be of some assistance.
Thanks
Looks like they provide a REST interface, so you might start with the RESTful switch integration. There is also a documentation on the interface available.
Thanks,
I was able to retrieve different parameters from the device. Now I’m looking for a way to switch the device on and off.
Read the docs … a REST switch is bi-directional, otherwise it would be a sensor.
After some experimenting, I was able to create a command_line switch. My experiments with creating a RESTful switch were unfortunately not successful. I’m not able to create a working RESTful switch.
Not sure, if RESTful is not possible or I’m doing something wrong. My Command_Line switch looks like this:
- platform: command_line
scan_interval: 15
switches:
allnet_plug:
command_on: !secret wpower_on
command_off: !secret wpower_off
command_state: !secret wpower_stat
value_template: '{{ value_json["result"]["status"] == 1 }}'
friendly_name: ALLNET Plug
The power-on/off and state strings in secret.yaml are:
wpower_on: 'curl -k "https://username:[email protected]/xml/jsonswitch.php?id=1&set=1"'
wpower_off: 'curl -k "https://username:[email protected]/xml/jsonswitch.php?id=1&set=0"'
wpower_stat: 'curl -k "https://username:[email protected]/xml/jsonswitch.php?id=1"'
Hi, you might also try my first home assistant integration?
Rothy/homeassistant-allnet