Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any chance of updating Heatmiserneo #3

Closed
Trouble-51 opened this issue Feb 19, 2019 · 67 comments
Closed

Any chance of updating Heatmiserneo #3

Trouble-51 opened this issue Feb 19, 2019 · 67 comments

Comments

@Trouble-51
Copy link

Hi, I am using the original version for 11 thermostats. Any chance of sophisticating the project with more options that are available on the app from Heatmiser?

@MindrustUK
Copy link
Owner

Hi, What features are you after? Most things are limited by what the API exposes but if you have something specific in mind you can always raise a request and I'll see what I can do when I get some time.

I've only got the one stat so my testing is limited, as such I probably miss certain things.

@Trouble-51
Copy link
Author

Trouble-51 commented Feb 19, 2019 via email

@MindrustUK
Copy link
Owner

MindrustUK commented Feb 20, 2019

I've had a quick look into this last night;

The stats not responding independatly hasn't been reported by anyone else recently, someone contributed a fix to this a while ago. Until I get another Neostat-e I can't test this myself.

On the "Hold" functionality: the thermostat component has no option to enter a time, much as there is a hold function which can be used. I'm sure this could be hardcoded at a set interval. I'll need to find some time to investigate further and see if I can spawn an input field.

@MindrustUK
Copy link
Owner

I've also just noticed you refer to the "Orignal" version. There have been a few updates to the plugin since. Have you tested with the latest codebase?

@Trouble-51
Copy link
Author

Trouble-51 commented Feb 20, 2019 via email

@rosscullen
Copy link

Look forward to testing your work with Home Assistant. Have recently installed a new Heatmiser Neohub and 6 x Neostats

@haakonstorm
Copy link

haakonstorm commented Feb 23, 2019 via email

@Trouble-51
Copy link
Author

Trouble-51 commented Feb 23, 2019 via email

@Trouble-51
Copy link
Author

Trouble-51 commented Feb 24, 2019 via email

@MindrustUK
Copy link
Owner

Hi Jos,

The debug key can be removed. From the config, that will get rid of the error your seeing.

With regards to screenshots they aren't appearing in GitHub. Can you upload these to imgur or similar and link to them?

also consider when replying clearing down the previous email trail or reply on GitHub as it's creating a lot of very long threads.

@haakonstorm
Copy link

@haakonstorm
Copy link

Are there any installation instructions regarding adding this as a custom components when running HA in HASSIO on a RPi3B+ ?

@MindrustUK
Copy link
Owner

@haakonstorm Please raise requests in a separate issue. I'd suggest one for documentation in your case. I'll have a look at maybe writing something up on the wiki.

@Trouble-51
Copy link
Author

@mindtrustUK: I hardly dare ask as I know that you don't have much time to work on the .py file, but I do it anyway: I am using lovelace card "simple thermostat" which should show buttons but doesn't

Screenshot 2019-03-24 at 08 38 48

I also have Mitsubishi air conditioners which uses Melcloud (climate.py) and the do show buttons in the same simple thermostat card:

Screenshot 2019-03-24 at 08 38 02

my question is whether it would be possible to add buttons for heatmiserneo?

The Melcloud "states" have the following information:

Screenshot 2019-03-24 at 08 48 47

I guess the "operation mode" and "operation list" does the trick.

Could the applicable options be included in the climate.py file of the Neo?

@MindrustUK
Copy link
Owner

Returning operation mode should be trivial. I'll see if I can fit it in next time I look at the code. Last I looked at this I resolved away mode being applied to all thermostats at the Neohub layer but now HASS is doing some strange and not refusing to update status.

@Trouble-51
Copy link
Author

I tried the away mode using the simple thermostat and all rooms went to away mode that weren't already in that mode. When I switched it back all rooms, with the exception of the rooms that were set in away mode on the app on the iPhone, went back to idle and the set temperature.

@MindrustUK
Copy link
Owner

Sorry, my previous statement may have been confusing. I have not pushed the away functionality to public yet as it's still doing some werid stuff I'm not happy with. Updates when I get to it again.

@Trouble-51
Copy link
Author

Trouble-51 commented Mar 27, 2019 via email

@simonsmart99
Copy link

simonsmart99 commented Apr 23, 2019

Hi MindrustUK. This is great work with Heatmiser Neo. I have a 15 device setup of which 14 are configured as thermostats and 1 has been configured as a clock to control the heating of the hot water cylinder.

Of the 14 thermostats, 6 are NeoStat and 8 are NeoAir, all talking to a V2 Gen NeoHub. I am happy to be used as a test site if this helps.

Heatmiser Entity Card

Heatmiser Thermostat Card

