jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
5.29k stars 583 forks source link

Option for getting the watermeter restartet from the HA #3127

Open SvenMartin81 opened 6 days ago

SvenMartin81 commented 6 days ago

The Feature

Hi,

I would like to create a switch in my HomeAssistant to restart the watermeter. Is this possibile?. I could imagine that it will be possible if the SSH access can be enabled in the settings from the "Digitizer - AI on the edge - watermeter"

please, let me know.

jurasjo commented 5 days ago

You can use /reboot endpoint for that. https://jomjol.github.io/AI-on-the-edge-device-docs/REST-API/#reboot

Then create RESTful Command in the Home Assistant or create a flow in Node-Red and link it to a Button.

SvenMartin81 commented 3 days ago

Hi, I am not 100% sure how to do this. I am not really firm with Programming on myselve. Please can you help by doing this? That would be Great.

jurasjo commented 3 days ago

The approach depends on your configuration of the HA. If you use Node-Red then this approach may be easier. If not then some configuration must be placed into configuration.yaml file.

BTW, why do you need this restart functionality?

SvenMartin81 commented 3 days ago

Hi, I had the Problem that the Watermeter did not send any datas. After a restart everything was finde. My thinking was to mal a regulary restart, once a week.

SybexX commented 3 days ago

Wouldn't it be better to solve the problem instead of looking for compensation for the problem. I would turn on debug to possibly find out why it stopped sending the data. Which version are you using anyway, 15.7.0 or earlier?