i have had this python scripts running rock solid for years now, good simple web interface etc
now lightning have struck my head and i want to expose it to HA as a network device, how could i go about that without to use stuff like mqtt etc?
i have had this python scripts running rock solid for years now, good simple web interface etc
now lightning have struck my head and i want to expose it to HA as a network device, how could i go about that without to use stuff like mqtt etc?
It supports Thingspeak, so you could use this:
though it is a cloud integration ( )
You’d probably have to create your own integration if you want something local.
Unless it has a restful api (I didn’t see anything like that from a quick glance).
i removed that from the org code to make it more simple… or so i think
i never thought i would want to integrate to HA at the time
Why no MQTT?
That really would be the simplest local solution.
well i could go MQTT
i just thought it would be more simple if it just pop’ed up as an device in HA without me had to change much to HA…
MQTT supports discovery. You just have to publish the correct messages to the discovery topic.
btw…
does that not assume that the code runs on the same machine as HA?
Yes the integration that connects to your device runs on HA.
i was looking for something that run on the device… but i guess i can start looking at MQTT, but it would be nice to have both options thou
There’s also a couple of APIs you can directly interface to from your device.
There may be issues creating sensors that way, I’m no developer, not 100% sure of the capability.
well i think mqtt is the most easy way for a noob like me, will give it a go over the next few days
made some progress
i now have all temps in HA, but the relay status is causing me trouble
i can listen to its topic… and i see it
in configuration.yaml i added:
mqtt: !include mqttsensors.yaml
in mqttsensors.yaml
sensor:
- name: "Shed1 Temperature"
state_topic: "TEST/panel/"
unit_of_measurement: "°C"
binary_sensor:
- name: "Shed1 Relay Status"
state_topic: "TEST/status"
payload_on: "True"
payload_off: "False"
the temperature gets through fine
but the status is “unknown”
my plan is just to have a heating symbol on the dashboard that goes yellow when on, and blue when off, just as with lights
where did i F up here?
I think you are missing a / behind TEST/status
doh… you are correct