Comments:

  1. There are no control buttons on the Thermostat Card. I presume you are looking at incorporating the standard Heatmiser functions of "Auto", "Hold" and "Standby"?

  2. When a NeoStat is configured as a clock, the Idle temp in HA displays 238 degC. I presume your script is interpreting data as a temperature even when the device is configured as a clock. I presume the data in this case could be a switching time? Not at all sure.

Questions:

  1. Is it possible to call the current temperature of a device within an automations script. IE I would like to switch a smartplug on when the current temperature exceeds 20 deg. (Sorry, very much a beginner)

Any questions please ask.

Regards
Simon

@MindrustUK
Copy link
Owner

Hi Simon,

Unfortunately life has a habit of keeping me busy at the minute, most of this still on my list to get round to.

Standard functions: "Auto", "Hold" and "Standby", I was having some challenges with regards to time entry and the HASS UI I need to revisit. This is due to when asserting "Hold" a time is required and I wanted a nice way to feed this in without relying on a separate data source or fixed variable.

Time clock: there's an open issue here; https://github.com/MindrustUK/Heatmiser-for-home-assistant/issues/2 I'm going to get to when I have a bit more tinkering time. This is also affecting the NeoPlug hardware support I plan on adding (They also present as a time clock of sorts). The suggestion of a switching time is a good one. I don't actually know what "Time Clock" mode really means so I have to do more reading before I can provide a 'Good' answer to this.

An example of an automation based on time criteria can be executed as follows:

- alias: 'Set kitchen heating to 22 Deg C at 6:30 on Weekdays'
  trigger:
   - platform: time
     at: '06:30:00'

  condition:
   - condition: time
     weekday:
       - mon
       - tue
       - wed
       - thu
       - fri

  action:
    service: climate.set_temperature
    entity_id: climate.kitchen
    data: {"temperature": 22}

Hope that helps, please check other issues for updates on specifics and feel free to raise new issues for things not already identified.

@simonsmart99
Copy link

I have also noticed that the "away mode" function doesn't have any affect on my system.
Heatmiser differentiate between "away" and "standby". If you select "away" on the app this will set all devices into away mode, and you cannot choose to keep one active. This includes clocks.

The standby function is selected within each thermostat, and is used when a room is not being used and does not need heating. This is an individual setting for each thermostat.

I hope this helps.

If you want me to test anything, please feel free to send me an update.

@simonsmart99
Copy link

Many thanks for your response. Regarding the automation, I was wanting to compare the actual room temperature to a specific value, and switch a smartplug if the temperature exceeds that value. Something like this:

- alias: 'Switch smartplug when ensuite temperature exceeds 22 Deg C'
  trigger:
    platform: template
    data_template: {{states.climate.guest_ensuite.current_temperature > 22 deg}}

  action:
  - service: homeassistant.turn_off
    entity_id: switch.smartplug_ensuite

The problem is I don't know how to extract just the current room temperature out of the climate.guest_ensuite data.

@MindrustUK
Copy link
Owner

Hi @simonsmart99 That looks right at a quick glance, however I suggest you try the HASS forums. I'm not sure you can trigger on temperature, I think you can only use it as a condition. I haven't done much investigation but you may get better input from the forums.

@simonsmart99
Copy link

I did some research on the HASS forums, and came up with the following solution if anyone wants to try this.

First define a new sensor for the current room temperature in configuration.yaml

# Sensors
sensor:
  # Climate temperature
  - platform: template
    sensors:
      boiler_room_temp:
        friendly_name: "Boiler Room Temperature"
        unit_of_measurement: '°C'
        value_template: "{{states.climate.boiler_room_clock.attributes.current_temperature}}"

Then in automations.yaml

###############################################################
## Heating Control
###############################################################   

- id: boiler_room_over_temp
  alias: Boiler room over temperature
  trigger:
    platform: template
    value_template: "{{states('sensor.boiler_room_temp')|float > 27|float}}"
  
  action:
  - service: homeassistant.turn_on
    entity_id: switch.sonoff_smartplug
        
- id: boiler_room_under_temp
  alias: Boiler room under temperature
  trigger:
    platform: template
    value_template: "{{states('sensor.boiler_room_temp')|float < 27|float}}"
  
  action:
  - service: homeassistant.turn_off
    entity_id: switch.sonoff_smartplug

Works very well.

@MindrustUK
Copy link
Owner

@simonsmart99 Can you send me the output of printf '{"INFO":0}\0' | nc <NEOHUBIP> 4242 (Please review for sensitive information before you post) so I can see some examples of time clock behaviour. As this doesn't report / handle temperature there may be a need to address the use case differently in HASS.

