Yep that’s a great solution too …
Any chance you could post your code etc …
Here’s an example. A blueprint version of this approach will be released with the next HASP release now that the March beta has the features I need to make this happen.
Thanks Luma … looking forward to it
Gary
here you go. might not suit everyone but works for me.
also have a script that when everyone is at work the house goes to sleep and the panels turn off.
automation:
# dim/brighten backlight with no touch events
- alias: hasp_charlottebd_00_LightOnButton
trigger:
platform: mqtt
topic: "hasp/charlottebd/state/#"
condition:
- condition: template
value_template: "{{ trigger.payload == 'ON' }}"
action:
- service: light.turn_on
entity_id: light.charlottebd_backlight
- service: mqtt.publish
data:
topic: "hasp/charlottebd/brightness/set"
payload: "255"
- service: timer.start
entity_id: timer.hasp_charlotte_backlight_timer
- alias: hasp_charlottebd_00_LightOff
trigger:
platform: state
entity_id: timer.hasp_charlotte_backlight_timer
to: "idle"
action:
- service: input_number.set_value
data:
entity_id: input_number.hasp_charlottebd_activepage
value: 2
- service: mqtt.publish
data:
topic: "hasp/charlottebd/brightness/set"
payload_template: >
{% if is_state('input_boolean.house_kids_in_bed', 'on') %}
0
{% elif state_attr('sun.sun', 'elevation') >= 10 %}
255
{% elif (state_attr('sun.sun', 'elevation') < 10) and (state_attr('sun.sun', 'elevation') > -10) %}{{ ((state_attr('sun.sun', 'elevation') + 10) * 12.5) | int + 5 }}
{% else %}
10
{% endif %}
many thanks … I’ll give it a try …
Gary
Announcing HASPone!
This has been a long time in the making! This release brings us to a place where I think we’ve finally reached something we can call a 1.0 release. To celebrate, I’m changing the name of the project to HASPone. The new name comes with a new home in a new repository.
There are so many things new or different about this release that it’s hard to list them all. So first, let me start with the bad news: This update is going to break basically everything. Packages are gone, Blueprints are in, and with that comes the need to nuke your packages. The good news? Re-creating most of what you have today should be a breeze, and you can do it without once opening a code editor.
That’s right:
NO MORE YAML!
Some other highlights:
- Massive performance and memory utilization improvements
- Support for MQTT over TLS and accessing HTTPS servers for things like firmware updates
- 8x speedup in LCD serial communication
- Improved error checking and reporting
- Tight integration with the Home Assistant device registry
- No more packages, no more
deployhasp.sh
, no more code editors, and NO MORE YAML!
If you’ve deployed the dev
release:
…you’ll need to wipe all of that out. Thanks for your help testing! Delete any automations created and delete any blueprints you’ve imported. There’s a whole new batch for you to work with in the HASPone release. Update the ESP and LCD firmware in the web administration page - there have been substantial changes between the 1.0 release and what you have been testing!
Update Home Assistant to 2021.3
HASPone is making use of several new features found in Home Assistant release 2021.3. Make sure you update Home Assistant before proceeding!
Upgrading to HASPone
Follow this guide to get your HASPs updated to HASPone.
After you’ve upgraded to HASPone
Check out this guide to deploying your first couple of blueprints. Once you’ve done this a few times the rest is easy!
New Discussion Forum
The Home Assistant community forums are fantastic but this thread got out of hand approximately 1900 posts ago. I’ll keep monitoring this thread but everyone will probably be a lot happier if we had the ability to separate out discussions into their own threads. Fortunately, GitHub has made this easy:
Click here for the HASPone Discussion Forum
I suspect this will make everyone’s interaction with HASP (and each other) much easier to handle.
Finally - stay tuned! There is a lot more in store for the HASwitchPlate project and this release is only a part of what we have planned!
I’m pretty excited about this - welcome to the HASPone app store!
With the new “my.home-assistant.io” feature in 2021.3 blueprints can be imported with a couple clicks. This makes pulling in new HASPone features dead-simple. Browse through the list, find something you think you want to use, click to import.
Hi Luma, I have just migrated one of my Switchplates to the new Blueprint format. Although there is an option to wrap text if it is too long, it does not work as well as being able to use “\r”. I tried to use “\r” in the text field but it is just ignored.
Try \\r and see if that works.
Hi Luma … does the HASPOne have the ability to know if the touch screen has been touched.
I just want to detect it has been touched … I don’t care which screen button detected the touch or what is the active page.
I can then use this detection in a generic automation to do certain things irrespective of what is the active page.
Cheers
Gary
I have tried \r but as I said above it does not work. I only put the \r in brackets to show you, when I tried \r it was not in brackets. \r just seems to be ignored. Thanks
Luma actually said try “\\r”. … double back slash r.
Many programming languages do this … this tells the compiler the configuration text includes a single backslash …
Thus the configuration would see \r which is what you want …
Give that a try
My appologies Luma, a case of word blindness, I only saw \r not \r. Sorry.
Wag5659, thanks for making it clear. Yes it works wil \r.
Thank you both
For every local interaction, an MQTT message is sent out from the HASP on hasp/<devicename>/state/json
. I make use of this in the Activate Page on Idle blueprint which might be of some help.
You can also enable sendxy
mode which will send you back the x-y coordinates of every touch interaction as a JSON message.:
mosquitto_pub -h mqtt -t 'hasp/plate01/command/sendxy' -m '1'
Then any screen press results in:
{"event_type":"button_short_press","event":"touchxy","touch_event":"ON","touchx":"157","touchy":"52","screen_state":"awake"}
Would HASPOne work ok on a 3.5in screen, or do I need to modify the page layouts to fit. If this is the case, is it necessary to update the LCD, cannot the old firmware with the customized page layout still be used?
There have been several minor changes to the LCD HMI project in version 3 (current release). If you’re using a different size panel, you’ll probably have to go and re-work the project from the v3 HMI file available on github.
Wish there was a better way to do this, but Nextion is fundamentally a bitmapped solution.
Made my first HASP yesterday, I live in Scotland so I made a desk based option.
I used an old mobile phone stand as I don’t have a 3d printer.
Excellent adaptation. Turned out perfect.
Congratulations…
I have a Honeywell Evohome thermostat using separate bridge to connect to the internet and trying to integrate this with HASP, i am on the HASPone firmware, is this similar to your setup as im looking to get this set up.
There is support for this thermostat in HA that I use to access it. It connects via a cloud that Honeywell has.