Samsung Printers provide a REST API which is used by its own web interface. You can reach it at
http://IPADDRESS/sws/app/information/home/home.json
This is the sample output:
gistfile1.txt
{
status: {
hrDeviceStatus: 2,
status1: " Sleeping... ",
status2: " ",
status3: "",
status4: ""
},
identity: {
model_name: "M2070 Series",
This file has been truncated. show original
How can we integrate this in home assistant? You cannot parse it a json because it is missing quotes for the keys.
fabaff
(Fabian Affolter)
August 9, 2017, 6:08am
2
Let Samsung fix it first then it would be easy. My guess is that’s a common issue as the C410w here is shipping the same garbage.
I think it is not Samsung’s fault because the api it just build for their own js based gui.
There seem to be some solutions:
We would just need some value as yaml helper.
You can use the demjson package which allows for non-strict JSON parsing. Note that this is now already included in the module syncthru
. However, there seem to be some bugs remaining, so feel free to take part in development there