Nice use of the for loops.
here you can find the color codes from Nextion: https://www.itead.cc/wiki/Nextion_Instruction_Set#Nextion_HMI:_Color_Code_List
Nice use of the for loops.
here you can find the color codes from Nextion: https://www.itead.cc/wiki/Nextion_Instruction_Set#Nextion_HMI:_Color_Code_List
@luma
Iāve been enjoying my new HAswitchplate when some strange behavior made the device unusable; iām hoping someone might have some insight.
Everything was working fine, then the display stopped turning on. I was still able to press the screen and the lights configured for that button would respond, however the screen appeared off. I tried to access the web UI and was unable to. After a rebooting the device, the web UI was displayed, however the the screen would never come back onā¦
Thinking this was a user error, I bought a whole new setup, new screen, new wemos D1 mini and everything worked fineā¦ until the screen would no longer come back onā¦ Pressing the screen does send MQTT messages (the lights respond) but the screen will not come onā¦ Both instances of this issue appeared roughly about a week after installation.
If I take a screen that wonāt come on, put the SD card in, and apply 5v, the screen comes on! during the update process ā¦once back in the HAswitchplate setup, the screen does not come onā¦
Iām not sure that the screen is totaled since it can receive input, and it can turn on since it did so with the SD cardā¦
Home assistant sees it as connected and onlineā¦ the Web UI sees it as onlineā¦
Toggling the backlight toggle doesnāt turn on the screenā¦
Any ideas?
check what the backlight dimmer is set to in HA. I had the issue and toggling the backlight did nothing, but that was because my backlight was set to 0. Once I moved the dimmer slider the backlight came back on.
@michael.leone I love your design, any change to share the STL files? Or when they are online already, can you point me to the location where I can find them?
Thank you!
I didnāt even think to check if there was a sliderā¦
Itās working great again!
Thanks!
Ok went through the complete thread to see if anyone posted about an issue iām seeing. I didnāt see anything related so Iāll go ahead and ask. So I am setting up my HASP, things seem to be working as I can update menu names and control my media player and such. The issue iām having is after some time (havenāt timed it exactly letās just say 20 minutes) the display reverts back to the main setup screen. After connecting and going to the settings I can see the wifi setting have been cleared. While troubleshooting this I even experienced my mqtt password settings clearing. I flashed another esp8266 to see if that would resolve the issue but the same thing happens there. Iām going to keep working on it to see if I can find a resolution but I wanted to post just in case someone had an similar issue or perhaps has some ideas on things to check. Other WiFi connected devices work just fine.
I think youāre looking at rendered designs for Australian work boxes. Iāll accept PRs for any tested solutions for enclosures outside of NA, but I am unable to design and test anything like that myself for lack of access to standard work boxes from around the world.
Ah, I thought there were PRās based on those rendered design. My bad. Too bad.
New release of the Arudino code brings back motion sensor support, enhanced reliability, and several bugfixes. New Home Assistant Automations have been published which should cut down on MQTT traffic (yay duplicate subscription handling in hass) and increase reliability.
status
to state
. If using backlight automations you will need to change this, and also modify hasp_plate01_00_components.yaml
(or re-run deployhasp.sh
to bring down the new automations, which you should do anyway).binary_sensor
device is now used for all automations to detect the device coming onlinedeployhasp.sh
without filling hass log full of errors. If youād like to utilize functions like Media Player or 3D printer monitoring, youāll need to copy over the relevant .yaml
files from hasp-examples/plate01/<filename>.yaml
to your packages folder.If youāre using the AutoFirmwareUpdate automation your devices should pull this update at 3:00am. Otherwise, log into the admin web page and you can pull the update from the firmware page.
Oh man I need to test this out again. I moved since I first implemented this (pre v0.2) and just recently got some basic home automation stuff set back up. I remember the MQTT issues being an absolute pain and causing the screen to become unresponsive for a period of time. Hacked my own fixes in place but never tried out your subsequent releases.
Have hit a bit of a brick-wall with the Volume Slider in the media player.
When adjusting the volume of the media player in HASS (to push this to the HASP), utilising the following entry in automations.yaml throws me a 0
regardless of the value of the slider:
- alias: 'Update Volume'
trigger:
- platform: state
entity_id: sensor.media_player_volume
action:
- service: mqtt.publish
data:
payload_template: '{{ (states.sensor.media_player_volume.state * 100)|int }}'
topic: hasp/plate01/command/p[1].b[5].val
If I remove the |int
from the message, I get the following having set the volume to 0.85 on the media player:
0.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.850.85
Iāve not taken the time to count, but presumably is 100 0.850s (!)
Then finally if I remove the * 100
, it gives me a value of 0.85
Any ideas on how I can get the calculation to work properly?
Thanks in advance!
Nevermind I figured it out - the initial sensor was not being picked up as an int
hence the calculation not completing correctly. For reference, this worked:
- alias: 'Update Volume'
trigger:
- platform: state
entity_id: sensor.media_player_volume
action:
- service: mqtt.publish
data:
payload_template: '{{ ((states.sensor.media_player_volume.state|float) * 100|int)|int }}'
topic: hasp/plate01/command/p[1].b[5].val
Iām back to testing out the RCWL-0516 radar module which you can get for about $0.40/pc. It doesnāt work very well but I wanted to kick around some ideas and figured others might want to use a PIR sensor or whatever. I threw together a quick shield to mount it inside the case with a small strip of protoboard plugged into the breakout connector:
I added one of these just now and it works decently.
I got 2 problems since the latest release:
The switchplate doesnāt seem to remember my SSID and Password. So it reset itself from time to time, to the AP mode. Found in the code comments that shutting off auto firmware update should solve this problem?
Sometime after reconfiguring the switchplate, the plate only show MQTT and WIFI connected with correct IP and the following message: āfailed to connect RC=5 retry in 10sā
Anyone else had those issues? And how did you solve them?
Both of these may be related to the same problem which I have set for the next release. When you click āsaveā in the HASP web interface it just blindly saves whatever is in each field. This includes password fields, which donāt have the password inserted as a default, so every time you click āsaveā without re-entering the passwords it will wipe them out. For the moment, just make sure you enter the password any time you need to click āsaveā in the main web page (which shouldnāt be often), and I should have this sorted here soon.
For reference, the RC=n is the return code from the MQTT client connection, which is specified by the MQTT spec here.
Value | Return Code Response | Description |
---|---|---|
0 | 0x00 Connection Accepted | Connection accepted |
1 | 0x01 Connection Refused, unacceptable protocol version | The Server does not support the level of the MQTT protocol requested by the Client |
2 | 0x02 Connection Refused, identifier rejected | The Client identifier is correct UTF-8 but not allowed by the Server |
3 | 0x03 Connection Refused, Server unavailable | The Network Connection has been made but the MQTT service is unavailable |
4 | 0x04 Connection Refused, bad user name or password | The data in the user name or password is malformed |
5 | 0x05 Connection Refused, not authorized | The Client is not authorized to connect |
6-255 | Reserved for future use |