@simonsmart99
Copy link

Sorry for the noob question, but where should I run this command. I have run it in the root directory of the rPi running HASS, but it returns nothing.
printf '{"INFO":0}\0' | nc 192.168.0.232 4242

@MindrustUK
Copy link
Owner

Hi @simonsmart99 it's possible netcat may not be installed try the following and then repeat the command as previous:

apt-get update ; apt-get install netcat

@simonsmart99
Copy link

Sorry, apt-get is not installed on HASSIO. I am working on it.

I have just upgraded to latest HA, and now my heatmiserneo platform is not recognised when I check the config. Anyone else had the same problem?

@MindrustUK
Copy link
Owner

MindrustUK commented Apr 29, 2019

Hmmm hassio should already have NetCat installed, try running which nc and see if is on the path.

Answers around 0.92 can be found here #10

@Trouble-51
Copy link
Author

Hi any chance of an update of heatmiserneo. I get the following error: Platform error climate.heatmiserneo - Integration 'heatmiserneo' not found. Notsure what this means and what to do about it. Help would be very much appreciated!

@haakonstorm
Copy link

Hi Trouble-51!
We might help you but would need more details about your setup.
The heatmiserneo works perfectly here on latest ha, see screenshot-.

  • Start by updating to latest home assistant.
  • Download all the latest files from this repo to your hass installation
  • reboot, reboot
  • also always remember to take snapshot backups and copy them out of your rpi if you use hassio
  • yesterday was spent all day rebuilding everything because of corrupted sd card
    kScreenshot of Vivaldi
    I'm using the simple thermostat to view and control the neo-e thermostats.

@Trouble-51
Copy link
Author

Hi Haakonstorm, I also use simple thermostat, which works fine with Melcloud for my airco's but no luck with heatmiserneo anymore

here are the screen shots of my configuration and custom-components files:
Screenshot 2019-10-30 at 07 16 40
Screenshot 2019-10-30 at 07 17 41

@Trouble-51
Copy link
Author

After rebooting as opposed restarting the thermostats are back!! Thanks for pointing that out.

Having said that i only have one state which is "heat"and when i push on it I get the following message: Failed to call service climate_set_hvac_ mode. Any idea why that is? Can you let share your lovelace setting for your thermostat?

@Trouble-51
Copy link
Author

Screenshot 2019-10-30 at 08 37 34

@haakonstorm
Copy link

No big surprises:

- platform: heatmiserneo
  host: 192.168.1.14
  port: 4242

this is what I would have done in your place your results may vary!

  1. check that your IP is still correct, I have assigned a static IP for my hub based on the MAC-address of the hub. You can get the MAC-address by first finding and verifying the IP of your hub hasn't changed, use your terminal of choice (iterm2 is good):
    nmap -Pn -p4242 -oG - 192.168.1.0/24 | grep 4242 | grep -i open
    lets say your hub IP is 192.168.1.2, then you ping it:
    ping 192.168.1.2 -t 5
    this will stop after 5 seconds. now your machine has stored the MAC address for the hub in its ARP table, which you can query like this:
    arp 192.168.1.2
    now open your routers admin interface and add a static IP for the MAC address, so that 192.168.1.2 is always assigned to the hub MAC.

  2. take a full backup of your hass installation, ideally both a snapshot and a clone of the memory card if you are on hassio with sdcard

2.1 comment out the heatmiserneo section in your configuration.yaml and save

  1. log in to your hassio instance over port 22 ssh root@192.168.1.2 and go to your custom components cd config/custom_components

  2. stop home assistant hassio ha stop

  3. remove your heatmiserneo integration rm -rf heatmiserneo and perhaps rm -rf heatmiserneoplug

  4. start home assistant hassio ha start wait for finish

  5. reboot your host hassio host reboot

  6. wait for everything to come back up, then reboot again either via hassio host reboot in the gui or via ssh as above. yes *twice reboot

  7. clone this repository, I would suggest using GitHub Desktop or similar GUI app if you are more comfortable with that; easier to upgrade.

  8. i would not follow the suggested procedure written in this repo readme for installing. i would not git clone directly to the home assistant working directory for custom_components. try cloning to your local machine and copy the files over manually, to the directory config/custom_components/heatmiserneo

  9. uncomment the reference to heatmiserneo section in configuration.yaml, you've now both reinstalled the code and set up configuration.yaml to  run it again

  10. save everything, then reboot

  11. reboot again as soon as it is up and running

  12. should be good to go

@Trouble-51
Copy link
Author

thanks for your very clear input.

However i get the following error message after rebooting:

