# Installing homie-ota. not able to run service. Help please!

**URL:** <https://community.openenergymonitor.org/t/installing-homie-ota-not-able-to-run-service-help-please/2444>\
**Category:** emonSD\
**Created:** [8 December 2016 22:29 UTC](https://community.openenergymonitor.org/t/installing-homie-ota-not-able-to-run-service-help-please/2444 "2016-12-08T22:29:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yborf](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/y/ebca7d/32.png) [@yborf](https://community.openenergymonitor.org/u/yborf)\
**Post date:** [8 December 2016 22:29 UTC](https://community.openenergymonitor.org/t/installing-homie-ota-not-able-to-run-service-help-please/2444/1 "2016-12-08T22:29:19Z")

</div>

I’ve just flashed emonSD-07Nov16 RELEASE on my Rasperry Pi 2.

I would like to integrate [homie-ota](https://github.com/jpmens/homie-ota) a OTA “server” for Homie-ESP8266 framework for ESP8266 modules , I tried to follow the [install step by step instructions](https://github.com/jpmens/homie-ota/blob/master/INSTALL.md) but checking the log with

`journalctl -f -u homie-ota@hota`

I obtain this output

```
    Dec 08 21:26:12 emonpi python[810]: IOError: [Errno 30] Read-only file system: '/home/hota/homie-ota/homie-ota/homie-ota.log'
    Dec 08 21:26:12 emonpi systemd[1]: homie-ota@hota.service: main process exited, code=exited, status=1/FAILURE
    Dec 08 21:26:12 emonpi systemd[1]: Unit homie-ota@hota.service entered failed state.

```

the “Read-only file system” on the first line :…I think the problem is due to the fact that the system user hota is trying to write in the readonly partition.  
Thank you

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [9 December 2016 01:57 UTC](https://community.openenergymonitor.org/t/installing-homie-ota-not-able-to-run-service-help-please/2444/2 "2016-12-09T01:57:30Z")

</div>

you will need to move `/home/hota/` to `/home/pi/data/hota/` then symlink to allow homie to write to the log file.

`/home/pi/data/ ` is mounted as a R/W partition on the emonPi. Alternatively, you could move the logfile to `/var/log/`

---

<div class="post-metadata">

**Author:** ![yborf](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/y/ebca7d/32.png) [@yborf](https://community.openenergymonitor.org/u/yborf)\
**Post date:** [9 December 2016 09:33 UTC](https://community.openenergymonitor.org/t/installing-homie-ota-not-able-to-run-service-help-please/2444/3 "2016-12-09T09:33:00Z")

</div>

Hi Glyn  
thank you for replying.

I’m sure I’m doing something wrong (I’m sorry but I have a very little experience with Linux).  
I’ve moved  
`sudo mv home/hota/ home/pi/data/hota`

then Rebooted.

Now no more read only error 🙂  
but ☹ it fails

```
Dec 09 09:48:35 emonpi systemd[1]: Starting Homie OTA...
Dec 09 09:48:35 emonpi systemd[1]: Started Homie OTA.
Dec 09 09:48:37 emonpi systemd[1]: homie-ota@hota.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 09 09:48:37 emonpi systemd[1]: Unit homie-ota@hota.service entered failed state

```

and the status is

```
pi@emonpi(ro):~$ sudo systemctl status homie-ota@hota
            ● homie-ota@hota.service - Homie OTA
               Loaded: loaded (/lib/systemd/system/homie-ota@hota.service; enabled)
               Active: failed (Result: exit-code) since Fri 2016-12-09 09:48:37 UTC; 1min 42s ago
              Process: 811 ExecStart=/home/pi/data/hota/hota/.venvs/homie-ota/bin/python /home/pi/data/hota/homie-ota/homie-ota/homie-ota.py (code=exited, status=2)
             Main PID: 811 (code=exited, status=2)

```

at the same time MQTT server connection refused (from homie-ota.log):  
`2016-12-09 11:22:12,518 ERROR Cannot connect to MQTT broker at localhost:1883: [Errno 111] Connection refused`

But if I manually start the service with  
`sudo systemctl start homie-ota@hota`  
It’s ok, infact checking the status the output is

```
pi@emonpi(ro):~$ sudo systemctl status homie-ota@hota
● homie-ota@hota.service - Homie OTA
   Loaded: loaded (/lib/systemd/system/homie-ota@hota.service; enabled)
   Active: active (running) since Fri 2016-12-09 09:54:16 UTC; 3s ago
 Main PID: 4466 (python)
   CGroup: /system.slice/system-homie\x2dota.slice/homie-ota@hota.service
           └─4466 /home/pi/data/hota/hota/.venvs/homie-ota/bin/python /home/pi/data/hota/homie-ota/homie-ota/homie-ota.py
```
