Alternative software

Thanks for the log. Are these the complete contents?

I notice the nl80211 driver being loaded successfully, which didn’t work on my hardware so I assume your Wifi device differs from mine (which uses dkms 8188eu driver with wext).

These log entries actually look fine except for NetworkManager not continuing with “policy: auto-activating connection ‘IOTHERMOSTAT’” after the “state change: unavailable → disconnected”. I have to look into this. You don’t happen to have another network interface that did make a connection?

Only thing I can think of right now try is changing the mode in /etc/NetworkManager/system-connections/IOTHERMOSTAT from ‘adhoc’ to ‘ap’ or to blank.

edit:
Possibly in the [connection] section the following line

autoconnect=true

is required in

/etc/NetworkManager/system-connections/IOTHERMOSTAT

If that doesn’t work you can try adding a file

/etc/NetworkManager/system-connections/YOURSSID

with

[connection]
id=YOURSSID
uuid=5dda3496-4e8d-49dd-995b-69483bcfc9b8
type=wifi
autoconnect-priority=10
autoconnect=true
permissions=
timestamp=1539698191

[wifi]
mac-address=F2:EC:82:85:14:AD
mac-address-blacklist=
mode=infrastructure
seen-bssids=00:00:00:00:00:00;
ssid=YOURSSID

[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=Your password phrase

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

and make sure the files in /etc/NetworkManager/system-connections are readwrite only for root, otherwise NM will skip them!

I just tried all these options with no success I might have to try and build it myself manually .I can put all of the Log file on here if that helps ? those were all of the Network manager , errors and warning entries .

That’s unfortunate. Let’s have a look at the complete log.
Can you also post the output of:

sudo ls -la /SDCARDROOT/etc/NetworkManager/system-connections/

Since everything except NM seems to be working, I’d suggest to only reconfigure NM by booting the SD card on a Raspberry Pi with LAN, ssh into the machine, connecting the dongle and going through steps 19-22 outlined in Home · jbaans/iothermostat Wiki · GitHub

The limit count on the forum stops me putting more than 1/5 of the log is there another way to get it to you?

output for system-connections

    total 16
    drwx------ 2 root root 4096 Nov  6 21:32 .
    drwxr-xr-x 7 root root 4096 Oct 10 17:36 ..
    -rw------- 1 root root  555 Nov  6 18:58 Harrisons2.4GHZ
    -rw------- 1 root root  375 Nov  6 21:32 IOTHERMOSTAT

I have a Pi 3 lying around I can use that if it will work ?
I dont have a dongle the Pi used for my HestiaPi is the Pi zero W

thanks @HestiaPi

https://pastebin.com/9u0BRdeb

I put a timer of a week on the paste @janbonne

for the sake of Debugging I’ve tried again with a fresh image, edited the files and put my WiFi credentials no such luck . I did start to build it manually until I realized that I cant use the PI3 to use the Os as its different arm architecture . This explains why when I tried to boot the image on the Pi3 with an ethernet cable nothing happened. I’m stumped now as to what to do . I could order a Pi1 I guess.

Ok, I’ve examined your logfile and everything really seems fine - except for the wlan0 being inactive:

Oct 16 14:58:26 iothermostat NetworkManager[215]: <info>  [1539698306.0861] device (wlan0): supplicant interface state: disabled -> inactive
Oct 16 14:58:26 iothermostat NetworkManager[215]: <info>  [1539698306.0793] device (wlan0): supplicant interface state: inactive -> disabled

This and reading up on networking in arch makes me think the interface wlan0 requires an explicit activation.
So we’ll have to run at leasr one of the (but lets run both) commands:

ip link set wlan0 up
nmcli -p con up id “IOTHERMOSTAT”

at the appropriate time.

I’m thinking of creating a unit file with timer (see startup - Arch Linux run script a minute after boot - Unix & Linux Stack Exchange) and have that run a little script with the above line. The unit file (and probably timer) can be ‘enabled’ offline (!) manually according to systemd - What does systemctl enable netctl.service do - Unix & Linux Stack Exchange

I should have time to implement this later this week, but perhaps you can get it to run.

I will certainly give it a try, If all else should fail I could always install IOThermostat on top of a Raspbian image although it would be interested to get it operation on the Arch install , thanks for all your input so far @janbonne
I’ve not been 100% committed to getting the thermostat working , I’ve spent the last few days flashing a dozen Sonoff’s for my Home automation lighting but I’ll be finished in a few days and back on track .

I obtained a Pi-Zero W and reproduced the problem. Above I was close however incorrect:
The IOTHERMOSTAT profile needs the correct MAC address.
If you know it you can fill it in and reboot.
I’ll work on some script to do this automatically.

This is great news, I will give it a go on monday.

Please see https://github.com/jbaans/iothermostat/issues/1 for a fix.

Ok so I got it up and running and I thought I would give you some feedback from what I did and a few questons I have .

  1. when I followed the fix instructions and

wget https://github.com/jbaans/iothermostat/blob/master/configuration_files/home/setupFallbackWifi.sh

and

wget https://github.com/jbaans/iothermostat/blob/master/configuration_files/etc/systemd/system/setupFallbackWifi.service
but I still couldn’t get the hotspot to work. I then noticed that it didn’t download the contents of the file from github but the html of the page itself I copied the contents from the page manually using nano and finally after power cycling I got the hotspot to work .

  1. when I copied the file into setupfallBackWifi.sh into /home/iothermostat I had to use sudo as I didnt have permission to access the /iothermostat directory, when mounting the SD card on my laptop. I had to then chgrp and chown of files back from root to user 1001 ( aka iothermostat) not sure if this would have affected the outcome but it worked for me .

3)when following the instructions to upgrade it suggests