Platform error climate.heatmiserneo - cannot import name 'STATE_AUTO' from 'homeassistant.components.climate.const' (/usr/src/homeassistant/homeassistant/components/climate/const.py)

any idea what to do about that? As a result there are no "climate states" in the state option relating to heatmiser.

@Trouble-51
Copy link
Author

PS: i just got back from an overseas trip, hence my delayed message

@Trouble-51
Copy link
Author

and the thermostats look like this:

Screenshot 2019-11-02 at 15 23 00

the words are: entity not available for "all the names in lovelace"

@Trouble-51
Copy link
Author

I found a more detailed message which probably explain the error better:

File "/config/custom_components/heatmiserneo/climate.py", line 14, in
from homeassistant.components.climate.const import (
ImportError: cannot import name 'STATE_AUTO' from 'homeassistant.components.climate.const' (/usr/src/homeassistant/homeassistant/components/climate/const.py)

@Trouble-51
Copy link
Author

I copied the raw climate.py into the custom components/heatmiser folder and got back to where i started

Hopefully mindtrust will find some time to get the climate.py file unto date with the new HVAC structure

@Trouble-51
Copy link
Author

This is the screen shot of my Mitsubishi airco with the MELCLOUD climate.py file
Screenshot 2019-11-04 at 22 55 28

@haakonstorm
Copy link

Error in climate.py.
Hmmm.
After all, everybody is talking about massive climate change, right?

@haakonstorm
Copy link

Sorry, just had to.

Let me search github issues a bit on the error messages you provided and see if I can come up with something to try.

If that don't go anywhere I'm here to offer up to try and rather see if I can help one on one in some way or another, via Teamviewer, VPN or external access somehow we can get working.

I was generously helped live some time back by one of the devs behind hass-cli, when it misbehaved and should'nt have. He remoted my raspberry pi 3b+ from across the vast internets and raced her around like she had only earlier ever been driving out in fresh air once a week. On sundays. By old ladies. Hung over from pear cider. My angel raspberry woke up that day and yet as she was no longer yesterdays sweet little baby girl she was not yet a proper woman, either. The next handful of days my eyes grew dry and self-loathing by witnessing this malplaced beauty slaving my cheap IKEA light bulbs on and off, on and off and, once every single hour, overcome her fears and drag her tiny feet down to the humid cellar and give climate.py the solid kick in its libraries needed for keeping it from dozing and never wake up to get than last patch for a breaking change. Finally I manned up and did what any other true man would have done in my place, I set her free and replaced her by chaining a new raspberry pi 4b to her old prison, and flashed her SD card with a new full time engagement more fit for quenching her new and righfully awoken thirst to dip her tongue in the mysterious wells of the world wide webs. She's happy now. She was flashed with the pi-hole docker container and smiles, nods with recognition, dims my IKEA lights and turns on the lounge jazz at once any time my imac.config.VPN state turns on.

Anyways, I was about to do my bit and search for similarly themed issues here on the hub, be right back.

@haakonstorm
Copy link

I see now that the error message you get:

File "/config/custom_components/heatmiserneo/climate.py", line 14, in
from homeassistant.components.climate.const import (
ImportError: cannot import name 'STATE_AUTO' from 'homeassistant.components.climate.const'

implies that the climate.py version your hass is loading has to be an old version, because STATE_AUTO is not imported in the current version of this component.

I'm not very well versed in python, but I do know that there is a fair bit of caching going on. That's why I was so specific in the instructions above in order to be 100% sure to get rid of your old install and 100% sure the newest version from the repo was the only code, cached or otherwise, running on your hass. Could you please try doing the procedure as above and try again?

I might be totally wrong in any of my assumptions, but one thing is for sure and that is that hass is complaining about something this component used to ask for but no longer does.

My guess is doing the above, or at least successfully somehow getting the newest version of the component running in your hass, will get everything up and running again.

turning on the VPN

@PhillyGilly
Copy link
Contributor

I thought I would give you an update. Herewith the new screenshot, with buttons on the thermostat card. None of the buttons are functional, and I receive the following message when I click on any of them.

Failed to call service climate/set_operation_mode

Also the boiler device which is configured as a clock still has the idle setpoint as "238".

heatmiserneo_latest

Simon, did you get anywhere with your 238 problem?
I've got the same here (see below)
homeautoheatmiser
The two rows represent a Bedroom with a Bathroom that has electric underfloor heating and an on/off towel rail. I think that the controller on Towel Rail 2 is a neoStat-hw v1 but on Towel Rail 3 it is a v2.
In an ideal world I'd like to bring the neoSat-e as Thermostats displaying the air temperature but the neoStat-hw as Binary Sensors. I'm guessing this will require a bit of work on the climate.py. Should I tackle this by detecting TIMECLOCK_MODE in [INFO] or is it a DEVICE_TYPE property?

@Trouble-51
Copy link
Author

Trouble-51 commented Dec 1, 2019 via email

@Trouble-51
Copy link
Author

Trouble-51 commented Dec 1, 2019 via email

@PhillyGilly
Copy link
Contributor

Further investigation:
I've collected the JSON file sent by the heohub by copying it from my HA log, and then rearranged it into a spreadsheet showing rows for the items and columns for each device.
Json.xlsx
It's hard to see how the returned information is going to help determine what kind of neoStats are fitted (unless it is something that my installers did or didn't do when setting up the neoStats)

@Trouble-51
Copy link
Author

Trouble-51 commented Dec 2, 2019 via email

@PhillyGilly
Copy link
Contributor

PhillyGilly commented Dec 2, 2019

Interesting spreadsheet! Isn’t it true that a lot of the available fields are not used in the "Neostat support for home-assistant.io <http://home-assistant.io/>” and as it stands most of which are not needed, but some of which may make it a lot more useful? I see that only two of your devices have STANDBY as “true’ but how does that translate in the new away button. As I mentioned in my email all my 11 thermostats got to Away Active (on the iPhone app) when I press the button on one of them as opposed to STANDBY for the one I pressed. Do you have the same problem? I don’t see an ‘idle” field in the spreadsheet, shouldn’t that be there or AUTO as it is called in the app? The app has three options AUTO, HOLD and STANDBY, it would be nice if those options were individually available for each thermostat. I am just commenting as I am no programmer, but hopefully just giving some useful input as I have 11 thermostats.

On 2 Dec 2019, at 10:55, PhillyGilly @.***> wrote: Further investigation: I've collected the JSON file sent by the heohub by copying it from my HA log, and then rearranged it into a spreadsheet showing rows for the items and columns for each device. Json.xlsx https://github.com/MindrustUK/Heatmiser-for-home-assistant/files/3910857/Json.xlsx It's hard to see how the returned information is going to help determine what kind of neoStats are fitted (unless it is something that my installers did or didn't do when setting up the neoStats) — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#3?email_source=notifications&email_token=AGL2HVBAAN3TZ3WYNBIOWFLQWTSRTA5CNFSM4GYNNFT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFTCZCY#issuecomment-560344203>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGL2HVBARZSK3A7A5VZUYB3QWTSRTANCNFSM4GYNNFTQ.

Without too much in the way of computer skills, you should be able to create your own similar spreadsheet. If you add the following to your Home Automation configuration file it will start to capture the necessary data.

logger:
default: warning
logs:
custom_components.heatmiserneo: debug

Go to Developer Tools and then select Logs. Then ask for the extended log. Be patient then it will look like this:
image
The info about your 11 thermostats is in the bit following json_response:
Getting it into rows and columns involved a) finding and replacing comma-space with comma-cr-lf, and b) a bit of text to columns in excel.
Don't leave it running like that for a long time or your log file will get unmanageable large!

