Git Product home page Git Product logo

Comments (9)

jeremywillans avatar jeremywillans commented on September 15, 2024

Ok if you have got the roomba creds, then you dont need RoombaPW (as its only used to get the creds!)

Essentially when you add a new addon in HA (formerly HASS) there is a configuration section which allows you to set variables. this is where you define both the ROBOT_IP address in the case of RoombaPW, as well as where the ports are defined for the rest980 (default 3000) and php_nginx (default 3001) images.

Hope this helps!

from ha-rest980-roomba.

Penguin-Guru avatar Penguin-Guru commented on September 15, 2024

Thanks, I found the Configuration tab! Still getting used to this interface it seems...

Could you confirm whether "vacuum.yaml" and "lovelace.yaml" should be created in "/config"? That's my assumption, since it's where "secrets.yaml" is, but I'm still having some trouble.

The trouble I'm having now is: nothing appeared in my Overview tab but the add-on logs both seem normal. Opening image.php in a web browser shows mostly binary data but here are some highlights.

At the beginning:

Warning: file_get_contents(http://127.0.0.1:3001/vacuum.log?v=1606182058): failed to open stream: Connection refused in /config/vacuum/image.php on line 50

Notice: Undefined offset: -1 in /config/vacuum/image.php on line 57

Warning: Cannot modify header information - headers already sent by (output started at /config/vacuum/image.php:50) in /config/vacuum/image.php on line 241

At the end:

Notice: Undefined variable: roomba_stuck in /config/vacuum/image.php on line 249

Warning: imagedestroy() expects parameter 1 to be resource, null given in /config/vacuum/image.php on line 249

Warning: imagedestroy(): supplied resource is not a valid Image resource in /config/vacuum/image.php on line 250

There is no such log file in the vacuum directory so I tried touching one and restarting but that didn't help. It is supposed to be the nginx port, right?

from ha-rest980-roomba.

jeremywillans avatar jeremywillans commented on September 15, 2024

This deployment uses the HA Packages feature so you dont need to copy the content of vacuum.yaml into any other files. The lovelace file content you need to copy into two lovelace cards, likely through the UI.

You cant use IP Address 127.0.0.1 -> Replace with the actual IP Address of your HA Box (as this is accessed from the browser of your computer, its trying to connect to itseelf which is why your getting the error.

from ha-rest980-roomba.

jeremywillans avatar jeremywillans commented on September 15, 2024

Bump

from ha-rest980-roomba.

Penguin-Guru avatar Penguin-Guru commented on September 15, 2024

Sorry for the delay. I got sidetracked by some other HA issues but that's no excuse...

I tried changing the IP address to the system's actual address but the output from image.php looks the same to me. The messages I mentioned before are all still present. I tried restarting HA and even restarting the whole system. Is there something I need to do to generate new content for image.php?

I have not copied the contents of "vacuum.yaml", I just installed it in "/config". I'm not sure how to configure lovelace but will try to figure that out and see if that's what's causing these messages.

Is there supposed to be a "vacuum.log" file in "/config/vacuum/" ? I see that's defined in "secret.yaml" and I thought it would create itself automatically but it doesn't seem to have done that. Perhaps because no connection with the robot has been successful?

from ha-rest980-roomba.

Penguin-Guru avatar Penguin-Guru commented on September 15, 2024

I tried adding the cards through the UI like you said (after deleting the old lovelace.yaml and restarting HA). I pasted in the card code for just the first item and fixing the spacing, but it said "UI editor is not supported for this config:" "Cannot read property 'setConfig' of undefined". I then tried adding just the second card item, but the same error appeared. Adding the first and second together was the same.

Then I found another place in the UI to edit the whole file. This did let me add the cards after fixing the indentation, but I had to indent the last "head" and "type" section (at the end of your file) to four indents (eight spaces). Hopefully this where it's supposed to be.

I also removed the four rows in the Picture Glance Card section because the "type" declaration was a "duplicated mapping key". Hopefully this isn't necessary to proceed with debugging. Is it supposed to be indented inside another section?

The result of all this is two cards in my Overview-- Selective Room Cleaning and Maintenance. Maintenance shows "Entity doesn't exist. Create?" for each sub-item. I haven't tried creating them yet. Selective Room Cleaning shows "Entity not available" for many (probably all) of the areas I defined in a yellow section at the top, then a red section below that with the following message:

ButtonCardJSTemplateError: TypeError: Cannot read property 'state' of undefined in 'if ((states['group.vacuum_rooms'].state == "on") && (states['sensor.vacuum'].state == "Ready")) ...'

tap_action: action: call-service service: automation.trigger service_data: entity_id: automation.vacuum_clean_rooms type: 'custom:button-card' group_expand: false hold_action: action: none double_tap_action: action: none layout: vertical size: 40% color_type: icon show_name: true show_state: false show_icon: true show_units: true show_label: false show_entity_picture: false show_live_stream: false card_size: 3 entity: automation.vacuum_clean_rooms lock: enabled: | [[[ if ((states['group.vacuum_rooms'].state == "on") && (states['sensor.vacuum'].state == "Ready")) return false; return true; ]]] duration: 5 unlock: tap exemptions: [] name: Clean Rooms styles: card: - height: 50px default_color: var(--primary-text-color) color_off: var(--paper-item-icon-color) color_on: var(--paper-item-icon-active-color)

I checked in Developer Tools and "/config/groups.yaml" and there do not seem to be any vacuum-related groups defined.

from ha-rest980-roomba.

jeremywillans avatar jeremywillans commented on September 15, 2024

have not copied the contents of "vacuum.yaml", I just installed it in "/config"

this isnt going to work. the vacuum.yaml file is intended to be used with packages component of HA

for simplicity -
in your config directory, create a new folder called packages and put the vacuum.yaml in this folder.
edit configuration.yaml add the following (note: if there is already a homeassistant: line in your file, then just add the packages line as an additional entry in this section)

homeassistant:
  packages: !include_dir_named packages

without this, none of the required sensors are created resulting in the other errors you are getting.

from ha-rest980-roomba.

Penguin-Guru avatar Penguin-Guru commented on September 15, 2024

Ok, thank you! I haven't tested everything yet but this does seem to be working now. I'm still not sure what the packages component is but I don't want to waste your time explaining that. I'll look into it. :)

After following the instructions in your previous message, some helpful error messages guided me through a few other steps that weren't clear to me from the GitHub instructions. These probably should have been obvious if I knew what I was doing but I'll mention them anyway in case they're useful to somebody else.

  • Edited "vacuum.yaml" to use the areas I defined in "secret.yaml".
  • Edited the U.I. card to use the areas I defined in "secret.yaml".
  • Commented out vacuum_notify sections in "vacuum.yaml".

from ha-rest980-roomba.

jeremywillans avatar jeremywillans commented on September 15, 2024

Thanks for taking the time to point this out. I have tried to better articulate these items in the README 👍

from ha-rest980-roomba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.