download and copy iothermostat/* to /home/iothermostat/iothermostat/

on my image it shows the directory as

iothermostat-python

  1. out of interest I have a Mqtt broker on my Openhab but I notice iothemostat has its own broker I take it this is essential for the web interface functionality ? I was wondering whether it is possible to have the client on iothermostat publish the temp/humidity/pressure to the openhab broker ?

5)On the topic of Mqtt , we discussed incorporating external temps sent from openhab connected sensors to the iothemostat I guess this is all related really, is it possible for 2 devices with brokers to publish to each other?

6)when touch the advanced.php icon on the touchscreen its not always responsive it can take several attempts to get it to the advanced page . Is this because of the touchscreen accuracy? all other icons on screen respond perfectly .

  1. I notice commits to the files in

configuration_files/etc/lighttpd is this something that I should copy across as its not something updated in the current image ?

  1. I am using 16Gb Sdcards on the iothermostats , however the system is only using 7.0gb any idea why?

     Filesystem      Size  Used Avail Use% Mounted on
     dev             232M     0  232M   0% /dev
     run             239M  260K  239M   1% /run
     /dev/mmcblk0p2  7.0G  2.1G  4.5G  32% /
     tmpfs           239M  4.0K  239M   1% /dev/shm
     tmpfs           239M     0  239M   0% /sys/fs/cgroup
     tmpfs           239M  8.0K  239M   1% /tmp
     /dev/mmcblk0p1  100M   27M   74M  27% /boot
     tmpfs            48M  4.0K   48M   1% /run/user/1001
    
  2. i have a recurring error

Nov 12 18:22:13 iothermostat python[353]: IOThermostat: [Errno 2] No such file or directory: '/home/YOURUSERNAME/iothermostat.csv'

should I create the log file for it ?

I really impressed so far with the image, its quick to load simple in design and I like the web interface setup for the scheduler . :+1:

now if I can incorporate the temp reading from openhab :arrow_forward: iothermostat and the humidity and pressure readings from iothemostat :arrow_forward: openhab, or even control the thermostat from from my openhab setup (more discussion on that another time on a different thread ) it would be perfect .

thanks again @janbonne for your hard work

1 Like

Hi,

This is great the feedback. Thanks for trying and for your :+1: :slight_smile:

1-3: I’ve updated the GIT to fix the problems you mentioned, and some more.

4: IOThermostat can use any MQTT broker, but it requires persistence and a few rules are setup for security.
Probably the best way to go is to make python report to the openhab broker in addition to its normal operation (a few simple connect client and publish lines).

5: For external temperature feed, IOThermostat python will have to subscribe to the broker and topic the data is published on, watch changes and update its temperature variable accordingly.

  1. I hoped it was just my device, but apparently it is a more general problem. Not sure if drivers can fix this. Any experience from the HestiaPi staff here?

  2. Yes this improves security

  3. The image has a partition table for 8GB. You can expand it, see for example here:
    https://raspberry-hosting.com/en/faq/how-expand-arch-linux-root-partition

  4. Please edit iothermosat.py DATALOGFILE variable (updated in GIT)

All control signals go via MQTT. So if you can make OpenHAB send (and receive) the right values, it will work. Have a look at mqttconf.js and topics.py. To get a sense of the data, open the web console of your browser when you’re in the webinterface.

1 Like

Great work on the fixes impressive turnaround time , really like the upgrade script as well. Everything is working great and Ill expand the partition when I get a moment , thanks for all the advice and the improvements .
As for questions 4,5 Ill start a new thread to ask my questions rather than bog down this thread.

In the mean time I’ve put a new image with many bugs fixed online, see github.

1 Like

how can I can temporarily change the 25°C limit on the schedule web interface, one of HestiaPi’s needs to be set to 27°C minimum or it will turn off before the rooms have had chance to get warm

Edit line 22:

var MAX_TEMPERATURE = 25;

in http/scripts/scheduleUI.js

Note: an iothermostat GIT update will overwrite this. You could do a chmod -w to prevent updates on this file (potentially breaks things in future).

That’s ok I don’t mind having to edit it after every update , until I sort out the external temp sensors

Thanks for help

Just a suggestion: since you’re only using 2GB of the image, you could make a 4GB img like HestiaPi’s and the user can resize the partition to their SD card size afterwards. It takes awhile to extract and write an 8GB image consisting of mostly 0’s.