@Trouble-51
Copy link
Author

I did create the spreadsheet but don't know whether it shows something that is helpful in solving the issue that all my thermostats go to standby when I press the away button on one of the 13 thermostats.
JSON Jos.xlsx

@ghost
Copy link

ghost commented Dec 21, 2019

Hi all

I have a heatmiser 2 channel RF receiver/switch. Will this plugin allow me to control it, well all i need is HW on and off. For CH , which heatmiser stat will work with this?
If you need me to probe the receiver then tell me how to do it and what to do, and i will help.

@Trouble-51
Copy link
Author

with the latest update of Home assistant, version 0.110.1 I get the following message:

Log Details (WARNING)
Logger: homeassistant.components.climate
Source: components/climate/init.py:547
Integration: Climate (documentation, issues)
First occurred: 13:07:04 (1 occurrences)
Last logged: 13:07:04

ClimateDevice is deprecated, modify HeatmiserNeostat to extend ClimateEntity

Can you please help to solve this issue?

@rosscullen
Copy link

Same issue here. Any help greatly appreciated :-D

@MindrustUK
Copy link
Owner

Updated as per latest commit. Should resolve the issue.

@Trouble-51
Copy link
Author

Thanks very much for the speedy action. The message is gone!

@MindrustUK
Copy link
Owner

Closing issue. Lots of updates and this thread has become a bit of a unspecified collection of multiple issues.

cyclops1982 pushed a commit to cyclops1982/Heatmiser-for-home-assistant that referenced this issue Oct 10, 2022
Refactor out common methods into base NeoStatBinarySensor class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants